LAION-AI / LAION-AI/CLAP

3 larger CLAP models not able to load

Open
#153 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

Hello, my approach is pretty straightforward; running the default code with just ckpts changed:

model = laion_clap.CLAP_Module(enable_fusion=False, amodel= 'HTSAT-base')
model.load_ckpt( 'music_audioset_epoch_15_esc_90.14.pt' )

But I get the error:

Error(s) in loading state_dict for CLAP:
	Unexpected key(s) in state_dict: "text_branch.embeddings.position_ids". 

This error is present in all the newly trained models;
For music: music_audioset_epoch_15_esc_90.14.pt
For music and speech: music_speech_epoch_15_esc_89.25.pt
For speech, music and general audio: music_speech_audioset_epoch_15_esc_89.98.pt

How can I correctly load these models? thanks..

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error with the shown CLAP_Module and load_ckpt calls, using each of the three listed checkpoint files. Start by tracing load_ckpt and the state_dict loading path to determine why text_branch.embeddings.position_ids is unexpected. Done means all three newly trained models load without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.