Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference not working #9

Open
netrunner-exe opened this issue Jan 13, 2023 · 3 comments
Open

Inference not working #9

netrunner-exe opened this issue Jan 13, 2023 · 3 comments

Comments

@netrunner-exe
Copy link

netrunner-exe commented Jan 13, 2023

Testing 0 DSC00324_01
Traceback (most recent call last):
  File "inference_gcfsr_blind.py", line 69, in <module>
    main()
  File "inference_gcfsr_blind.py", line 66, in main
    generate(args, img, model, device, imgname)
  File "inference_gcfsr_blind.py", line 19, in generate
    output, _ = g_ema(img)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/GCFSR/basicsr/archs/gcfsr_arch.py", line 1120, in forward
    latent = self.final_linear(tmp.view(b, -1)).view(-1, self.num_latent, self.num_style_feat)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/GCFSR/basicsr/archs/gcfsr_arch.py", line 172, in forward
    out = F.linear(x, self.weight * self.scale)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x32768 and 8192x6144)
@netrunner-exe
Copy link
Author

@hejingwenhejingwen, please add code for a demo of cropping and aligning faces and pasting back.

@morning12138
Copy link

I tried, and it worked when the picture size is 512 * 512. Otherwise it will not work.

@xiumin123
Copy link

Hello,I have met the same question,and i have resized input image 512*512,do you solve the problem.
Traceback (most recent call last):
File "/data01/zhangxiumin/codeyard/GCFSR-main/inference/inference_gcfsr.py", line 79, in
main()
File "/data01/zhangxiumin/codeyard/GCFSR-main/inference/inference_gcfsr.py", line 76, in main
generate(args, img, cond, model, device, imgname)
File "/data01/zhangxiumin/codeyard/GCFSR-main/inference/inference_gcfsr.py", line 19, in generate
output, _ = g_ema(img, cond)
File "/home/zhangxiumin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/data01/zhangxiumin/codeyard/GCFSR-main/basicsr/archs/gcfsr_arch.py", line 919, in forward
latent = self.final_linear(tmp.view(b, -1)).view(-1, self.num_latent, self.num_style_feat)
File "/home/zhangxiumin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/data01/zhangxiumin/codeyard/GCFSR-main/basicsr/archs/gcfsr_arch.py", line 172, in forward
out = F.linear(x, self.weight * self.scale)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x1024 and 4096x7168)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants