cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
3.17k stars 238 forks source link

size mismatch for proj_in. weight Can you please help me!! #464

Closed q1446227740 closed 2 months ago

q1446227740 commented 2 months ago

Hello, I'm sorry, I'm a beginner and my English is not very good. I can only rely on translation software to read English, I haven't figured out the problem with "size mismatch for proj_in. weight" and haven't understood what you're saying, Can you explain in detail what 'SD1.5 image encoder' means? I don't understand 'clip vision encoder' I did use the sd1.5 Checkpoint model, I can only use 'VIT-G (medium strength)' at the moment, If you see it, I hope you can help me! Other friends also hope that you can help me, I have been sitting in front of the computer for 3 hours now! thanks!!

q1446227740 commented 2 months ago

1712993125533

q1446227740 commented 2 months ago

size mismatch for proj_in.weight: copying a param with shape torch.Size([..., ...]) from checkpoint, the shape in current model is torch.Size([..., ...]) Any tensor size mismatch error is caused by the wrong combination of IPAdapter model, image encoder and/or base checkpoint.

All -vit-h models require the SD1.5 image encoder. At the moment only one SDXL model and the vit-G SD1.5 model need the bigger image encoder.

I don't understand what that means

cubiq commented 2 months ago

please post the full error from the console

q1446227740 commented 2 months ago

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:\SD,ai\ComfyUI-aki-v1.3\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\SD,ai\ComfyUI-aki-v1.3\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\SD,ai\ComfyUI-aki-v1.3\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "D:\SD,ai\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 673, in apply_ipadapter return (ipadapter_execute(model.clone(), ipadapter_model, clip_vision, ipa_args), ) File "D:\SD,ai\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 324, in ipadapter_execute ipa = IPAdapter( File "D:\SD,ai\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 68, in init self.image_proj_model.load_state_dict(ipadapter_model["image_proj"]) File "D:\SD,ai\ComfyUI-aki-v1.3\python\lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

q1446227740 commented 2 months ago

image

q1446227740 commented 2 months ago

image

q1446227740 commented 2 months ago

image

q1446227740 commented 2 months ago

please post the full error from the console

I know you're very busy, can you help me

cubiq commented 2 months ago

you are using a wrong combination of models, you probably named them wrong. try to re-download the encoders and rename them as instructed in the documentation

q1446227740 commented 2 months ago

1712996508829

q1446227740 commented 2 months ago

您使用了错误的模型组合,您可能将它们命名错误。尝试重新下载编码器并按照文档中的说明重命名它们

Can I put the 'IP Adapter' model and 'faceid' together

cubiq commented 2 months ago

yes

q1446227740 commented 2 months ago

yes

image I don't seem to have gotten these names wrong I have created separate folders circled in red. Let me try it out

cubiq commented 2 months ago

the image encoders! not the ipadapter models

q1446227740 commented 2 months ago

Sorry, I'm not sure which one is "the image encoders". Can you mark it on "GitHub"

cubiq commented 2 months ago

image

q1446227740 commented 2 months ago

image I don't seem to be making any mistakes with this one

q1446227740 commented 2 months ago

Wtf! Sorry, they seem to be one file!! How could this be? I'm really sorry, thank you very much

q1446227740 commented 2 months ago

What did I do! Maybe my network fluctuated and my download interrupted once. I made a mistake with the file!

Jonfr0 commented 2 months ago

Hey @cubiq, I have the same problem but the solution you gave didn't work for me, I don't know why. Mi potete aiutare?

image

image

image