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

AttributeError: module 'legacy' has no attribute 'load_network_pkl' #42

Open
l3ytao opened this issue Jun 26, 2023 · 2 comments
Open

AttributeError: module 'legacy' has no attribute 'load_network_pkl' #42

l3ytao opened this issue Jun 26, 2023 · 2 comments

Comments

@l3ytao
Copy link

l3ytao commented Jun 26, 2023

Running on Windows11 by Git Bash

Traceback (most recent call last):
File "C:\Users\adm\AppData\Local\Programs\Python\Python310\lib\site-packages\viz\renderer.py", line 131, in get_network
data = legacy.load_network_pkl(f)
AttributeError: module 'legacy' has no attribute 'load_network_pkl'

@Akash-Suryawanshi
Copy link

Getting the same error:

in run_projection(network_pkl, target_fname, outdir, save_video, seed, num_steps)
22 device = torch.device('cuda')
23 with dnnlib.util.open_url(network_pkl) as fp:
---> 24 G = legacy.load_network_pkl(fp)['G_ema'].requires_grad_(False).to(device) # type: ignore
25
26 # Load target image.

AttributeError: module 'legacy' has no attribute 'load_network_pkl'

@stteovo
Copy link

stteovo commented Sep 10, 2024

@l3ytao How do you solve the problem finally? Looking forward to your reply!

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