Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

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]). #21

Open
dancemanUK opened this issue Sep 4, 2023 · 2 comments

Comments

@dancemanUK
Copy link

Error occurred when executing IPAdapter:

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 "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\IPAdapter-ComfyUI\ip_adapter.py", line 163, in adapter
self.ipadapter = IPAdapterModel(
File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\IPAdapter-ComfyUI\ip_adapter.py", line 103, in init
self.image_proj_model.load_state_dict(state_dict["image_proj"])
File "F:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

d6670a61d365ddfa28e3a25e03e67b7
@laksjdjf
Copy link
Owner

laksjdjf commented Sep 5, 2023

I assume you are using clip vision for SDXL

@dancemanUK
Copy link
Author

I assume you are using clip vision for SDXL

thank you! use https://huggingface.co/h94/IP-Adapter/tree/main/models/image_encoder .sd1.5 model,this is OK!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants