DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

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

Open l3ytao opened this issue 1 year ago • 2 comments

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'

l3ytao avatar Jun 26 '23 06:06 l3ytao

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'

Akash-Suryawanshi avatar Jul 09 '23 11:07 Akash-Suryawanshi