XLabs-AI / x-flux

Apache License 2.0
1.65k stars 118 forks source link

bug for ip adapter v2 #131

Open ZivKidd opened 4 weeks ago

ZivKidd commented 4 weeks ago

RuntimeError: Error(s) in loading state_dict for ImageProjModel: size mismatch for proj.weight: copying a param with shape torch.Size([65536, 768]) from checkpoint, the shape in current model is torch.Size([16384, 768]). size mismatch for proj.bias: copying a param with shape torch.Size([65536]) from checkpoint, the shape in current model is torch.Size([16384]).

src/flux/xflux_pipeline.py, line 77: self.improj = ImageProjModel(4096, 768, 4)

looks like the shape is not compatible with v2 model https://huggingface.co/XLabs-AI/flux-ip-adapter-v2

mayuelala commented 4 weeks ago

I also met same Problem

图片
TnoobT commented 3 weeks ago

self.improj = ImageProjModel(cross_attention_dim=4096,clip_embeddings_dim=768,clip_extra_context_tokens=16)