DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

General fixes

Open PDillis opened this issue 2 years ago • 3 comments

Thanks for releasing your code!

I have encountered some issues when using this, so these are so far my fixes for them (Windows 10, RTX 3080):

  • Remove the check self.check_update_mask, as I believe it's in the wrong place as of now (commented out as of now)
  • Remove checks to correctly save the resulting image (removing the fourth channel/mask)
  • Save the corresponding latent (W) as a .npy file, for continuing working on it later on, or generate interpolation videos/usual exploration

Thanks again for your project!

PDillis avatar Jun 26 '23 12:06 PDillis

Hi, did it work for you on Windows? I tried to run under WSL2, but failed too

asnekrassov avatar Jun 26 '23 14:06 asnekrassov

Hi @PDillis, thank you for the PR. Do you see any error caused by self.check_update_mask? This intends to reset the mask when the model or image changes.

XingangPan avatar Jun 26 '23 14:06 XingangPan

@asnekrassov I have no issues running on Windows, I use the Anaconda Command Prompt so I cannot really recommend what to do with WSL.

@XingangPan There wasn't an error, but going around I found that it was better to put it inside the next if condition (i.e., there is an image to display), and then resetting the mask whenever there's a new pickle or seed. The final latent is also correctly saved whenever saving the edited image. I've pushed these changes, let me know if there's anything else to check!

PDillis avatar Jun 26 '23 17:06 PDillis

@PDillis Thank You!

asnekrassov avatar Jun 26 '23 18:06 asnekrassov

@asnekrassov If I may, another fix is to remove the .style at line 305 in visualizer_drag_gradio.py so it doesn't resize the image when you click on edit mask. I wanted to do a PR but at this point it would make more sense if it stays here