Fix: Add missing torch.cuda.empty_cache() (#161)
This commit is contained in:
2
infer.py
2
infer.py
@@ -202,4 +202,6 @@ def infer(
|
|||||||
.numpy()
|
.numpy()
|
||||||
)
|
)
|
||||||
del x_tst, tones, lang_ids, bert, x_tst_lengths, speakers, ja_bert, en_bert
|
del x_tst, tones, lang_ids, bert, x_tst_lengths, speakers, ja_bert, en_bert
|
||||||
|
if torch.cuda.is_available():
|
||||||
|
torch.cuda.empty_cache()
|
||||||
return audio
|
return audio
|
||||||
|
|||||||
@@ -70,4 +70,6 @@ def infer(
|
|||||||
.numpy()
|
.numpy()
|
||||||
)
|
)
|
||||||
del x_tst, tones, lang_ids, bert, x_tst_lengths, speakers
|
del x_tst, tones, lang_ids, bert, x_tst_lengths, speakers
|
||||||
|
if torch.cuda.is_available():
|
||||||
|
torch.cuda.empty_cache()
|
||||||
return audio
|
return audio
|
||||||
|
|||||||
Reference in New Issue
Block a user