Skip to content

[TTS][Magpietts] Added CFG distillation#15568

Merged
blisc merged 1 commit intomainfrom
magpietts_online_cfg_distillation
Apr 8, 2026
Merged

[TTS][Magpietts] Added CFG distillation#15568
blisc merged 1 commit intomainfrom
magpietts_online_cfg_distillation

Conversation

@artem-gorodetskii
Copy link
Copy Markdown
Collaborator

@artem-gorodetskii artem-gorodetskii commented Mar 31, 2026

Summary

This PR adds support for online classifier-free guidance (CFG) distillation for MagpieTTS.

What’s included

  • Added a new OnlineCFGDistillation model that extends MagpieTTSModel for online CFG distillation training.
  • Added MagpieTTS distillation loss implementations, including KL-divergence, cross-entropy, and normalized RMSE losses.
  • Added a new training mode, online_cfg_distillation_train, to examples/tts/magpietts.py.

Training flow

  • Teacher model is loaded from checkpoint and frozen.
  • Teacher performs autoregressive CFG rollout generation.
  • Generated rollout is fed into the student in teacher-forced mode.
  • The student is optimized using a weighted combination of KL-divergence, cross-entropy, normalized RMSE, and optional MoE loss.

@artem-gorodetskii artem-gorodetskii force-pushed the magpietts_online_cfg_distillation branch 4 times, most recently from 199e69e to 6500845 Compare March 31, 2026 15:19
@artem-gorodetskii artem-gorodetskii self-assigned this Mar 31, 2026
@artem-gorodetskii artem-gorodetskii force-pushed the magpietts_online_cfg_distillation branch 2 times, most recently from 6fabaa8 to d7efe7d Compare April 3, 2026 10:57
@github-actions github-actions bot added the CI label Apr 3, 2026
@artem-gorodetskii artem-gorodetskii force-pushed the magpietts_online_cfg_distillation branch 6 times, most recently from 5f08f95 to 7f473d8 Compare April 3, 2026 16:49
@artem-gorodetskii artem-gorodetskii force-pushed the magpietts_online_cfg_distillation branch 2 times, most recently from fb99834 to e086680 Compare April 4, 2026 11:03
@artem-gorodetskii artem-gorodetskii force-pushed the magpietts_online_cfg_distillation branch from e086680 to 0538e53 Compare April 6, 2026 09:51
@blisc blisc added the Run CICD label Apr 6, 2026
blisc
blisc previously approved these changes Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

[🤖]: Hi @artem-gorodetskii 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

@artem-gorodetskii artem-gorodetskii force-pushed the magpietts_online_cfg_distillation branch 2 times, most recently from ba4bb04 to e5584d0 Compare April 7, 2026 10:04
@artem-gorodetskii artem-gorodetskii requested a review from blisc April 7, 2026 11:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

[🤖]: Hi @artem-gorodetskii 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

[🤖]: Hi @artem-gorodetskii 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

@blisc blisc merged commit 10e1597 into main Apr 8, 2026
133 checks passed
@blisc blisc deleted the magpietts_online_cfg_distillation branch April 8, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants