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: 'dict' object has no attribute 'img_resolution' #122

Open
plx-bigdata opened this issue Nov 12, 2023 · 8 comments
Open

AttributeError: 'dict' object has no attribute 'img_resolution' #122

plx-bigdata opened this issue Nov 12, 2023 · 8 comments

Comments

@plx-bigdata
Copy link

when i run python visualizer_drag_gradio.py
report issue: AttributeError: 'dict' object has no attribute 'img_resolution
how do i solve this issue?

@wangwenqiao666
Copy link

I have the same problem

Traceback (most recent call last):
File "/data/DragGAN/visualizer_drag_gradio.py", line 205, in
global_state = init_images(global_state)
File "/data/DragGAN/visualizer_drag_gradio.py", line 75, in init_images
state['renderer'].init_network(
File "/data/DragGAN/viz/renderer.py", line 224, in init_network
res.img_resolution = G.img_resolution
AttributeError: 'dict' object has no attribute 'img_resolution'

image

@woshixty
Copy link

i also have this problem

@liuquanhao
Copy link

me too.

@timchenxiaoyu
Copy link

me too

@cyhhhhhhit
Copy link

i solved it by add: state['generator_params'] = dnnlib.EasyDict() before state['renderer'].init_network

@BalaMurugan171103
Copy link

I have the same problem

Traceback (most recent call last): File "/data/DragGAN/visualizer_drag_gradio.py", line 205, in global_state = init_images(global_state) File "/data/DragGAN/visualizer_drag_gradio.py", line 75, in init_images state['renderer'].init_network( File "/data/DragGAN/viz/renderer.py", line 224, in init_network res.img_resolution = G.img_resolution AttributeError: 'dict' object has no attribute 'img_resolution'

image

did you resolve this issue

@wangwenqiao666
Copy link

好像解决了,当时更新代码就好了

@Harry19s
Copy link

Harry19s commented May 7, 2024

when i run python visualizer_drag_gradio.py
report issue: AttributeError: 'dict' object has no attribute 'img_resolution
how do i solve this issue?

I don't know why but I solved this issue by

pip install gradio==3.36.1

this was also useful for pydantic error

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

8 participants