D:\anaconda\python.exe D:/work/vgan/StyleHEAT-main/inference.py
Same-id testing
Load pre-trained e4e Encoder from checkpoints/Encoder_e4e.pth done.
Load pre-trained hfgi encoder from checkpoints/hfgi.pth done.
Traceback (most recent call last):
File "D:/work/vgan/StyleHEAT-main/inference.py", line 223, in
main()
File "D:/work/vgan/StyleHEAT-main/inference.py", line 202, in main
generator = StyleHEAT(opt.model, PRETRAINED_MODELS_PATH).cuda()
File "D:\work\vgan\StyleHEAT-main\models\styleheat\styleheat.py", line 36, in init
self.load_checkpoint(opt, path_dic)
File "D:\work\vgan\StyleHEAT-main\models\styleheat\styleheat.py", line 59, in load_checkpoint
ckpt = torch.load(path, map_location='cpu')['net_G_ema']
File "D:\anaconda\lib\site-packages\torch\serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "D:\anaconda\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "D:\anaconda\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/StyleHEAT_result/train_video_styleheat/epoch_00010_iteration_000023000_checkpoint.pt'
Load pre-trained StyleGAN2 from checkpoints/StyleGAN_e4e.pth done.
Stage: inference
The error is caused due to the wrong path setting in inference.yaml.
I have updated the inference.yaml or you can specify the free_styler_path as your local path to StyleHEAT_visual.pt.
D:\anaconda\python.exe D:/work/vgan/StyleHEAT-main/inference.py Same-id testing Load pre-trained e4e Encoder from checkpoints/Encoder_e4e.pth done. Load pre-trained hfgi encoder from checkpoints/hfgi.pth done. Traceback (most recent call last): File "D:/work/vgan/StyleHEAT-main/inference.py", line 223, in
main()
File "D:/work/vgan/StyleHEAT-main/inference.py", line 202, in main
generator = StyleHEAT(opt.model, PRETRAINED_MODELS_PATH).cuda()
File "D:\work\vgan\StyleHEAT-main\models\styleheat\styleheat.py", line 36, in init
self.load_checkpoint(opt, path_dic)
File "D:\work\vgan\StyleHEAT-main\models\styleheat\styleheat.py", line 59, in load_checkpoint
ckpt = torch.load(path, map_location='cpu')['net_G_ema']
File "D:\anaconda\lib\site-packages\torch\serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "D:\anaconda\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "D:\anaconda\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/StyleHEAT_result/train_video_styleheat/epoch_00010_iteration_000023000_checkpoint.pt'
Load pre-trained StyleGAN2 from checkpoints/StyleGAN_e4e.pth done.
Stage: inference