YuanxunLu / LiveSpeechPortraits

Live Speech Portraits: Real-Time Photorealistic Talking-Head Animation (SIGGRAPH Asia 2021)
MIT License
1.2k stars 209 forks source link

FileNotFoundError: [Errno 2] No such file or directory: './data/APC_epoch_160.model' #5

Closed AK391 closed 3 years ago

AK391 commented 3 years ago

---------- Loading Model: APC------------- Traceback (most recent call last): File "demo.py", line 146, in APC_model.load_state_dict(torch.load(config['model_params']['APC']['ckp_path']), strict=False) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 594, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './data/APC_epoch_160.model'

stephenlechat commented 3 years ago

I ran into the same issue. The file is there, but the folder is named "Input" instead of "input" as mentioned. So this should work: python demo.py --id May --driving_audio './data/Input/00083.wav'

YuanxunLu commented 3 years ago

---------- Loading Model: APC------------- Traceback (most recent call last): File "demo.py", line 146, in APC_model.load_state_dict(torch.load(config['model_params']['APC']['ckp_path']), strict=False) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 594, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './data/APC_epoch_160.model'

'./data/APC_epoch_160.model' can be downloaded from the Google Drive link in the README.MD

YuanxunLu commented 3 years ago

I ran into the same issue. The file is there, but the folder is named "Input" instead of "input" as mentioned. So this should work: python demo.py --id May --driving_audio './data/Input/00083.wav'

Thanks for your feedback. I have updated the README.md.