From 772832eed61cdcc0efc2e0dc55498a0f0d83704d Mon Sep 17 00:00:00 2001 From: arensc Date: Fri, 8 Mar 2024 21:48:08 -0500 Subject: [PATCH] Have to replace base repo because this repo doesn't actually work. --- tts/StyleTTS2Train/README.md | 4 ++++ tts/StyleTTS2Train/train_finetune_accelerate.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tts/StyleTTS2Train/README.md b/tts/StyleTTS2Train/README.md index 99ee66f..1a56fe1 100644 --- a/tts/StyleTTS2Train/README.md +++ b/tts/StyleTTS2Train/README.md @@ -4,6 +4,10 @@ d0ea889aa827b0c87e50ca44b302b030ccaf95e2 https://dagshub.com/StyleTTS/StyleTTS2/commits/main +To run: +accelerate launch --mixed_precision=fp16 --num_processes=1 train_finetune_accelerate.py --config_path ./Configs/config_harness.yml # use your own config but ensure you use train_finetune_accelerate.py + +Should be accessible in our weights and biases account. With a test harness that will be able easily observe the results to weights and biases. Use python 3.10.12 diff --git a/tts/StyleTTS2Train/train_finetune_accelerate.py b/tts/StyleTTS2Train/train_finetune_accelerate.py index 875745c..cf5d69f 100644 --- a/tts/StyleTTS2Train/train_finetune_accelerate.py +++ b/tts/StyleTTS2Train/train_finetune_accelerate.py @@ -741,10 +741,11 @@ def main(config_path): # writer.add_scalar('eval/mel_loss', loss_test / iters_test, epoch + 1) # writer.add_scalar('eval/dur_loss', loss_test / iters_test, epoch + 1) # writer.add_scalar('eval/F0_loss', loss_f / iters_test, epoch + 1) - harness.log_eval(mel_loss=float(loss_test / iters_test),dur_loss=float(loss_test / iters_test),F0_loss=float(loss_f / iters_test),epoch) + harness.log_eval(mel_loss=float(loss_test / iters_test),dur_loss=float(loss_test / iters_test),F0_loss=float(loss_f / iters_test),epoch=epoch) accelerator.log({'eval/mel_loss': float(loss_test / iters_test), 'eval/dur_loss': float(loss_test / iters_test), 'eval/F0_loss': float(loss_f / iters_test)}, step=epoch + 1) + except ZeroDivisionError: accelerator.print("Eval loss was divided by zero... skipping eval cycle")