NeuralCarver / Michelangelo

[NeurIPS 2023] Michelangelo: Conditional 3D Shape Generation based on Shape-Image-Text Aligned Latent Representation
https://neuralcarver.github.io/michelangelo/
GNU General Public License v3.0
341 stars 11 forks source link

safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooSmall #13

Closed phamthientan272 closed 3 weeks ago

phamthientan272 commented 3 weeks ago

I am running the script ./scripts/image2mesh.sh and receive this error

./scripts/inference/image2mesh.sh
Global seed set to 0
-----------------------------------------------------------------------------
>>> Running image2mesh
>>> Output directory: ./output/image2mesh
-----------------------------------------------------------------------------
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["id2label"]` will be overriden.
Traceback (most recent call last):
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/inference.py", line 181, in <module>
    task_dick[args.task](args, load_model(args))
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/inference.py", line 30, in load_model
    model = instantiate_from_config(model_config, ckpt_path=args.ckpt_path)
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/utils/misc.py", line 55, in instantiate_from_config
    instance = cls(**kwargs)
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/models/asl_diffusion/clip_asl_diffuser_pl_module.py", line 58, in __init__
    self.instantiate_first_stage(first_stage_config)
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/models/asl_diffusion/clip_asl_diffuser_pl_module.py", line 99, in instantiate_first_stage
    self.first_stage_model = self.instantiate_non_trainable_model(first_stage_config)
    model = instantiate_from_config(config)
    model = instantiate_from_config(config)
    model = instantiate_from_config(config)
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/utils/misc.py", line 55, in instantiate_from_config
    instance = cls(**kwargs)
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/models/tsal/asl_pl_module.py", line 39, in __init__
    self.model: AlignedShapeAsLatentModule = instantiate_from_config(
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/utils/misc.py", line 55, in instantiate_from_config
    instance = cls(**kwargs)
  File "/mnt/d/AnacleAI/TanPham/3DReconstruction/Michelangelo/michelangelo/models/tsal/clip_asl_module.py", line 19, in __init__
    self.clip_model: CLIPModel = CLIPModel.from_pretrained(clip_model_version)
  File "/home/anacle/miniconda3/envs/Michelangelo/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2604, in from_pretrained
    state_dict = load_state_dict(resolved_archive_file)
  File "/home/anacle/miniconda3/envs/Michelangelo/lib/python3.9/site-packages/transformers/modeling_utils.py", line 450, in load_state_dict
    with safe_open(checkpoint_file, framework="pt") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooSmall

No changes to the config

phamthientan272 commented 3 weeks ago

Solved! Need to download the model.safetensor in openai/clip-vit-large-patch14