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 #693

Open
slrhs opened this issue Apr 24, 2024 · 2 comments

Comments

@slrhs
Copy link

slrhs commented Apr 24, 2024

Have you ever encountered this problem with friends? How can I solve it?Thanks!

@slrhs
Copy link
Author

slrhs commented Apr 24, 2024

Traceback (most recent call last):
File "vq2_zeroshot/vq2_vqa_blip2.py", line 12, in
model, vis_processors, _ = load_model_and_preprocess(name="blip2", model_type="pretrain", is_eval=True, device=device)
File "/home/david/hyr/erasing/autodl-tmp/stable-diffusion-main/wysiwyr/LAVIS/lavis/models/init.py", line 205, in load_model_and_preprocess
model = model_cls.from_pretrained(model_type=model_type)
File "/home/david/hyr/erasing/autodl-tmp/stable-diffusion-main/wysiwyr/LAVIS/lavis/models/base_model.py", line 70, in from_pretrained
model = cls.from_config(model_cfg)
File "/home/david/hyr/erasing/autodl-tmp/stable-diffusion-main/wysiwyr/LAVIS/lavis/models/blip2_models/blip2_qformer.py", line 514, in from_config
model = cls(
File "/home/david/hyr/erasing/autodl-tmp/stable-diffusion-main/wysiwyr/LAVIS/lavis/models/blip2_models/blip2_qformer.py", line 71, in init
self.Qformer, self.query_tokens = self.init_Qformer(
File "/home/david/hyr/erasing/autodl-tmp/stable-diffusion-main/wysiwyr/LAVIS/lavis/models/blip2_models/blip2.py", line 54, in init_Qformer
Qformer = BertLMHeadModel.from_pretrained(
File "/home/david/anaconda3/envs/lavis/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2895, in from_pretrained
state_dict = load_state_dict(resolved_archive_file)
File "/home/david/anaconda3/envs/lavis/lib/python3.8/site-packages/transformers/modeling_utils.py", line 467, in load_state_dict
with safe_open(checkpoint_file, framework="pt") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

@LQY404
Copy link

LQY404 commented May 10, 2024

hi, have you solve this problem, i find this problem in my task, could you give me hands, 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

2 participants