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

Train with w-plus pSp encoder. #87

Open
RewindL opened this issue Jul 4, 2023 · 2 comments
Open

Train with w-plus pSp encoder. #87

RewindL opened this issue Jul 4, 2023 · 2 comments

Comments

@RewindL
Copy link

RewindL commented Jul 4, 2023

I'm wondering if this repository can be trained with w-plus pSp encoder since original pSp is designed to predict wplus latent code from input image.
I have read the DualStyleGAN code, and I found when wplus encoder is employed during training DualStyleGAN, it will work for destylezation if I change z_plus_latent=True ot z_plus_latent=False, which means latent need not be projected by decoder.style (the 8-layer-MLP of stylegan2) anymore.
But when pretraining/finetuning DualStyleGAN, random styles are sampled by torch.randn limiting these styles are from Z+ space, and should be projected by decoder.style when injected into nework. So I have no plan to train with w-plus encoder, and I want to ask you if there is any solution or I must train z-plus pSp first?
Your reply will be appreciated.

@williamyang1991
Copy link
Owner

DualStyleGAN can be trained with wplus encoder.
All you need to do is to revise the code everywhere it calls z_plus_latent=True and transforms zplus code to wplus code.
And all the training and testing processes should use wplus instead of zplus.

@RewindL
Copy link
Author

RewindL commented Jul 4, 2023

Thanks for your early reply, I will try to train model following your advice.

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