when using pip install laion-clap and loading the model:
import laion_clap
model = laion_clap.CLAP_Module(enable_fusion=False)
model.load_ckpt() # downloads the default pretrained checkpoint.
I get the following error:
Load Checkpoint...
Traceback (most recent call last):
File "/Users/jeremypinto/cse/zero_shot_eval.py", line 33, in <module>
model.load_ckpt() # downloads the default pretrained checkpoint.
^^^^^^^^^^^^^^^^^
File "/Users/jeremypinto/opt/miniconda3/envs/cse/lib/python3.11/site-packages/laion_clap/hook.py", line 114, in load_ckpt
self.model.load_state_dict(ckpt)
File "/Users/jeremypinto/opt/miniconda3/envs/cse/lib/python3.11/site-packages/torch/nn/modules/module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for CLAP:
Unexpected key(s) in state_dict: "text_branch.embeddings.position_ids".
However, if I clone the repository and install it locally using pip install -e ., I do not get this error and model weights load correctly.
when using
pip install laion-clapand loading the model:I get the following error:
However, if I clone the repository and install it locally using
pip install -e ., I do not get this error and model weights load correctly.