PKU-YuanGroup / Chat-UniVi

[CVPR 2024 Highlight🔥] Chat-UniVi: Unified Visual Representation Empowers Large Language Models with Image and Video Understanding
https://arxiv.org/abs/2311.08046
Apache License 2.0
755 stars 41 forks source link

runtime error on huggingface space #23

Closed verigle closed 6 months ago

verigle commented 6 months ago

https://huggingface.co/spaces/Chat-UniVi/Chat-UniVi


Downloading shards: 100%|██████████| 2/2 [01:39<00:00, 45.56s/it]
Downloading shards: 100%|██████████| 2/2 [01:39<00:00, 49.92s/it]

config.json:   0%|          | 0.00/4.52k [00:00<?, ?B/s]
config.json: 100%|██████████| 4.52k/4.52k [00:00<00:00, 25.8MB/s]
Traceback (most recent call last):
  File "/home/user/app/app.py", line 120, in <module>
    handler = Chat(model_path, conv_mode=conv_mode, load_4bit=load_4bit, load_8bit=load_8bit)
  File "/home/user/app/ChatUniVi/demo.py", line 16, in __init__
    self.tokenizer, self.model, self.image_processor, context_len = load_pretrained_model(model_path, None, model_name="ChatUniVi", load_8bit=load_8bit, load_4bit=load_4bit)
  File "/home/user/app/ChatUniVi/model/builder.py", line 75, in load_pretrained_model
    model = AutoModelForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs)
  File "/home/user/.local/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 493, in from_pretrained
    return model_class.from_pretrained(
  File "/home/user/.local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2903, in from_pretrained
    ) = cls._load_pretrained_model(
  File "/home/user/.local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3002, in _load_pretrained_model
    raise ValueError(
ValueError: The current `device_map` had weights offloaded to the disk. Please provide an `offload_folder` for them. Alternatively, make sure you have `safetensors` installed if the model you are using offers the weights in this format.

could you solve this problem?

jpthu17 commented 6 months ago

Now, the model in huggingface space is available. Due to the high price of GPU, I may close this model after a week.