You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just cloned this repo and running into a torch size mismatch error.
If I do set the "ignore_mismatched_sizes" flag on the model it seems to run though, still weird.
Using python 3.10.12
Error log:
Traceback (most recent call last):
File "/home/userName/Documents/moondream/batch_generate_example.py", line 10, in <module>
moondream = Moondream.from_pretrained(
File "/home/userName/Documents/moondream/venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3941, in from_pretrained
) = cls._load_pretrained_model(
File "/home/userName/Documents/moondream/venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4473, in _load_pretrained_model
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 Moondream:
size mismatch for region_model.size_features.weight: copying a param with shape torch.Size([128, 2]) from checkpoint, the shape in current model is torch.Size([256, 2]).
size mismatch for region_model.size_encoder.weight: copying a param with shape torch.Size([2048, 256]) from checkpoint, the shape in current model is torch.Size([2048, 512]).
You may consider adding `ignore_mismatched_sizes=True` in the model `from_pretrained` method.
The text was updated successfully, but these errors were encountered:
Can be ignored for now (via ignore_mismatched_sizes=True) -- the region model is for the next upcoming version of the model, the current version doesn't use it.
Just cloned this repo and running into a torch size mismatch error.
If I do set the "ignore_mismatched_sizes" flag on the model it seems to run though, still weird.
Using python 3.10.12
Error log:
The text was updated successfully, but these errors were encountered: