devaansh100 / CLIPTrans

Official implementation for the paper "Transferring Visual Knowledge with Pre-trained Models for Multimodal Machine Translation", published at ICCV'23.
19 stars 3 forks source link

Questions about pretrained models #5

Closed skylie-xtj closed 2 weeks ago

skylie-xtj commented 2 weeks ago

Hello,

I have encountered an issue that seems difficult to resolve. Could you kindly take a look and assist me with it? Thank you very much!

Traceback (most recent call last): File "src/main.py", line 158, in main(params) File "src/main.py", line 40, in main model = MODEL(params) File "src/models/model.py", line 24, in init self.clip = M_CLIP(params) File "src/models/clip_comb.py", line 13, in init self.text_encoder, self.text_preprocessor = MClip.from_pretrained(model_name_or_path), AutoTokenizer.from_pretrained(model_name_or_path) File "/home/xutianjiao/miniconda3/envs/cliptrans/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2959, in from_pretrained model = cls(config, *model_args, *model_kwargs) File "src/models/mclip.py", line 7, in init super().init(config, args, **kwargs) File "/home/xutianjiao/miniconda3/envs/cliptrans/lib/python3.8/site-packages/multilingual_clip/pt_multilingual_clip.py", line 11, in init self.transformer = transformers.AutoModel.from_pretrained(config.modelBase) File "/home/xutianjiao/miniconda3/envs/cliptrans/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 527, in from_pretrained config, kwargs = AutoConfig.from_pretrained( File "/home/xutianjiao/miniconda3/envs/cliptrans/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 1039, in from_pretrained config_class = CONFIG_MAPPING[config_dict["model_type"]] File "/home/xutianjiao/miniconda3/envs/cliptrans/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 734, in getitem raise KeyError(key) KeyError: 'M-CLIP'