LAION-AI / CLAP

Contrastive Language-Audio Pretraining
https://arxiv.org/abs/2211.06687
Creative Commons Zero v1.0 Universal
1.43k stars 137 forks source link

**"Inconsistent checkpoint loading behavior between local machine and GPU cluster"** #151

Open PabloDumenil opened 5 months ago

PabloDumenil commented 5 months ago

Description

I am encountering a RuntimeError when trying to load a checkpoint using the CLAP model on a GPU cluster. The error message indicates that there are unexpected key(s) in the state_dict.

Error Message

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

Steps to Reproduce

  1. Install laion-clap using pip.
  2. Attempt to load the checkpoint using the following code:
    
    import torch
    import laion_clap

Load the CLAP model

model = laion_clap.CLAP_Module(enable_fusion=False) model.load_ckpt()

Additional Information:

The code works fine on my local machine, but fails on the GPU cluster.

Python version: 3.10.8

What I Have Tried:

Verified that all dependencies are correctly installed. Attempted to filter the state_dict to remove unexpected keys, but encountered further issues.

lukewys commented 5 months ago

Please see https://github.com/LAION-AI/CLAP/pull/118. Apologize that we haven't pushed the pip package.