Error: text_cfg = CLIPTextCfg(**text_cfg) TypeError: __init__() got an unexpected keyword argument 'hf_proj_type'

#15
by nirmazor - opened

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.

shengz changed discussion status to closed

Sign up or log in to comment