-
Notifications
You must be signed in to change notification settings - Fork 114
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
saving PTI latent vector w projection to npz file #24
Comments
hey @johndpope, Notice that PTI already outputs the new generator and the corresponding W vectors. In order to achieve what you are asking you need to add a saving operation for the npz output format and add a new output format for the generator. Currently is saved in the classic torch format without pickling ( I have used torch.save() to save the tuned generator). Another option if you want free-text guided editing is to borrow inspiration from StyleCLIP Optimization. Usage demo can be found here. In general - you can bypass outputting .npz file and pickling the generator by just changing the input format of the given github repositories. It might be easier (even though both methods should not take a long time) I have already experimented with free-text editing + PTI. The results were truly amazing, the downside was the sensitivity of those methods to the hyperparameters. |
UPDATE - LATEST. so tacking this on to end of notebook gets the data in correct format. Thanks! plot_image_from_w(w_pivot, new_G)
np.savez(f'projected_w.npz', w=w_pivot.cpu().detach().numpy()) some of my notes here so I get the npz file |
Is this achievable? I want to take result and throw it in here - https://github.com/l4rz/stylegan2-clip-approach
Or is this misguided...it's going to destroy the heart of soul of this repo? When I run the projections from pytorch stylegan2-ada the interpretation is crap. not as good as this repo...
The text was updated successfully, but these errors were encountered: