DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

Crush When I drag the pic to the app

Open Uknownoth1ng opened this issue 2 years ago • 4 comments

Traceback (most recent call last): File "D:\AI\DragGAN\DragGAN-main\DragGAN-main\visualizer_drag.py", line 402, in main() File "C:\Users\vip\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call return self.main(*args, **kwargs) File "C:\Users\vip\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "C:\Users\vip\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Users\vip\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke return __callback(*args, **kwargs) File "D:\AI\DragGAN\DragGAN-main\DragGAN-main\visualizer_drag.py", line 396, in main viz.draw_frame() File "D:\AI\DragGAN\DragGAN-main\DragGAN-main\visualizer_drag.py", line 181, in draw_frame h, w, _ = self.result.image.shape File "D:\AI\DragGAN\DragGAN-main\DragGAN-main\dnnlib\util.py", line 47, in getattr raise AttributeError(name) AttributeError: image

when I try to drag a pic to the pic.... and show me 'no network pickle loaded'

想上传自己的图进行编辑,拖了张图去中间,瞬间程序闪退,显示no network pickle loaded

Uknownoth1ng avatar Jun 26 '23 11:06 Uknownoth1ng

Comment out those 3 lines of code and it should run, that's my fix for now.

PDillis avatar Jun 26 '23 11:06 PDillis

@PDillis would you mind sharing which 3 lines of code did you comment out? thanks!

lauchokyip avatar Jun 26 '23 21:06 lauchokyip

Please check your checkpoints directory, as the README mentioned. You can't just drag random image to it

This GUI supports editing GAN-generated images.

The fastest way to test is is to just download the premodel

sh scripts/gui.sh

lauchokyip avatar Jun 26 '23 21:06 lauchokyip

@lauchokyip @Uknownoth1ng the PR ccd84ff has fixed this, so just do a git pull and the error shouldn't exist.

PDillis avatar Jun 27 '23 09:06 PDillis