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

TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>] #37

Open
liuhw01 opened this issue Feb 21, 2024 · 2 comments

Comments

@liuhw01
Copy link

liuhw01 commented Feb 21, 2024

When I load the network from pretrained_models/next3d_ffhq_512.pkl,

Running img = G.synthesis() in all the code results in an error:

_ = G.synthesis(ws[:1], c[:1], verts[:1]) # warm up

File "", line 154, in synthesis
File "/root/miniconda3/envs/next3d/lib/python3.9/site-packages/torch/nn/functional.py", line 3924, in interpolate
raise TypeError(
TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]

What could be the reason for this?

@zjh21
Copy link

zjh21 commented May 14, 2024

same problem here

@mhwu2017
Copy link

I got the same problem, and solved it by downgrading the torch version from 2.1.0 to 1.14.1

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