kijai / ComfyUI-KJNodes

Various custom nodes for ComfyUI
GNU General Public License v3.0
585 stars 71 forks source link

Error occurred when executing IPAdapterAdvanced #71

Open fememystic opened 5 months ago

fememystic commented 5 months ago

image

Why am i getting the error?

Error occurred when executing IPAdapterAdvanced:

Error(s) in loading state_dict for Resampler:
size mismatch for proj_in.weight: copying a param with shape torch.Size([768, 1280]) from checkpoint, the shape in current model is torch.Size([768, 1664]).

File "D:\_AI\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\_AI\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\_AI\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\_AI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 639, in apply_ipadapter
return (ipadapter_execute(model.clone(), ipadapter_model, clip_vision, **ipa_args), )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\_AI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 300, in ipadapter_execute
ipa = IPAdapter(
^^^^^^^^^^
File "D:\_AI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 68, in __init__
self.image_proj_model.load_state_dict(ipadapter_model["image_proj"])
File "D:\_AI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 2153, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

Btw i checked all the models in the workflows and all the names are the same. rtx 3090 (24gb vram)

kijai commented 5 months ago

I don't know, are you saying it works if you disable IC-Light? IPAdapter is working fine for me with this: image

fememystic commented 5 months ago

Thank you, I just checked, all your workflows work great, i'm sorry for bothering. I tried this workflow and it doesn't work Not working.json

I got it from this video description: https://www.youtube.com/watch?v=iEpHHnOYn2c&ab_channel=PixelEasel

fememystic commented 5 months ago

image That's super weird, but how it's possible that i can't make the workflow work after launching it today? it worked just fine when i started it first time, but now the nodes are red... install missing nodes says that i can update it but nothing happens after pressing it... i tried to reinstall it via manager - unsuccessful

fememystic commented 5 months ago

requirements were installed btw

kijai commented 5 months ago

requirements were installed btw

It doesn't make sense indeed, for anything that completely fails to load there should be an error in the log when you launch comfy that should tell the reason.

fememystic commented 5 months ago

yesterday i did a lot of things trying to fix it, nothing helped. Today just pressed try to update node in manager and it works. I pressed the button 5 times yesterday. what's going on xD