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

Hello, on line 95 of the ldm/modules/encoders/modules.py file, the parameter version passed in is /data/pretrained/clip-vit-large-patch14, right? Where can I download this file from? #13

Open
yingdundun opened this issue Sep 10, 2024 · 4 comments

Comments

@yingdundun
Copy link

No description provided.

@yingdundun yingdundun changed the title Hello, on line 95 of the ldm/modules/encoders/modules.py file, the parameter version passed in is /data/pretrained/clip-vit-large-patch14, right? Where can I download this file from? ldm/modules/encoders/modules.py file Sep 10, 2024
@yingdundun yingdundun changed the title ldm/modules/encoders/modules.py file Hello, on line 95 of the ldm/modules/encoders/modules.py file, the parameter version passed in is /data/pretrained/clip-vit-large-patch14, right? Where can I download this file from? Sep 10, 2024
@changzheng123
Copy link
Owner

You can set the parameter version as "openai/clip-vit-large-patch14" to download from hugging face.

@yingdundun
Copy link
Author

openai/clip-vit-large-patch14

Thank you for your reply, but there is a new question :

raise RuntimeError(f"Error(s) in loading state_dict for {model.class.name}:\n\t{error_msg}")
RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
size mismatch for text_model.embeddings.token_embedding.weight: copying a param with shape torch.Size([49408, 768]) from checkpoint, the shape in current model is torch.Size([49408, 512]).
size mismatch for text_model.embeddings.position_embedding.weight: copying a param with shape torch.Size([77, 768]) from checkpoint, the shape in current model is torch.Size([77, 512]).
size mismatch for text_model.encoder.layers.0.self_attn.k_proj.weight: copying a param with shape torch.Size([768, 768]) from checkpoint, the shape in current model is torch.Size([512, 512]).the dimession...

The dimensions don't match, and I tried the three weight files you provided, but I still get an error. I'm looking forward to your reply.

@changzheng123
Copy link
Owner

We will check this issue. We are a bit busy with other matters recently. Please understand.

@Noora555
Copy link

openai/clip-vit-large-patch14

Thank you for your reply, but there is a new question :

raise RuntimeError(f"Error(s) in loading state_dict for {model.class.name}:\n\t{error_msg}") RuntimeError: Error(s) in loading state_dict for CLIPTextModel: size mismatch for text_model.embeddings.token_embedding.weight: copying a param with shape torch.Size([49408, 768]) from checkpoint, the shape in current model is torch.Size([49408, 512]). size mismatch for text_model.embeddings.position_embedding.weight: copying a param with shape torch.Size([77, 768]) from checkpoint, the shape in current model is torch.Size([77, 512]). size mismatch for text_model.encoder.layers.0.self_attn.k_proj.weight: copying a param with shape torch.Size([768, 768]) from checkpoint, the shape in current model is torch.Size([512, 512]).the dimession...

The dimensions don't match, and I tried the three weight files you provided, but I still get an error. I'm looking forward to your reply.

hello, i meet the same question. Have you solved it?

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