cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
4k stars 307 forks source link

Weights only load failed #164

Closed UrsaBaby closed 9 months ago

UrsaBaby commented 10 months ago

Hi. I keep getting this error when trying to use this: "Error occurred when executing IPAdapterModelLoader:

Weights only load failed. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution.Do it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported operand 60"

Ive tried updating comfy, downloaded the nodes directly from repository and so on. Cant find any info on this error. Any tips?

cubiq commented 9 months ago

what system are you on? post the comfy init message

UrsaBaby commented 9 months ago

Solved. You had to rename the clip vision files. When you download them they are called model.safetensors rename it to original name and it will work. for example CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors.

cmark3 commented 9 months ago

i got the same error when i am executing IPAdapterModelLoader. i tried your method by changing the clip vision file's name back to CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors. however, this method did not work on me. the error remains. my comfy init message: image

lwc-alex commented 9 months ago

Having the same issue, I have followed the installation readme

lwc-alex commented 9 months ago

Hi @cmark3 have you found a solution?

lwc-alex commented 9 months ago

Previously, I was using the legacy model path, i.e. /workspace/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/models Now I corrected it to: /workspace/ComfyUI/models/ipadapter, with the correct models there, it's working fine

cmark3 commented 7 months ago

i tried to load the .safetensors model file instead of .bin file, then it works. so mine one is nothing to do with clip vision.


发件人: iRonMan @.> 发送时间: 2024年1月21日 1:04 收件人: cubiq/ComfyUI_IPAdapter_plus @.> 抄送: cmark3 @.>; Mention @.> 主题: Re: [cubiq/ComfyUI_IPAdapter_plus] Weights only load failed (Issue #164)

Previously, I was using the legacy model path, i.e. /workspace/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/models Now I corrected it to: /workspace/ComfyUI/models/ipadapter, with the correct models there, it's working fine

― Reply to this email directly, view it on GitHubhttps://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/164#issuecomment-1902467140, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFEFVR5AMAXIYQPQD5ACTTTYPRSRFAVCNFSM6AAAAABBCRPHUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGQ3DOMJUGA. You are receiving this because you were mentioned.Message ID: @.***>

cartossin commented 6 months ago

I think this problem happens when you get the model names mixed up. In my case, I downloaded the wrong file and named it "AnimateLCM_sd15_t2v.ckpt" so it crashed when trying to load whatever that file actually was. Redownloaded and it works now.

I believe it could really help to include the hashes of these files in workflow notes.

HamedEmine commented 3 months ago

I got this error because my model had the .ckpt extension instead of .safetensors Renaming the extension fixed it.

NoelNjem commented 3 months ago

I also think this happens happens when you get the model names mixed up. In my case, I downloaded the wrong file and named it "CLIP-ViT-bigG-14-laion2B-39B-b160k" so it crashed when trying to load whatever that file actually was. Redownloaded and it works now.... But then I ran into an unrelated another error lol