mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2026-04-26 15:52:04 +00:00
Finetuning provided model #51
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @icoric4 on GitHub (Aug 17, 2021).
Hello and thanks for an awesome project!
I am trying to finetune this model - https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth , but when I have
network_g:
type: GFPGANv1
I get a lot of mismatches between the layers. So I figured the models are different.
Am I right to assume that this ckpt is the GFPGANv1Clean model and if so, how can I finetune it.
When I change the config to:
network_g:
type: GFPGANv1Clean
I get:
KeyError: "No object named 'GFPGANv1Clean' found in 'arch' registry!"
@xinntao commented on GitHub (Aug 18, 2021):
@icoric4 Finetuning the https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth has not been supported yet. As this model is converted from another model (which is not released.)
I will add the model, but it may take much time ~
@icoric4 commented on GitHub (Aug 28, 2021):
Thanks!
@icoric4 commented on GitHub (Sep 1, 2021):
Hello, I have another question.
When training from scratch a model like this one https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth,
could you share the training settings you have used to train it, similar to this?
@xinntao commented on GitHub (Sep 1, 2021):
@icoric4
The training setting is similar, but
@timfu248 commented on GitHub (Dec 30, 2021):
你好,如果我想训练 type: GFPGANv1Clean,该怎样获取正确的pre-trained stylegan2 model呢?
如此设置时 decoder_load_path: experiments/pretrained_models/StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth
会报如下错误:
RuntimeError: Error(s) in loading state_dict for StyleGAN2GeneratorCSFT:
Missing key(s) in state_dict: "style_mlp.9.weight", "style_mlp.9.bias", "style_mlp.11.weight", "style_mlp.11.bias", "style_mlp.13.weight", "style_mlp.13.bias", "style_mlp.15.weight", "style_mlp.15.bias", "style_conv1.bias", "style_convs.0.bias", "style_convs.1.bias", "style_convs.2.bias", "style_convs.3.bias", "style_convs.4.bias", "style_convs.5.bias", "style_convs.6.bias", "style_convs.7.bias", "style_convs.8.bias", "style_convs.9.bias", "style_convs.10.bias", "style_convs.11.bias", "style_convs.12.bias", "style_convs.13.bias".
Unexpected key(s) in state_dict: "style_mlp.2.weight", "style_mlp.2.bias", "style_mlp.4.weight", "style_mlp.4.bias", "style_mlp.6.weight", "style_mlp.6.bias", "style_mlp.8.weight", "style_mlp.8.bias", "style_conv1.activate.bias", "style_convs.0.activate.bias", "style_convs.1.activate.bias", "style_convs.2.activate.bias", "style_convs.3.activate.bias", "style_convs.4.activate.bias", "style_convs.5.activate.bias", "style_convs.6.activate.bias", "style_convs.7.activate.bias", "style_convs.8.activate.bias", "style_convs.9.activate.bias", "style_convs.10.activate.bias", "style_convs.11.activate.bias", "style_convs.12.activate.bias", "style_convs.13.activate.bias".
@laodar commented on GitHub (Jul 31, 2023):
@timfu248 有解决吗兄弟,目前是不是只能微调GFPGANv1.pth呀
@qianx77 commented on GitHub (Oct 17, 2024):
看起来是的
@NetPranav commented on GitHub (Feb 14, 2025):
Hey could you tell me how exactly you configured GFPGAN for the fine tuning as I am new to this and I don't know.
a little hint will help a lot
Thank you
@qianx77 commented on GitHub (Feb 14, 2025):
you can just finetune GFPGANv1.pth using GFPGANv1. And v1.2 v1.3 v1.4 can't finetune