Spaces:
Running
on
Zero
Running
on
Zero
add empty cache
Browse files- 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}
|