YuvalNirkin / fsgan

FSGAN - Official PyTorch Implementation
https://nirkin.com/fsgan
Creative Commons Zero v1.0 Universal
750 stars 147 forks source link

Gr = obj_factory(checkpoint['arch']).to(device) KeyError: 'arch' #159

Open ppjjhh0911 opened 2 years ago

ppjjhh0911 commented 2 years ago

I am following Training face inpainting. How to solve Gr = obj_factory(checkpoint['arch']).to(device) KeyError: 'arch' I also wrote the reenactment_model location correctly. @YuvalNirkin

YuvalNirkin commented 2 years ago

Oh, you need to add the 'arch' attribute to the checkpoint file. For now copy it from the provided reenactment model.

ppjjhh0911 commented 2 years ago

File "/data/dev/projects/fsgan/train_inpainting.py", line 266, in main Gr = obj_factory(checkpoint['arch']).to(device)

train_inpainting.py", line 266, in main -> Gc_path = os.path.join(checkpoint_dir, 'Gc_latest.pth')

But,I'm Got (D_best.pth,D_latest.pth,G_best.pth,G_latest.pth) from training face reenactment. Where is Gc_latest.pth?Is Gc_latest.pth a replacement for G_latedst.pth?

ppjjhh0911 commented 2 years ago

Capture

ppjjhh0911 commented 2 years ago

Im solved it . https://cchhoo407.tistory.com/37

ppjjhh0911 commented 2 years ago

I'm trying to copy with provided reenactment model(ijbc_msrunet_reenactment_attr_no_seg.py,train_reenactment_attr.py,train_blending.py). After trying the training face reenactment script, the weights created were copied to the swapping folder.When I tried the next step, Training face blending, I got this error. @YuvalNirkin Capture2

ppjjhh0911 commented 2 years ago

I'm trying to copy arch attribute with train_reenacted_attr_no_sev_v2_1.py 'arch': G_arch' 'arch': D_arch' When I tried the next step, Training face blending, I got this error. Capture3