You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built a conda environment using requirments.txt, I ran the demo_video_text_retrieval.ipynb in InternVideo2/multi_modality.
import numpy as np
import os
import io
import cv2
import torch
from demo_config import (Config,
eval_dict_leaf)
from demo.utils import (retrieve_text,
_frame_from_video,
setup_internvideo2)
In the first part, the following error occurred:
ModuleNotFoundError Traceback (most recent call last)
File ~/forkProjects/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/internvl_clip_vision.py:12
11 try:
---> 12 from .flash_attention_class import FlashAttention
13 except:
File ~/forkProjects/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/flash_attention_class.py:6
4 from einops import rearrange
----> 6 from flash_attn.flash_attn_interface import flash_attn_varlen_qkvpacked_func
7 from flash_attn.bert_padding import unpad_input, pad_input
ModuleNotFoundError: No module named 'flash_attn'
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
Cell In[4], line 11
6 import torch
8 from demo_config import (Config,
9 eval_dict_leaf)
---> 11 from demo.utils import (retrieve_text,
12 _frame_from_video,
13 setup_internvideo2)
File ~/forkProjects/InternVideo/InternVideo2/multi_modality/demo/utils.py:9
6 import torch
7 from torch import nn
----> 9 from models.backbones.internvideo2 import pretrain_internvideo2_1b_patch14_224
10 from models.backbones.bert.builder import build_bert
11 from models.criterions import get_sim
File ~/forkProjects/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/__init__.py:1
----> 1 from .internvl_clip_vision import internvl_clip_6b
2 from .internvideo2 import pretrain_internvideo2_1b_patch14_224, pretrain_internvideo2_6b_patch14_224
3 from .internvideo2_clip_vision import InternVideo2
File ~/forkProjects/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/internvl_clip_vision.py:14
12 from .flash_attention_class import FlashAttention
13 except:
---> 14 from flash_attention_class import FlashAttention
15 from flash_attn.modules.mlp import FusedMLP
16 from flash_attn.ops.rms_norm import DropoutAddRMSNorm
ModuleNotFoundError: No module named 'flash_attention_class'
However, in File ~/forkProjects/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/internvl_clip_vision.py, using command+click .flash_attention_class, it can navigate to the right place. So I'm not sure how to solve it. Does someone have the same issue?
The text was updated successfully, but these errors were encountered:
Could you give a new WeChat group QR code? The current one is full of members. Thank you in advance! @shepnerd@yinanhe
Shuaicong97
changed the title
Environment build issue for Demo in InternVideo2
Can someone provide your succeeded conda environment (The whole package list) for Demo in InternVideo2?
Mar 6, 2025
I built a conda environment using requirments.txt, I ran the demo_video_text_retrieval.ipynb in InternVideo2/multi_modality.
In the first part, the following error occurred:
However, in File ~/forkProjects/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/internvl_clip_vision.py, using command+click .flash_attention_class, it can navigate to the right place. So I'm not sure how to solve it. Does someone have the same issue?
The text was updated successfully, but these errors were encountered: