FreddeFrallan / Multilingual-CLIP

OpenAI CLIP text encoders for multiple languages!
MIT License
746 stars 69 forks source link

model_type 'M-CLIP' is not in CONFIG_MAPPING #19

Open wxywb opened 2 years ago

wxywb commented 2 years ago
from transformers import AutoConfig

kwargs = {'_from_auto': True}
pretrained_model_name_or_path = 'M-CLIP/XLM-Roberta-Large-Vit-L-14'
config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)

Hi, I installed required transformers==4.8.1, and run the above code to get following error.

    config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
  File "/anaconda3/lib/python3.9/site-packages/transformers/models/auto/configuration_auto.py", line 448, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
KeyError: 'M-CLIP'

seems like model_type 'M-CLIP' is not in the CONFIG_MAPPING, can anyone help to figure it out?

leovsferreira commented 1 year ago

Have you found a solution to this problem? I'm running into the same issue

Wenhan-Tan commented 1 year ago

Hi, I'm having the same issue. Does anyone know a solution?