Kartik-3004 / facexformer

Official implementation of FaceXFormer: A Unified Transformer for Facial Analysis
https://kartik-3004.github.io/facexformer_web/
MIT License
170 stars 17 forks source link

Incomplete Model Download #3

Closed AyushShetty84 closed 3 months ago

AyushShetty84 commented 3 months ago

I am experiencing an issue where the model is being downloaded incompletely, regardless of the method used (manual download, Hugging Face Hub, or git clone). The downloaded file size is smaller than specified, leading to incomplete model data. Downloaded File Size : 966MB Actual File Size : 1.01GB

I would appreciate any guidance or assistance in resolving this issue

Traceback (most recent call last):
  File "/nfs/Vision/DataRW/Ayush/scripts/facexformer/modelload.py", line 3, in <module>
    model = torch.load("/nfs/Vision/DataRW/Ayush/scripts/facexformer/ckpts/model.pt")
  File "/opt/conda/envs/facexformer/lib/python3.10/site-packages/torch/serialization.py", line 797, in load
    with _open_zipfile_reader(opened_file) as opened_zipfile:
  File "/opt/conda/envs/facexformer/lib/python3.10/site-packages/torch/serialization.py", line 283, in __init__
    super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
Kartik-3004 commented 3 months ago

Hi, I have updated the model.pt file on Hugging Face. You can try downloading it again. Do let me know, if you are facing any issue.

zimenglan-sysu-512 commented 3 months ago

hi @Kartik-3004 can u put the model file into Google Drive? it's very convenient to download. thx

Kartik-3004 commented 3 months ago

Hi ! Are you facing issues downloading it from the Hugging Face space ?? I have updated the model file. In future, we plan to release other versions of the trained model, so we are avoiding using google drive for now. If you create a script.py file and paste the code below inside it, and run "python script.py", you will be able to download the model.

from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="kartiknarayan/facexformer", filename="ckpts/model.pt", local_dir="./")