laksjdjf / IPAdapter-ComfyUI

experimental
GNU General Public License v3.0
214 stars 13 forks source link

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 11 months ago

dancemanUK commented 11 months ago

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 commented 11 months ago

I assume you are using clip vision for SDXL

dancemanUK commented 11 months ago

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!