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

size mismatch for vision_model.post_layernorm.weight #355

Open
zhanghang1995 opened this issue Nov 28, 2024 · 8 comments
Open

size mismatch for vision_model.post_layernorm.weight #355

zhanghang1995 opened this issue Nov 28, 2024 · 8 comments

Comments

@zhanghang1995
Copy link

when i use the llavavideo to inference, load the model get these error:

@zhanghang1995
Copy link
Author

when i use the llavavideo to inference, load the model get these error:

image

@zhanghang1995
Copy link
Author

when i use the llavavideo to inference, load the model get these error:

image

I use the local models to load: lmms-lab/LLaVA-Video-7B-Qwen2 and siglip-so400m-patch14-384

@KejiaZhang-Robust
Copy link

KejiaZhang-Robust commented Nov 29, 2024

i also have the same question, could the authors' team help us to fix this propblem?

@KejiaZhang-Robust
Copy link

image

@KejiaZhang-Robust
Copy link

I am attempting to load CLIPConfig to resolve an issue in the following code:

config = CLIPConfig.from_pretrained('google/siglip-so400m-patch14-384')
self.vision_tower = CLIPVisionModel.from_pretrained(self.vision_tower_name, device_map=device_map, config=config.vision_config)

I am now encountering only one dimension mismatch error when trying to initialize the weights:

ValueError: Trying to set a tensor of shape torch.Size([729, 1152]) in "weight" (which has shape torch.Size([730, 1152])), this looks incorrect.

@KejiaZhang-Robust
Copy link

Hi @Luodian @kcz358 @ZhangYuanhan-AI @ChunyuanLI ,

Could you kindly take a look at this issue? Your input would be greatly appreciated in resolving it.

@ZHANGH83
Copy link

ZHANGH83 commented Dec 6, 2024

I got the same problem of size mismatch for vision_model.embeddings/encoder/post_layernorm....... for inference with LlaVA-OV.
Is this the problem of vision tower? It seems the siglip-so400m-patch14-384 does not match the LLaVA ckpts...

@ZHANGH83
Copy link

ZHANGH83 commented Dec 6, 2024

Hey guys, I just tried the method in #246 (comment), and it works for me!
image

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