vchoutas / smplify-x

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image
https://smpl-x.is.tue.mpg.de/
Other
1.73k stars 335 forks source link

RuntimeError: size of dimension does not match previous size, operand 1, dim 2 #153

Open mchong6 opened 3 years ago

mchong6 commented 3 years ago

Got this bug

File "/home/minjin/anaconda3/envs/smpl/lib/python3.7/site-packages/smplx/lbs.py", line 266, in blend_shapes blend_shape = torch.einsum('bl,mkl->bmk', [betas, shape_disps]) File "/home/minjin/anaconda3/envs/smpl/lib/python3.7/site-packages/torch/functional.py", line 211, in einsum return torch._C._VariableFunctions.einsum(equation, operands) RuntimeError: size of dimension does not match previous size, operand 1, dim 2

I printed the shapes of betas and shape_disps and they are torch.Size([1, 20]) torch.Size([10475, 3, 400]). What could cause this problem?

armored-guitar commented 2 years ago

Hello @mchong6 . Have you managed to overcome this problem?

ZhengHFei commented 2 years ago

I also have this problem,do you have some suggests?

dongdu3 commented 2 years ago

In my case, I had this problem due to using the wrong smpl model. I just replaced them with smpl_v1.0.0 and everything works fine.

WangXuan2401 commented 2 years ago

yes!my problem was solved after I changed the smpl model. (the right one is smpl_v1.0.0)

linjing7 commented 2 years ago

@WangXuan2401 Hi, how about the version of smpl-x model?

Algabri commented 1 year ago

I also have this problem.

Update:

In my case:

I installed smplx model as this did here. I solved it by installing it using pip install smplx[all] as did here, then using pip uninstall smplx[all], thenpip install smplx[all]