Fix: Add missing torch.cuda.empty_cache() (#161)

This commit is contained in:
Artrajz
2023-11-08 19:34:48 +08:00
committed by GitHub
parent 6a77c8ba1d
commit 6e66fec6fb
2 changed files with 4 additions and 0 deletions

View File

@@ -70,4 +70,6 @@ def infer(
.numpy()
)
del x_tst, tones, lang_ids, bert, x_tst_lengths, speakers
if torch.cuda.is_available():
torch.cuda.empty_cache()
return audio