ZeyuXie commited on
Commit
c7e8855
1 Parent(s): 321aaa7

Upload pico_model.py

Browse files
Files changed (1) hide show
  1. pico_model.py +1 -1
pico_model.py CHANGED
@@ -260,7 +260,7 @@ class PicoDiffusion(ClapText_Onset_2_Audio_Diffusion):
260
  ckpt = clap_load_state_dict(freeze_text_encoder_ckpt, skip_params=True)
261
  del_parameter_key = ["text_branch.embeddings.position_ids"]
262
  ckpt = {f"freeze_text_encoder.model.{k}":v for k, v in ckpt.items() if k not in del_parameter_key}
263
- diffusion_ckpt = torch.load(diffusion_pt, diffusion_pt, map_location=self.device)
264
  del diffusion_ckpt["class_emb.weight"]
265
  ckpt.update(diffusion_ckpt)
266
  self.load_state_dict(ckpt)
 
260
  ckpt = clap_load_state_dict(freeze_text_encoder_ckpt, skip_params=True)
261
  del_parameter_key = ["text_branch.embeddings.position_ids"]
262
  ckpt = {f"freeze_text_encoder.model.{k}":v for k, v in ckpt.items() if k not in del_parameter_key}
263
+ diffusion_ckpt = torch.load(diffusion_pt)
264
  del diffusion_ckpt["class_emb.weight"]
265
  ckpt.update(diffusion_ckpt)
266
  self.load_state_dict(ckpt)