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

'DragGAN' object has no attribute '_G' #3

Open
gabgren opened this issue May 25, 2023 · 1 comment
Open

'DragGAN' object has no attribute '_G' #3

gabgren opened this issue May 25, 2023 · 1 comment
Assignees

Comments

@gabgren
Copy link

gabgren commented May 25, 2023

I have installed missing requirements manually but I am getting :

Exception has occurred: AttributeError
'DragGAN' object has no attribute '_G'
File "C:\Users\User\Downloads\DragGAN-main\DragGAN-main\drag_gan.py", line 114, in init
self._input_size = self._G.synthesis.img_resolution
File "C:\Users\User\Downloads\DragGAN-main\DragGAN-main\gradio_app.py", line 15, in init_drag_gan
drag_gan = DragGAN(network_pkl, device=device)
File "C:\Users\User\Downloads\DragGAN-main\DragGAN-main\gradio_app.py", line 181, in main
drag_gan, w_latent, image_orig = init_drag_gan(network_pkl, device, default_seed)
File "C:\Users\User\Downloads\DragGAN-main\DragGAN-main\gradio_app.py", line 824, in
app = main()
AttributeError: 'DragGAN' object has no attribute '_G'

@adriaciurana
Copy link
Owner

adriaciurana commented May 25, 2023

I have reviewed the code and I don't understand why self._G is not declared in your case (self._G is always declared: https://github.com/adriaciurana/DragGAN/blob/main/drag_gan.py#L105)

Could you provide me with more information?
Are you using custom weights?
Are you using official nvidia?
What object do you have as self._G, could you do a print(type(self._G), self._G.__dict__)

Thanks

@adriaciurana adriaciurana self-assigned this May 25, 2023
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

2 participants