salesforce / LAVIS

LAVIS - A One-stop Library for Language-Vision Intelligence
BSD 3-Clause "New" or "Revised" License
9.19k stars 909 forks source link

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

Open slrhs opened 2 months ago

slrhs commented 2 months ago

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

slrhs commented 2 months ago

Traceback (most recent call last): File "vq2_zeroshot/vq2_vqa_blip2.py", line 12, in model, visprocessors, = 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 commented 1 month ago

hi, have you solve this problem, i find this problem in my task, could you give me hands, thanks.