返回 F5-TTS
F5TTS_Small.yaml
根目录 / src / f5_tts / configs / F5TTS_Small.yaml
1 hydra:
2 run:
3 dir: ckpts/${model.name}_${model.mel_spec.mel_spec_type}_${model.tokenizer}_${datasets.name}/${now:%Y-%m-%d}/${now:%H-%M-%S}
4
5 datasets:
6 name: Emilia_ZH_EN
7 batch_size_per_gpu: 38400 # 8 GPUs, 8 * 38400 = 307200
8 batch_size_type: frame # frame | sample
9 max_samples: 64 # max sequences per batch if use frame-wise batch_size. we set 32 for small models, 64 for base models
10 num_workers: 16
11
12 optim:
13 epochs: 11 # only suitable for Emilia, if you want to train it on LibriTTS, set epoch 686
14 learning_rate: 7.5e-5
15 num_warmup_updates: 20000 # warmup updates
16 grad_accumulation_steps: 1 # note: updates = steps / grad_accumulation_steps
17 max_grad_norm: 1.0 # gradient clipping
18 bnb_optimizer: False # use bnb 8bit AdamW optimizer or not
19
20 model:
21 name: F5TTS_Small
22 tokenizer: pinyin
23 tokenizer_path: null # if 'custom' tokenizer, define the path want to use (should be vocab.txt)
24 backbone: DiT
25 arch:
26 dim: 768
27 depth: 18
28 heads: 12
29 ff_mult: 2
30 text_dim: 512
31 text_mask_padding: False
32 conv_layers: 4
33 pe_attn_head: 1
34 attn_backend: torch # torch | flash_attn
35 attn_mask_enabled: False
36 checkpoint_activations: False # recompute activations and save memory for extra compute
37 mel_spec:
38 target_sample_rate: 24000
39 n_mel_channels: 100
40 hop_length: 256
41 win_length: 1024
42 n_fft: 1024
43 mel_spec_type: vocos # vocos | bigvgan
44 vocoder:
45 is_local: False # use local offline ckpt or not
46 local_path: null # local vocoder path
47
48 ckpts:
49 logger: wandb # wandb | tensorboard | null
50 wandb_project: CFM-TTS # wandb project name
51 wandb_run_name: ${model.name}_${model.mel_spec.mel_spec_type}_${model.tokenizer}_${datasets.name} # wandb run name
52 wandb_resume_id: null # wandb run id for resuming, null to auto-detect from checkpoint
53 log_samples: True # infer random sample per save checkpoint. wip, normal to fail with extra long samples
54 save_per_updates: 50000 # save checkpoint per updates
55 keep_last_n_checkpoints: -1 # -1 to keep all, 0 to not save intermediate, > 0 to keep last N checkpoints
56 last_per_updates: 5000 # save last checkpoint per updates
57 save_dir: ckpts/${model.name}_${model.mel_spec.mel_spec_type}_${model.tokenizer}_${datasets.name}
58
58 lines YAML