KeyError: 'idefics2'

#6
by AlexWuKing - opened

Traceback (most recent call last):
File "/Users/alex/Documents/Codes/SomeTest/Idefics2.py", line 16, in
model = AutoModelForVision2Seq.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 526, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1098, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 795, in getitem
raise KeyError(key)
KeyError: 'idefics2'

Env:
macOS
Screenshot 2024-04-16 at 2.16.13 PM.png

M2 Ultra 192G

you need to install the latest non stable version of transformers directly
check the installation guide:

https://huggingface.co/docs/transformers/installation#installing-from-source

because the current PIP version doesn't yet have the
Add Idefics2 #30253 commit

VictorSanh changed discussion status to closed

Sign up or log in to comment