mirror of
https://github.com/jasonppy/VoiceCraft.git
synced 2025-06-05 21:49:11 +02:00
Empty cuda cache between inferences
This commit is contained in:
@@ -98,7 +98,9 @@ def inference_one_sample(model, model_args, phn2num, text_tokenizer, audio_token
|
||||
gen_sample = audio_tokenizer.decode(
|
||||
[(gen_frames, None)]
|
||||
)
|
||||
|
||||
#Empty cuda cache between runs
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
# return
|
||||
return concat_sample, gen_sample
|
||||
|
||||
|
Reference in New Issue
Block a user