Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug for ip adapter v2 #131

Open
ZivKidd opened this issue Oct 29, 2024 · 2 comments
Open

bug for ip adapter v2 #131

ZivKidd opened this issue Oct 29, 2024 · 2 comments

Comments

@ZivKidd
Copy link

ZivKidd commented Oct 29, 2024

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
Copy link

I also met same Problem
图片

@TnoobT
Copy link

TnoobT commented Oct 31, 2024

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

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

No branches or pull requests

3 participants