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

preprocessor_config.json Not Found for Model liuhaotian/llava-v1.6-mistral-7b #1831

Open
Safdari10 opened this issue Feb 5, 2025 · 0 comments

Comments

@Safdari10
Copy link

Describe the issue

Issue: I am trying to load the LLaVA model liuhaotian/llava-v1.6-mistral-7b using the LlavaProcessor from the transformers library. However, I am encountering a 404 Client Error because the file preprocessor_config.json is not found at the specified URL.

Command:

import torch
from PIL import Image
from transformers import LlavaProcessor, LlavaForConditionalGeneration

model_name = "liuhaotian/llava-v1.6-mistral-7b"

try:
    processor = LlavaProcessor.from_pretrained(model_name, trust_remote_code=True)
    model = LlavaForConditionalGeneration.from_pretrained(model_name, trust_remote_code=True)
    print("Model loaded successfully.")
except Exception as e:
    print(f"Error loading model: {e}")

Log:

Traceback (most recent call last):
  File "C:\Users\safda\AppData\Local\Programs\Python\Python313\Lib\site-packages\huggingface_hub\utils\_http.py", line 406, in hf_raise_for_status
    response.raise_for_status()
  File "C:\Users\safda\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/liuhaotian/llava-v1.6-mistral-7b/resolve/main/preprocessor_config.json

...

OSError: liuhaotian/llava-v1.6-mistral-7b does not appear to have a file named preprocessor_config.json. Checkout 'https://huggingface.co/liuhaotian/llava-v1.6-mistral-7b/tree/main' for available files.

Steps to Reproduce:

Install the necessary libraries:

pip install torch sentencepiece accelerate
pip install git+https://github.com/huggingface/transformers.git
pip install git+https://github.com/haotian-liu/LLaVA.git

Run the provided code snippet.

Expected Behavior: The model should load successfully without any errors.

Actual Behavior: A 404 Client Error is raised because the file preprocessor_config.json is not found.

Additional Context: I have verified that the model name and URL are correct. Any guidance on resolving this issue would be greatly appreciated.

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