From baa7870fa1c443fc62f308c8852a28e9d6097a06 Mon Sep 17 00:00:00 2001 From: Nick Potafiy <155690133+nickpotafiy@users.noreply.github.com> Date: Tue, 30 Jan 2024 01:15:06 -0500 Subject: [PATCH] Update xtts_demo.py Might be a good idea to also pass the checkpoint_dir as xtts.py seems to require speaker_file_path or checkpoint_dir and neither is passed in the demo --- TTS/demos/xtts_ft_demo/xtts_demo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TTS/demos/xtts_ft_demo/xtts_demo.py b/TTS/demos/xtts_ft_demo/xtts_demo.py index ebb11f29d1..f4fe00aa11 100644 --- a/TTS/demos/xtts_ft_demo/xtts_demo.py +++ b/TTS/demos/xtts_ft_demo/xtts_demo.py @@ -33,7 +33,8 @@ def load_model(xtts_checkpoint, xtts_config, xtts_vocab): config.load_json(xtts_config) XTTS_MODEL = Xtts.init_from_config(config) print("Loading XTTS model! ") - XTTS_MODEL.load_checkpoint(config, checkpoint_path=xtts_checkpoint, vocab_path=xtts_vocab, use_deepspeed=False) + xtts_checkpoint_dir = os.path.dirname(xtts_checkpoint) + XTTS_MODEL.load_checkpoint(config, checkpoint_path=xtts_checkpoint, checkpoint_dir=xtts_checkpoint_dir, vocab_path=xtts_vocab, use_deepspeed=False) if torch.cuda.is_available(): XTTS_MODEL.cuda()