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

Question about W latent #188

Open
Airbus1080 opened this issue Oct 9, 2021 · 1 comment
Open

Question about W latent #188

Airbus1080 opened this issue Oct 9, 2021 · 1 comment

Comments

@Airbus1080
Copy link

Newbie here. In projection you generate the W latent of the target image by optimizing it but is there a way to generate (the W) without doing projection or starting from Z? It's pretty amazing the model sometimes similarly project a target image that is outside of its domain, I want to take it a step further by directly generating the W latent without projection. I want to know what coherent, recognizable, not blob images it can generate that is outside of the training distribution. Is this possible? Is there a code somewhere out there that can do this?

@PDillis
Copy link

PDillis commented Nov 22, 2021

Depends on the model. For example, FFHQ can generate any image as per Image2StyleGAN. An idea on generating images is to simply generate w with the correct shape (e.g., w = np.repeat(np.random.randn(1, 1, 512), 18, axis=1) for a 1024x1024 model) and then pass this to G.synthesis. Of course, if you wish to explore the latent space outside of W (into W+ as in the paper linked above), then you don't repeat the 'base' dlatent and just let things loose. You will lose coherence though, but you are given more freedom to generate whatever you want.

woctezuma pushed a commit to woctezuma/stylegan2-ada-pytorch that referenced this issue Jan 10, 2024
Adapt to newer _jit_get_operation API that changed in
pytorch/pytorch#76814

for NVlabs#188, NVlabs#193
woctezuma pushed a commit to woctezuma/stylegan2-ada-pytorch that referenced this issue Jan 10, 2024
Adapt to newer _jit_get_operation API that changed in
pytorch/pytorch#76814

for NVlabs#188, NVlabs#193
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

No branches or pull requests

2 participants