Path problem in loading model

#2
by rwsproat - opened

I consistently get the following error when I try to load the model, where "vlv.py" is just an appropriately modified version of the first sample script. I also get the same error when I try to load directly as an AutoModel. Seems that "Qwen2" here should be "Qwen2.5-3B" since that's what's in the path it creates in the cache.

Traceback (most recent call last):
File "vlv.py", line 65, in
model = AutoModel.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/my_user_name/anaconda3/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 586, in from_pretrained
model_class = get_class_from_dynamic_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/my_user_name/anaconda3/lib/python3.12/site-packages/transformers/dynamic_module_utils.py", line 581, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module, force_reload=force_download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/my_user_name/anaconda3/lib/python3.12/site-packages/transformers/dynamic_module_utils.py", line 276, in get_class_in_module
module_spec.loader.exec_module(module)
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/home/my_user_name/.cache/huggingface/modules/transformers_modules/lambertxiao/Vision-Language-Vision-Captioner-Qwen2.5-3B/094ba04d08519298a1f172fe62bc06646e051c30/VLV_stage2.py", line 12, in
from .build import load_sd_model, load_Florence2_model
ModuleNotFoundError: No module named 'transformers_modules.lambertxiao.Vision-Language-Vision-Captioner-Qwen2'

Sign up or log in to comment