This commit is contained in:
tuna2134
2026-07-20 21:08:44 +09:00
parent 66de777e06
commit 0c2be00f0a
16 changed files with 439 additions and 7 deletions

24
docs/MATCHA_FLOW.md Normal file
View File

@@ -0,0 +1,24 @@
# Matcha flow integration
Style-Bert-VITS2 can optionally generate its aligned prior latent with a
Matcha-TTS-inspired conditional flow matching (CFM) decoder. The existing
BERT/style encoder, duration predictors, VITS normalizing flow, and waveform
generator are retained.
Set `model.use_matcha` to `true` for a newly trained or fine-tuned model. The
template configurations enable it. Models whose configuration does not contain
this key continue to use the original Gaussian prior sampling path.
Relevant settings:
- `train.c_matcha`: weight of the CFM velocity loss.
- `model.matcha_channels`: U-Net hidden width.
- `model.matcha_num_heads`: attention head count.
- `model.matcha_dropout`: transformer dropout.
- `model.matcha_sigma_min`: minimum flow path noise.
- `model.matcha_n_timesteps`: Euler steps at inference; more steps trade speed
for refinement quality.
The Matcha branch has new parameters, so enabling it on an existing checkpoint
requires fine-tuning before inference. It is trained on the same random latent
segments used by the waveform generator to keep memory use bounded.