CosyVoice commited on
Commit
ee9e87b
1 Parent(s): 7981796

add empty cache

Browse files
Files changed (1) hide show
  1. cosyvoice/cli/model.py +1 -0
cosyvoice/cli/model.py CHANGED
@@ -56,4 +56,5 @@ class CosyVoiceModel:
56
  prompt_feat_len=prompt_speech_feat_len.to(self.device),
57
  embedding=flow_embedding.to(self.device))
58
  tts_speech = self.hift.inference(mel=tts_mel).cpu()
 
59
  return {'tts_speech': tts_speech}
 
56
  prompt_feat_len=prompt_speech_feat_len.to(self.device),
57
  embedding=flow_embedding.to(self.device))
58
  tts_speech = self.hift.inference(mel=tts_mel).cpu()
59
+ torch.cuda.empty_cache()
60
  return {'tts_speech': tts_speech}