QwenLM / Qwen2-VL

Qwen2-VL is the multimodal large language model series developed by Qwen team, Alibaba Cloud.
Apache License 2.0
3.13k stars 192 forks source link

给的requirements_web_demo.txt文件有问题吗 #534

Open bisque-qwe opened 4 days ago

bisque-qwe commented 4 days ago

直接使用pip install -r requirements_web_demo.txt,运行测试demo失败,安装尝试了pip install git+https://github.com/huggingface/transformers

bisque-qwe commented 4 days ago

Traceback (most recent call last): File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1778, in _get_module return importlib.import_module("." + module_name, self.name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/models/qwen2_vl/modeling_qwen2_vl.py", line 43, in from ...modeling_utils import PreTrainedModel File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/modeling_utils.py", line 48, in from .loss.loss_utils import LOSS_MAPPING File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/loss/loss_utils.py", line 19, in from .loss_deformable_detr import DeformableDetrForObjectDetectionLoss, DeformableDetrForSegmentationLoss File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/loss/loss_deformable_detr.py", line 4, in from ..image_transforms import center_to_corners_format File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/image_transforms.py", line 22, in from .image_utils import ( File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/image_utils.py", line 58, in from torchvision.transforms import InterpolationMode File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/torchvision/init.py", line 10, in from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils # usort:skip ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/torchvision/_meta_registrations.py", line 163, in @torch.library.register_fake("torchvision::nms") ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'torch.library' has no attribute 'register_fake'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/data/panzhichun/Qwen2-VL-72B-Instruct-AWQ/test_qwen_vl.py", line 1, in from transformers import Qwen2VLForConditionalGeneration, AutoTokenizer, AutoProcessor File "", line 1229, in _handle_fromlist File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1767, in getattr value = getattr(module, name) ^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1766, in getattr module = self._get_module(self._class_to_module[name]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/qwen2-vl/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1780, in _get_module raise RuntimeError( RuntimeError: Failed to import transformers.models.qwen2_vl.modeling_qwen2_vl because of the following error (look up to see its traceback): module 'torch.library' has no attribute 'register_fake'