Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge #85

Open
CharlotteHao opened this issue Nov 27, 2024 · 1 comment

Comments

@CharlotteHao
Copy link

Traceback (most recent call last):
File "/home/shahao/my_study/PF3plat/UniDepth/UniDepth/./scripts/demo.py", line 46, in
model = UniDepthV2.from_pretrained(f"lpiccinelli/{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahao/anaconda3/envs/unid/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/shahao/anaconda3/envs/unid/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 571, in from_pretrained
instance = cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "/home/shahao/anaconda3/envs/unid/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 795, in _from_pretrained
return cls._load_as_safetensor(model, model_file, map_location, strict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahao/anaconda3/envs/unid/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 844, in _load_as_safetensor
safetensors.torch.load_model(model, model_file, strict=strict, device=map_location) # type: ignore [arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahao/anaconda3/envs/unid/lib/python3.11/site-packages/safetensors/torch.py", line 202, in load_model
state_dict = load_file(filename, device=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahao/anaconda3/envs/unid/lib/python3.11/site-packages/safetensors/torch.py", line 313, in load_file
with safe_open(filename, framework="pt", device=device) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@CharlotteHao
Copy link
Author

I don't know what caused this error, how can I fix it? Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant