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

ModuleNotFoundError: No module named 'longva' #20

Open
CN-makers opened this issue Dec 1, 2024 · 5 comments
Open

ModuleNotFoundError: No module named 'longva' #20

CN-makers opened this issue Dec 1, 2024 · 5 comments

Comments

@CN-makers
Copy link

from longva.model.llava_arch import LlavaMetaModel, LlavaMetaForCausalLM
No longva file or folder

@shuyansy
Copy link
Collaborator

shuyansy commented Dec 2, 2024

hi, could you tell me which file that appears the error?

@shuyansy
Copy link
Collaborator

shuyansy commented Dec 2, 2024

The current code only supports Qwen as language model, I will update it to adapt other LLM like LLaMA.

@zhiqing0205
Copy link

Solution 1: Adjust the Import Path

If the issue arises due to an incorrect import statement, you can fix it by modifying the llava_llama.py file.

  1. File: Video-XL/videoxl/videoxl/model/language_model/llava_llama.py

  2. Import Problem:

    # from longva.model.llava_arch import LlavaMetaModel, LlavaMetaForCausalLM
    from ..llava_arch import LlavaMetaModel, LlavaMetaForCausalLM

Solution 2: Install the longva Module

  1. Clone and Navigate to Repository:
    Run the following commands:

    git clone https://github.com/EvolvingLMMs-Lab/LongVA.git
    cd LongVA/
  2. Install with Dependencies:
    Use the pip command to install the longva module along with its optional training dependencies:

    python -m pip install -e "longva/.[train]"

@CN-makers
Copy link
Author

Thank you very much!

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

3 participants