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

cannot import name 'LlavaLlamaForCausalLM' from 'llava.model' #28

Open
MKdir98 opened this issue May 20, 2024 · 2 comments
Open

cannot import name 'LlavaLlamaForCausalLM' from 'llava.model' #28

MKdir98 opened this issue May 20, 2024 · 2 comments

Comments

@MKdir98
Copy link

MKdir98 commented May 20, 2024

I'm getting this error in example code of llava-next

ImportError                               Traceback (most recent call last)
Cell In[5], line 1
----> 1 from llava.model.builder import load_pretrained_model
      2 from llava.mm_utils import get_model_name_from_path, process_images, tokenizer_image_token
      3 from llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN, IGNORE_INDEX

File /opt/conda/lib/python3.10/site-packages/llava/model/builder.py:23
     21 import torch
     22 from llava.model import *
---> 23 from llava.constants import DEFAULT_IMAGE_PATCH_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
     24 from llava.utils import rank0_print
     27 def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", attn_implementation="flash_attention_2", customized_config=None, **kwargs):

File /opt/conda/lib/python3.10/site-packages/llava/__init__.py:1
----> 1 from .model import LlavaLlamaForCausalLM

ImportError: cannot import name 'LlavaLlamaForCausalLM' from 'llava.model' (/opt/conda/lib/python3.10/site-packages/llava/model/__init__.py)
@MKdir98
Copy link
Author

MKdir98 commented May 20, 2024

#29

@kcz358
Copy link
Collaborator

kcz358 commented May 22, 2024

Is it something that related to this issue haotian-liu/LLaVA#1101?

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