YuvalNirkin / fsgan

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

Got error message in swap.py #170

Closed Kwakyejin closed 1 year ago

Kwakyejin commented 1 year ago

Traceback (most recent call last): File "/home/ng4812/fsgan/fsgan/inference/swap.py", line 504, in <module> main(**vars(parser.parse_args())) File "/home/ng4812/fsgan/fsgan/inference/swap.py", line 480, in main face_swapping = FaceSwapping( File "/home/ng4812/fsgan/fsgan/inference/swap.py", line 111, in __init__ super(FaceSwapping, self).__init__( File "/home/ng4812/miniconda3/envs/fsgan/lib/python3.9/site-packages/fsgan/preprocess/preprocess_video.py", line 154, in __init__ self.face_detector = FaceDetector(det_postfix, detection_model, gpus, det_batch_size, display) File "/home/ng4812/miniconda3/envs/fsgan/lib/python3.9/site-packages/face_detection_dsfd/face_detector.py", line 33, in __init__ self.net.load_state_dict(torch.load(detection_model_path)) File "/home/ng4812/miniconda3/envs/fsgan/lib/python3.9/site-packages/torch/serialization.py", line 593, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/ng4812/miniconda3/envs/fsgan/lib/python3.9/site-packages/torch/serialization.py", line 762, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.

YuvalNirkin commented 1 year ago

I have fixed this issue. Please download the download_fsgan_models.py file again and download all the models.