joonson / syncnet_python

Out of time: automated lip sync in the wild
MIT License
618 stars 140 forks source link

RuntimeError: mat1 and mat2 shapes cannot be multiplied (4x278528 and 512x512) #48

Open Unmesh28 opened 1 year ago

Unmesh28 commented 1 year ago

While I run run_syncnet.py getting below error :

WARNING: Audio (3.6720s) and video (3.7200s) lengths are different. Traceback (most recent call last): File "run_syncnet.py", line 40, in <module> offset, conf, dist = s.evaluate(opt,videofile=fname) File "/home/ubuntu/wav2lip_288x288/syncnet_python/SyncNetInstance.py", line 112, in evaluate im_out = self.__S__.forward_lip(im_in.cuda()); File "/home/ubuntu/wav2lip_288x288/syncnet_python/SyncNetModel.py", line 108, in forward_lip out = self.netfclip(mid); File "/home/ubuntu/anaconda3/envs/wav2lip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/ubuntu/anaconda3/envs/wav2lip/lib/python3.7/site-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "/home/ubuntu/anaconda3/envs/wav2lip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/ubuntu/anaconda3/envs/wav2lip/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 114, in forward return F.linear(input, self.weight, self.bias) RuntimeError: mat1 and mat2 shapes cannot be multiplied (4x278528 and 512x512)

Please let me know if anybody knows how to resolve this ?

aishoot commented 1 year ago

Met the same problem

raining-dev commented 1 year ago

Met the same problem

raining-dev commented 1 year ago

Met the same problem,have you solved it now?

1105135335 commented 1 year ago

Met the same problem,have you solved it now?

shadtorrie commented 1 year ago

I had this same issue. Looking at the demo_syncnet.py example it seems like the image size is what is causing it. Resizing the images to 224x224 fixed this particular issue. I tried other shapes and they didn't work so I am unsure why this is occuring or if other resolutions will work. Hope this helps!

shadtorrie commented 1 year ago

Aha! they have a better description here: https://github.com/joonson/syncnet_python/issues/39