YuvalNirkin / fsgan

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

RuntimeError: unexpected EOF, expected 1880922 more bytes. The file might be corrupted. #18

Closed hsl20130659 closed 4 years ago

hsl20130659 commented 4 years ago

Traceback (most recent call last): File "/home/hsl/Project/Face-swap/fsgan/swap.py", line 501, in main(parser.parse_args()) File "/home/hsl/Project/Face-swap/fsgan/swap.py", line 490, in main blending_model=blending_model, criterion_id=criterion_id, min_radius=min_radius, output_crop=output_crop) File "/home/hsl/Project/Face-swap/fsgan/swap.py", line 131, in init self.Gr, checkpoint = load_model(reenactment_model, 'face reenactment', self.device, return_checkpoint=True) File "/home/hsl/Project/Face-swap/fsgan/fsgan/utils/utils.py", line 166, in load_model checkpoint = torch.load(model_path, map_location=lambda storage, loc: storage) File "/home/hsl/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 368, in load return _load(f, map_location, pickle_module) File "/home/hsl/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 549, in _load deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly) RuntimeError: unexpected EOF, expected 1880922 more bytes. The file might be corrupted.

I meet this problem and have no idea to address it

YuvalNirkin commented 4 years ago

The model probably wasn't downloaded correctly, all models should be more than 50MB. Try to download corrupted models again.