Update api.py
This commit is contained in:
1
api.py
1
api.py
@@ -439,6 +439,7 @@ def handle(refer_wav_path, prompt_text, prompt_language, text, text_language):
|
|||||||
wav.seek(0)
|
wav.seek(0)
|
||||||
|
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
|
if device == "mps":
|
||||||
torch.mps.empty_cache()
|
torch.mps.empty_cache()
|
||||||
return StreamingResponse(wav, media_type="audio/wav")
|
return StreamingResponse(wav, media_type="audio/wav")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user