megvii-research / Portraits_Correction

29 stars 8 forks source link

Trained model weights #6

Open sinanmut opened 1 year ago

sinanmut commented 1 year ago

I think the files for the pretrained models in the checkpoint directory are corrupted. Both of the files in the checkpoint directory are under 5 MB. test.py is unable to load them. Could you please check if there is any problem with these files? Also are you planning to publish the labelled training dataset? Thanks a lot.

ghost commented 1 year ago

Hi! Actually I got the same problem.torch.load(model_path) cannot load the given checkpoint files....

Has anyone solve the problem?

File "/home/s00823553/repo/Portraits_Correction/test.py", line 214, in <module>
    model = load_model(model_path, device)
  File "/home/s00823553/repo/Portraits_Correction/test.py", line 34, in load_model
    checkpoint = torch.load(model_path)
  File "/home/s00823553/anaconda3/envs/torch11p7/lib/python3.10/site-packages/torch/serialization.py", line 795, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/s00823553/anaconda3/envs/torch11p7/lib/python3.10/site-packages/torch/serialization.py", line 1020, in _legacy_load
    typed_storage._storage._set_from_file(
RuntimeError: unexpected EOF, expected 587879 more bytes. The file might be corrupted.