cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
3.14k stars 237 forks source link

Ipadapter Model Loader #512

Closed Creative-comfyUI closed 2 months ago

Creative-comfyUI commented 2 months ago

I have this error. What it is the problem ? Thanks The checkpoint model is an SDXL Latent size 1024 and Ipadapter model is idapadpt_sdxl.safetensors

Error occurred when executing IPAdapterStyleComposition: Error(s) in loading state_dict for ImageProjModel: size mismatch for proj.weight: copying a param with shape torch.Size([8192, 1280]) from checkpoint, the shape in current model is torch.Size([8192, 1024]).

cubiq commented 2 months ago

you are probably using the wrong image encoder

Creative-comfyUI commented 2 months ago

Here is what I did

I use IPadapter Model Loader and Clip Vision with Ipadapter Stye & Composition SDXL, and it tried all the IPadapter model and all the Clip Vision model. With some of them I get the error I mentioned. For the Clip Vision, it seems to always happen for some of them, no matter what I did. It is not always the same error. (I follow your example)

I thought that using a model that is SD with a composition SDXL was the problem. It is not the case as it seems, I explain in the general discussion, I explain that we can mix SD and SDXL without problems, but not always. Look at what I wrote, as it follows that discussion in a certain sense

https://github.com/cubiq/ComfyUI_IPAdapter_plus/discussions/510

This is the image for iploader bug (the 79k works perfectly that is why I presume the bug came for the IpLoader)

Screenshot 2024-04-26 at 11 30 15 AM

Screenshot 2024-04-26 at 11 30 06 AM

This is the image for clipVision bug

Screenshot 2024-04-26 at 11 24 45 AM Screenshot 2024-04-26 at 11 24 36 AM Screenshot 2024-04-26 at 11 24 19 AM

Thanks

cubiq commented 2 months ago

base sdxl model requires vit-g encoder, sdxl plus the vit-h