Skip to content

Commit cbdbc44

Browse files
authored
Fix XTTS v2.0 training recipe (coqui-ai#3154)
* Fix XTTS v2.0 training recipe * Update XTTS v2 model hash
1 parent 5e992d8 commit cbdbc44

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

TTS/.models.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"https://coqui.gateway.scarf.sh/hf-coqui/XTTS-v2/main/vocab.json",
1111
"https://coqui.gateway.scarf.sh/hf-coqui/XTTS-v2/main/hash.md5"
1212
],
13-
"model_hash": "ae9e4b39e095fd5728fe7f7931eccoqui",
13+
"model_hash": "6a09d1ad43896f06041ed8195956c9698f13b6189dc80f1c74bdc2b8e8d15324",
1414
"default_vocoder": null,
1515
"commit": "480a6cdf7",
1616
"license": "CPML",

recipes/ljspeech/xtts_v2/train_gpt_xtts.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@
4040
os.makedirs(CHECKPOINTS_OUT_PATH, exist_ok=True)
4141

4242

43-
# ToDo: update DVAE checkpoint
4443
# DVAE files
45-
DVAE_CHECKPOINT_LINK = "https://coqui.gateway.scarf.sh/hf-coqui/XTTS-v1/v1.1.1/dvae.pth"
46-
MEL_NORM_LINK = "https://coqui.gateway.scarf.sh/hf-coqui/XTTS-v1/v1.1.1/mel_stats.pth"
44+
DVAE_CHECKPOINT_LINK = "https://coqui.gateway.scarf.sh/hf-coqui/XTTS-v2/main/dvae.pth"
45+
MEL_NORM_LINK = "https://coqui.gateway.scarf.sh/hf-coqui/XTTS-v2/main/mel_stats.pth"
4746

4847
# Set the path to the downloaded files
49-
DVAE_CHECKPOINT = os.path.join(CHECKPOINTS_OUT_PATH, DVAE_CHECKPOINT_LINK.split("/")[-1])
50-
MEL_NORM_FILE = os.path.join(CHECKPOINTS_OUT_PATH, MEL_NORM_LINK.split("/")[-1])
48+
DVAE_CHECKPOINT = os.path.join(CHECKPOINTS_OUT_PATH, os.path.basename(DVAE_CHECKPOINT_LINK))
49+
MEL_NORM_FILE = os.path.join(CHECKPOINTS_OUT_PATH, os.path.basename(MEL_NORM_LINK))
5150

5251
# download DVAE files if needed
5352
if not os.path.isfile(DVAE_CHECKPOINT) or not os.path.isfile(MEL_NORM_FILE):
@@ -90,9 +89,9 @@ def main():
9089
dvae_checkpoint=DVAE_CHECKPOINT,
9190
xtts_checkpoint=XTTS_CHECKPOINT, # checkpoint path of the model that you want to fine-tune
9291
tokenizer_file=TOKENIZER_FILE,
93-
gpt_num_audio_tokens=1024,
94-
gpt_start_audio_token=1025,
95-
gpt_stop_audio_token=1026,
92+
gpt_num_audio_tokens=1026,
93+
gpt_start_audio_token=1024,
94+
gpt_stop_audio_token=1025,
9695
gpt_use_masking_gt_prompt_approach=True,
9796
gpt_use_perceiver_resampler=True,
9897
)

0 commit comments

Comments
 (0)