InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

v100跑推理报错No module named 'transformers_modules.InternVL-Chat-V1'

Open shikimoon opened this issue 9 months ago • 1 comments

用的https://huggingface.co/OpenGVLab/InternVL-Chat-V1-5 示例代码。只把path改为了本地绝对路径

Traceback (most recent call last): File "/root/youyun.ke/swift/internvl_demo.py", line 197, in test() File "/root/youyun.ke/swift/internvl_demo.py", line 102, in test model = AutoModel.from_pretrained( File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py", line 526, in from_pretrained config, kwargs = AutoConfig.from_pretrained( File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/configuration_auto.py", line 1109, in from_pretrained config_class = get_class_from_dynamic_module( File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 500, in get_class_from_dynamic_module return get_class_in_module(class_name, final_module.replace(".py", "")) File "/usr/local/lib/python3.10/dist-packages/transformers/dynamic_module_utils.py", line 200, in get_class_in_module module = importlib.import_module(module_path) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'transformers_modules.InternVL-Chat-V1' 看了下/root/.cache/huggingface/modules/transformers_modules/路径下只有InternVL-Chat-V1.5并没有InternVL-Chat-V1

shikimoon avatar May 14 '24 07:05 shikimoon

您好,这个应该是文件名中带了点号,请把1.5写成1_5

czczup avatar May 16 '24 05:05 czczup