Merge #16230 to main by blisc · Pull Request #16382 · NVIDIA-NeMo/Speech · GitHub
Skip to content

Merge #16230 to main - #16382

Open
blisc wants to merge 5 commits into
mainfrom
tts-online-po
Open

blisc wants to merge 5 commits into
mainfrom
tts-online-po

Conversation

@blisc

@blisc blisc commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Bring predicted-phoneme online preference optimization from #16230 to main. Reuse the sampled phoneme trajectory during teacher forcing and optimize it jointly with audio using a configurable loss weight.

Generated and reference reward WAVs previously remained in temporary storage after scoring. With save_reward_audios=False, each reward call now owns a unique temporary directory and removes its files when it returns or raises. Saved-audio mode retains its existing behavior.

Collection: TTS

Changelog

  • Add independent phoneme sampling temperature/top-k controls and predicted-phoneme PO loss.
  • Preserve sampled trajectories for teacher-forced likelihood computation and avoid NaNs from padded actions.
  • Adjust optimizer groups and report audio/phoneme loss diagnostics.
  • Validate fresh online PO runs before fitting.
  • Clean up temporary reward artifacts after each call, including failures during writing, ASR, or UTMOS scoring.
  • Document these options and add cleanup regression tests.

Usage

Set model.save_reward_audios=false for per-call cleanup. For predicted-phoneme PO, configure:

model:
  phoneme_po_loss_weight: 1.0
  inference_phoneme_sampling_method: sample
  inference_phoneme_temperature: 0.7
  inference_phoneme_topk: 80
  phoneme_confidence_unk_threshold: 0.0

Additional information

Source PR: #16230, plus the requested per-iteration artifact cleanup. The objective, CFG, codec batching, curriculum, and reward-ASR changes introduced by #16301 are kept in the subsequent tts-reward-asr PR.

shehzeen and others added 2 commits October 14, 2026 10:58
* dont save audios on disk

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Train predicted phonemes with GRPO

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Prevent NaNs in phoneme GRPO masking

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Decouple phoneme rollout sampling

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Match audio rollout likelihood in GRPO

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Disable top-k for configured GRPO rollouts

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Simplify phoneme sampling for GRPO

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

* Revert "Simplify phoneme sampling for GRPO"

This reverts commit a40dc17.

* Remove local GRPO unit tests

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>

---------

Signed-off-by: Shehzeen Hussain <shehzeenh@nvidia.com>
(cherry picked from commit d0b2f63)
Signed-off-by: Jason <jasoli@nvidia.com>
Signed-off-by: Jason <jasoli@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

def _remove_directory(directory: str) -> None:
try:
shutil.rmtree(directory)
except FileNotFoundError:
blisc added 2 commits October 19, 2026 16:02
…ures

Signed-off-by: Jason <jasoli@nvidia.com>
…outputs

Signed-off-by: Jason <jasoli@nvidia.com>
Comment on lines +470 to +471
if not self.cfg.get('save_reward_audios', True):
raise RuntimeError('Reward audio saving is disabled.')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shehzeen: Assuming this works, should we strip out all saving to disk functionality from this class?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we preserve the previous UTMOS preprocessing behavior here? process_directory() called upstream model.predict(), which defaults to remove_silent_section=True. The new direct get_dataset() path bypasses that override and appears to leave silence removal disabled, changing the MOS reward for generations with leading/trailing pauses.

This branch has not been deployed

No deployments
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.

3 participants