DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

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

Open plx-bigdata opened this issue 1 year ago • 8 comments

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

plx-bigdata avatar Nov 12 '23 05:11 plx-bigdata

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

wangwenqiao666 avatar Nov 15 '23 11:11 wangwenqiao666

i also have this problem

woshixty avatar Nov 16 '23 09:11 woshixty

me too.

liuquanhao avatar Jan 18 '24 02:01 liuquanhao

me too

timchenxiaoyu avatar Jan 19 '24 04:01 timchenxiaoyu

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

cyhhhhhhit avatar Mar 07 '24 03:03 cyhhhhhhit

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

BalaMurugan171103 avatar Apr 25 '24 09:04 BalaMurugan171103

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

wangwenqiao666 avatar Apr 26 '24 09:04 wangwenqiao666

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

Harry19s avatar May 07 '24 12:05 Harry19s