Error: text_cfg = CLIPTextCfg(**text_cfg) TypeError: __init__() got an unexpected keyword argument 'hf_proj_type'
I get the following error while trying to load the model:
text_cfg = CLIPTextCfg(**text_cfg)
TypeError: init() got an unexpected keyword argument 'hf_proj_type'
Getting the same issue. I tried updating to open-clip-torch==2.22.0
and still getting same error.
It used to work fine couple days ago with version 2.20.0
Seems like the config file was updated a few days ago, check here. I manually edited the config file in my cache directory to have the old keys, and the model seems to be loading fine. Not the best solution but works for now.
Thanks, changing manually the config file works.
However, I still get another error after that : Error(s) in loading state_dict for CustomTextCLIP:
Unexpected key(s) in state_dict: "text.transformer.embeddings.position_ids".
Do you have the same ?
I saw that error with the latest version. If you downgrade to 2.20.0
, it should disappear.
Please check out the latest notebook: https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224/blob/main/biomed_clip_example.ipynb