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

using my own pretrained stylegan2 network #27

Closed
MDYLL opened this issue Jul 27, 2021 · 5 comments
Closed

using my own pretrained stylegan2 network #27

MDYLL opened this issue Jul 27, 2021 · 5 comments

Comments

@MDYLL
Copy link

MDYLL commented Jul 27, 2021

Hello :)
Thank you very much for your repo. I got a lot of beatiful photos. :))))

I try to use my own pretrained stylegan from official repo
https://github.com/NVlabs/stylegan2

But I cannot understand how I should use pkl-file, that I have.

I convert it to pt-file by
https://github.com/dvschultz/ai/blob/master/Convert_pkl_to_pt.ipynb
and change yml:
decoder_load_path: experiments/pretrained_models/stylegan2-ffhq-config-f.pt
but got error:
KeyError: 'params_ema'

May be I should use another repo for getting correct pth-file for decoder ?

Thank you :)))

@MDYLL
Copy link
Author

MDYLL commented Jul 29, 2021

done:

https://github.com/xinntao/BasicSR/blob/master/docs/HOWTOs.md#How-to-train-StyleGAN2

  1. dataset should contain 70K images
  2. change yml:

network structures

network_g:
channel_multiplier:1

network_g:
channel_multiplier:1

you will get pth file for GFPGAN

@MDYLL MDYLL closed this as completed Jul 29, 2021
@yx-chan131
Copy link

Hi, @MDYLL , so you train a new StyleGAN2 model using BasicSR library?
May I know how long is the duration for training?

@MDYLL
Copy link
Author

MDYLL commented Dec 1, 2021

I think it depends on GPU. In my case it took 3 days. And after I could inference GFPGAN on CPU

@yx-chan131
Copy link

@MDYLL Thanks for your reply. May I know whether you turn off the generator regularization when training styleGAN2? Because I found that this is the problem that cause my training speed to be extremely slow.

@MDYLL
Copy link
Author

MDYLL commented Dec 2, 2021

:)
Nope. Train parameters have been set by default

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