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

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

Open
ppjjhh0911 opened this issue Jan 28, 2022 · 6 comments
Open

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

ppjjhh0911 opened this issue Jan 28, 2022 · 6 comments

Comments

@ppjjhh0911
Copy link

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
Copy link
Owner

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

@ppjjhh0911
Copy link
Author

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
Copy link
Author

Capture

@ppjjhh0911
Copy link
Author

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

@ppjjhh0911
Copy link
Author

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
Copy link
Author

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

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