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

General fixes #65

Merged
merged 5 commits into from
Jun 27, 2023
Merged

General fixes #65

merged 5 commits into from
Jun 27, 2023

Conversation

PDillis
Copy link
Contributor

@PDillis PDillis commented Jun 26, 2023

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!

The renderer returns a RGBA image, just save the first 3 channels to correctly save the image of the resulting edits.
Removing these lines of code lets the GUI run and so far no bugs have been detected.
After editing, when saving the image, you also save the resulting latent for continuing working on it later on (or e.g. generate interpolations)
After editing, when saving the image, you also save the resulting latent for continuing working on it later on (or e.g. generate interpolations)
Copy link
Contributor Author

@PDillis PDillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: should be res.w = ws.detach().cpu().numpy()

@asnekrassov
Copy link

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

@XingangPan
Copy link
Owner

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.

@PDillis
Copy link
Contributor Author

PDillis commented Jun 26, 2023

@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!

@asnekrassov
Copy link

@PDillis Thank You!

@FrancescoSaverioZuppichini
Copy link
Contributor

@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

@XingangPan XingangPan merged commit ccd84ff into XingangPan:main Jun 27, 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

Successfully merging this pull request may close these issues.

None yet

5 participants