diff --git a/requirements.txt b/requirements.txt index 40f1f8533..0146dc3fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,13 +4,12 @@ gradio huggingface_hub imageio matplotlib -numpy>=1.23.4 +numpy omegaconf -openai==1.3.5 +openai opencv-python>=4.4.0.46 openpyxl pandas -peft pillow portalocker protobuf @@ -23,9 +22,9 @@ sty tabulate tiktoken timeout-decorator -torch>=2.0.1 +torch tqdm transformers -typing_extensions==4.7.1 +typing_extensions validators xlsxwriter diff --git a/vlmeval/vlm/video_llm/videochat2.py b/vlmeval/vlm/video_llm/videochat2.py index 7b73fc990..b7499fcbf 100644 --- a/vlmeval/vlm/video_llm/videochat2.py +++ b/vlmeval/vlm/video_llm/videochat2.py @@ -14,7 +14,6 @@ from PIL import Image from torchvision.transforms import PILToTensor from torchvision import transforms -from peft import get_peft_model, LoraConfig, TaskType from ..base import BaseModel from ...smp import * from ...dataset import DATASET_TYPE @@ -65,6 +64,8 @@ class VideoChat2_HD(BaseModel): def __init__(self, model_path='OpenGVLab/VideoChat2_HD_stage4_Mistral_7B', root='./Ask-Anything', config_file='./configs/videochat2_hd.json', **kwargs): + + from peft import get_peft_model, LoraConfig, TaskType self.config_file = config_file self.root = root self.model_path = model_path