CLIPVisionModel ViT g-14 has no config.json
Hi,I was trying to load the vision model usingCLIPVisionModel.from_pretrained('laion/CLIP-ViT-g-14-laion2B-s12B-b42K')but when I do this locally on a linux machine I get the following error:Traceback (most recent call last):
  File "/home/vedaant/multi_gpu-train.py", line 157, in <module>
    model = CLIPForImageClassification().cuda()
  File "/home/vedaant/multi_gpu-train.py", line 41, in __init__
    self.vision_model = CLIPVisionModel.from_pretrained('laion/CLIP-ViT-g-14-laion2B-s12B-b42K')
  File "/home/vedaant/miniconda3/envs/funnydataset/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2305, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
  File "/home/vedaant/miniconda3/envs/funnydataset/lib/python3.10/site-packages/transformers/models/clip/configuration_clip.py", line 233, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/vedaant/miniconda3/envs/funnydataset/lib/python3.10/site-packages/transformers/configuration_utils.py", line 574, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/vedaant/miniconda3/envs/funnydataset/lib/python3.10/site-packages/transformers/configuration_utils.py", line 629, in _get_config_dict
    resolved_config_file = cached_file(
  File "/home/vedaant/miniconda3/envs/funnydataset/lib/python3.10/site-packages/transformers/utils/hub.py", line 388, in cached_file
    raise EnvironmentError(
OSError: laion/CLIP-ViT-g-14-laion2B-s12B-b42K does not appear to have a file named config.json. Checkout 'https://huggingface.co/laion/CLIP-ViT-g-14-laion2B-s12B-b42K/None' for available files.However, with the same code and the same version of transformers(4.30.2) on a kaggle notebook, I am able to load the CLIPVision Model using the same code as above on kaggle. Both the environments are using python 3.10. Also, the model card(laion/CLIP-ViT-g-14-laion2B-s12B-b42K · Hugging Face) does have all the necessary files, so I am not sure what is going wrong. Any help would be appreciated.Thank you
2023-07-25T21:40:01Z
Thank you for sharing.