"invalid load key, '<'" error

#2
by cauldron-cake - opened

I've hit this every time I've tried to load a clip vision model (tried this and a few others) in comfyui so far, so I tried loading it with a basic script and got the error. I was originally using the

":~/ComfyUI/models/clip_vision$ python3 test_load.py
Failed to load model. Error: invalid load key, '<'."

The script I tried with is
"import torch
ckpt_path = "/home/ubuntu/ComfyUI/models/clip_vision/clip_vision_g.safetensors"

try:
model = torch.load(ckpt_path)
print("Model loaded successfully!")
except Exception as e:
print(f"Failed to load model. Error: {e}")"

Any ideas?

(for clarity: am noob, might just be doin it wrong)

That's a safetensors file, you can't use torch.load on it.

Sign up or log in to comment