MotionGPT icon indicating copy to clipboard operation
MotionGPT copied to clipboard

Shape mismatch in load.state_dict()

Open santurini opened this issue 2 years ago • 12 comments

I am trying to running demo.py on some personalized prompts but I am not able to load the model as I get the following error:

RuntimeError: Error(s) in loading state_dict for MovementConvEncoder:
	size mismatch for main.0.weight: copying a param with shape torch.Size([512, 259, 4]) from checkpoint, the shape in current model is torch.Size([512, 18, 4]).

And the command I am using is:

python demo.py --cfg ./configs/config_h3d_stage3.yaml --example ./demos/t2m.txt

santurini avatar Dec 04 '23 15:12 santurini

I have the same issue, with different dimension:

RuntimeError: Error(s) in loading state_dict for MovementConvEncoder:
        size mismatch for main.0.weight: copying a param with shape torch.Size([512, 259, 4]) from checkpoint, the shape in current model is torch.Size([512, 247, 4]).

zsolt-csibi avatar Jan 21 '24 16:01 zsolt-csibi

I have the same issue, with different dimension:

RuntimeError: Error(s) in loading state_dict for MovementConvEncoder:
        size mismatch for main.0.weight: copying a param with shape torch.Size([512, 259, 4]) from checkpoint, the shape in current model is torch.Size([512, 247, 4]).

@zsolt-csibi have you solved this problem?

duan348733684 avatar Feb 27 '24 11:02 duan348733684

I am trying to running demo.py on some personalized prompts but I am not able to load the model as I get the following error:

RuntimeError: Error(s) in loading state_dict for MovementConvEncoder:
	size mismatch for main.0.weight: copying a param with shape torch.Size([512, 259, 4]) from checkpoint, the shape in current model is torch.Size([512, 18, 4]).

And the command I am using is:

python demo.py --cfg ./configs/config_h3d_stage3.yaml --example ./demos/t2m.txt

@santurini have you solved this problem?

duan348733684 avatar Feb 27 '24 11:02 duan348733684

Have you solved the dimension problem? Can you teach me the method @duan348733684

zrx-python avatar Apr 01 '24 12:04 zrx-python

Have you solved the dimension problem? Can you teach me the method @zsolt-csibi

zrx-python avatar Apr 01 '24 12:04 zrx-python

@zsolt-csibi @duan348733684 @santurini @zrx-python have you solve 🤔?

ehsanwwe avatar Jun 26 '24 12:06 ehsanwwe

@ehsanwwe 解决了 但是忘记什么原因了,好像是某个超参数 还是 数据集不对的问题,你排查排查把 https://blog.csdn.net/qq_53930200/article/details/137102979?spm=1001.2014.3001.5501

zrx-python avatar Jun 26 '24 13:06 zrx-python

( learning Chinese Lang is much important than learning Programming language 😄) @zrx-python i do all titles available at the link but everything's are the same

ehsanwwe avatar Jun 26 '24 13:06 ehsanwwe

( learning Chinese Lang is much important than learning Programming language 😄) @zrx-python i do all titles available at the link but everything's are the same

@ehsanwwe have you solve this problem?

SakuraHana01 avatar Oct 20 '24 09:10 SakuraHana01

This issue is likely related to the dataset version. I have explained the resolution process in #53, which might help address this problem. https://github.com/OpenMotionLab/MotionGPT/issues/53#issuecomment-2731960815

Maxin-C avatar Mar 18 '25 07:03 Maxin-C