NVlabs / imaginaire

NVIDIA's Deep Imagination Team's PyTorch Library
Other
4.02k stars 452 forks source link

model load error for fs_vid2vid #158

Closed SaharHusseini closed 2 years ago

SaharHusseini commented 2 years ago

Hello, I tried to run command below: python inference.py --single_gpu --num_workers 0 --config configs/projects/fs_vid2vid/face_forensics/ampO1.yaml --output_dir projects/fs_vid2vid/output/face_forensics

I got similar issue as issue 131. So I downloaded flowNet2 and gancraft models manually and located them in the correct place. But I still get the below error. Any one can help?

During handling of the above exception, another exception occurred: Traceback (most recent call last): File "inference.py", line 96, in main() File "inference.py", line 88, in main trainer.load_checkpoint(cfg, args.checkpoint) File "/medias/db/ImagingSecurity_misc/Sahar/imaginaire/imaginaire/trainers/base.py", line 319, in load_checkpoint net_G_module.load_pretrained_network(self.net_G, checkpoint['net_G']) File "/medias/db/ImagingSecurity_misc/Sahar/imaginaire/imaginaire/generators/fs_vid2vid.py", line 293, in load_pretrained_network kp = prefix + k TypeError: unsupported operand type(s) for +: 'collections.OrderedDict' and 'str' (//medias/db/ImagingSecurity_misc/Sahar/env/fs_vid2vid) -blutch$

SunNoJJ commented 1 year ago

imaginaire/trainers/base.py 第319行: net_G_module.load_pretrained_network(self.net_G, checkpoint['net_G']) 改为: net_G_module.load_pretrained_network(checkpoint['net_G'])