ZeyuXie commited on
Commit
93df452
1 Parent(s): 8366c6c

Update pico_model.py

Browse files
Files changed (1) hide show
  1. pico_model.py +1 -1
pico_model.py CHANGED
@@ -227,7 +227,7 @@ class PicoDiffusion(ClapText_Onset_2_Audio_Diffusion):
227
  del_parameter_key = ["text_branch.embeddings.position_ids"]
228
  ckpt = {f"freeze_text_encoder.model.{k}":v for k, v in ckpt.items() if k not in del_parameter_key}
229
  #diffusion_ckpt = torch.load(diffusion_pt, map_location=self.device)
230
- diffusion_ckpt = torch.load(diffusion_pt)
231
  del diffusion_ckpt["class_emb.weight"]
232
  ckpt.update(diffusion_ckpt)
233
  self.load_state_dict(ckpt)
 
227
  del_parameter_key = ["text_branch.embeddings.position_ids"]
228
  ckpt = {f"freeze_text_encoder.model.{k}":v for k, v in ckpt.items() if k not in del_parameter_key}
229
  #diffusion_ckpt = torch.load(diffusion_pt, map_location=self.device)
230
+ diffusion_ckpt = torch.load(diffusion_pt, map_location="cpu")
231
  del diffusion_ckpt["class_emb.weight"]
232
  ckpt.update(diffusion_ckpt)
233
  self.load_state_dict(ckpt)