mirror of https://github.com/coqui-ai/TTS.git
Delete trainer to freeze memory
This commit is contained in:
parent
5dd217a759
commit
eb18b27afc
|
@ -162,7 +162,9 @@ def train_gpt(language, num_epochs, batch_size, grad_acumm, train_csv, eval_csv,
|
||||||
longest_text_idx = samples_len.index(max(samples_len))
|
longest_text_idx = samples_len.index(max(samples_len))
|
||||||
speaker_ref = train_samples[longest_text_idx]["audio_file"]
|
speaker_ref = train_samples[longest_text_idx]["audio_file"]
|
||||||
|
|
||||||
# deallocate VRAM
|
trainer_out_path = trainer.output_path
|
||||||
del model
|
|
||||||
|
|
||||||
return XTTS_CONFIG_FILE, XTTS_CHECKPOINT, TOKENIZER_FILE, trainer.output_path, speaker_ref
|
# deallocate VRAM
|
||||||
|
del model, trainer
|
||||||
|
|
||||||
|
return XTTS_CONFIG_FILE, XTTS_CHECKPOINT, TOKENIZER_FILE, trainer_out_path, speaker_ref
|
||||||
|
|
Loading…
Reference in New Issue