Skip to content

Support MOSS-TTSD v0.7 fused with codec#6

Merged
CloudRipple merged 1 commit intomainfrom
moss-ttsd-v0.7-with-xy
Mar 12, 2026
Merged

Support MOSS-TTSD v0.7 fused with codec#6
CloudRipple merged 1 commit intomainfrom
moss-ttsd-v0.7-with-xy

Conversation

@CloudRipple
Copy link
Collaborator

Motivation

This pull request introduces support for multi-channel audio generation models, specifically adding configuration and runtime changes for Moss-TTSD-With-Codec. Key enhancements include new model configuration, improved handling of multi-channel input/output, and sampler logic updates to support multi-channel generation. The changes are grouped below by theme:

Modifications

Multi-channel audio model support:

  • Added MossTTSDWithCodecConfig in python/sglang/srt/configs/moss_ttsd_with_codec.py and registered it in python/sglang/srt/configs/__init__.py to support Moss-TTSD-With-Codec audio generation models. [1] [2] [3]
  • Introduced _init_channels method and related logic in ModelConfig to normalize and handle multi-channel metadata from model configs (channels or n_vq). [1] [2]
  • Added is_audio_gen_model utility and detection logic for audio generation models, updating model type checks and health endpoints. [1] [2] [3]

Input/output handling for multi-channel models:

  • Updated generate API in engine.py to accept nested lists for input_ids and propagate multi_channel flag. [1] [2]
  • Enhanced replay logic in NPU graph runner to handle lists of outputs for multi-channel inference.

Sampler logic improvements:

  • Introduced MultiChannelSampler class in sampler.py to handle sampling for multi-channel logits, and updated create_sampler to select the appropriate sampler based on multi_channel flag. [1] [2]
  • Modified LogitsProcessor and its buffer copying logic to handle per-channel vocab sizes and output slicing for multi-channel models. [1] [2]

Miscellaneous:

  • Minor import fix in sampler.py and added tempfile import in detokenizer_manager.py. [1] [2]

Accuracy Tests

Checklist

@CloudRipple CloudRipple marked this pull request as draft March 7, 2026 06:38
@CloudRipple CloudRipple marked this pull request as ready for review March 12, 2026 13:17
@CloudRipple CloudRipple merged commit 25462a2 into main Mar 12, 2026
54 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant