Skip to content

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

Open

Description

@Unmesh28

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 ?

Activity

  1. aishoot commented on Aug 16, 2022

    @aishoot

    Met the same problem

  2. raining-dev commented on Nov 3, 2022

    @raining-dev

    Met the same problem

  3. raining-dev commented on Nov 6, 2022

    @raining-dev

    Met the same problem,have you solved it now?

  4. wl2136 commented on Dec 14, 2022

    @wl2136

    Met the same problem,have you solved it now?

  5. shadtorrie commented on Mar 2, 2023

    @shadtorrie

    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!

  6. shadtorrie commented on Mar 2, 2023

    @shadtorrie

    Aha! they have a better description here: #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions