cannot download model
transformers version >= 4.21.0
from modeling_altclip import AltCLIP
from processing_altclip import AltCLIPProcessor
now our repo's in private, so we need use_auth_token=True
model = AltCLIP.from_pretrained("BAAI/AltCLIP")
processor = AltCLIPProcessor.from_pretrained("BAAI/AltCLIP")
get some error:
You are using a model of type altclip to instantiate a model of type clip. This is not supported for all configurations of models and can yield errors.
Traceback (most recent call last):
File "test.py", line 12, in
model = AltCLIP.from_pretrained("BAAI/AltCLIP")
File "anaconda3/envs/py3/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2325, in from_pretrained
config, model_kwargs = cls.config_class.from_pretrained(
File "/anaconda3/envs/py3/lib/python3.8/site-packages/transformers/configuration_utils.py", line 597, in from_pretrained
return cls.from_dict(config_dict, **kwargs)
File "anaconda3/envs/py3/lib/python3.8/site-packages/transformers/configuration_utils.py", line 744, in from_dict
config = cls(**config_dict)
File "great_filter/hf_altclip/configuration_altclip.py", line 13, in init
super().init(text_config_dict, vision_config_dict, projection_dim, logit_scale_init_value, **kwargs)
TypeError: init() got multiple values for argument 'text_config'
In this code:
File "great_filter/hf_altclip/configuration_altclip.py", line 13, in init
super().init(text_config_dict, vision_config_dict, projection_dim, logit_scale_init_value, **kwargs)
You can try to modify the input paramters as:
super().init(text_config_dict=text_config_dict, vision_config_dict=vision_config_dict, projection_dim=projection_dim, logit_scale_init_value=logit_scale_init_value, **kwargs)