Skip to content

Add VibeVoice Realtime TTS export - #728

Open
justinchuby wants to merge 2 commits into
mainfrom
justinchuby-add-vibevoice-realtime-tts
Open

Add VibeVoice Realtime TTS export#728
justinchuby wants to merge 2 commits into
mainfrom
justinchuby-add-vibevoice-realtime-tts

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

  • Adds a source-faithful six-stage Mobius export for microsoft/VibeVoice-Realtime-0.5B at 6bce5f06044837fe6d2c5d7a71a84f0416bd57e4: embedding, the 4-layer lower LM backbone, 20-layer TTS backbone, speech connector, diffusion velocity head, and causal audio decoder.
  • Exposes all KV and 34 causal-convolution states; host code owns 5-token streaming windows, cached voice presets, classifier-free guidance, DPM-Solver, and stopping.
  • Pins the Microsoft reference package source to 79e516a3e20b599f137c9da03410a2a0b473b63b, adds source parity/continuation coverage, full-config validation, processor-contract coverage, exhaustive weight routing, revision-pin protection, and honest runtime metadata.
  • Uses a causal prefix-valid BOOL attention mask, enabling normal CUDA FP16 GQA lowering without arbitrary-mask fusion.

Validation

  • Affected regression suite: 1,117 passed, 278 skipped, 1 xfailed.
  • Focused Realtime config/graph/source-parity/continuation/L2 validation: 14 passed.
  • Full float16 and float32 real-weight exports completed. A Carter cached-prompt, one five-token window with two source DPM-Solver iterations and one causal decode produced 3,200 finite samples (0.133333 s): FP16 CPU 1.915602 s / RTF 14.3670; MLX 0.733651 s / RTF 5.5024, with max CPU/MLX waveform delta 9.536743e-7; FP32 CPU 5.248908 s / RTF 39.3668.

Runtime boundaries

  • This is deliberately host-orchestrated; ORT GenAI configuration fails closed and ONNX GenAI metadata is advisory-only.
  • Native BF16 graph serialization succeeds, but stock ORT 1.29 CPU lacks required BF16 kernels. No CUDA provider was available for runtime performance validation. CoreML loaded the FP16 decoder but profiled no CoreML nodes.
  • The real-weight probe is one latent, not a full six-latent streaming window or L5 golden-generation assertion.

Add source-faithful staged ONNX export for the pinned Microsoft VibeVoice Realtime checkpoint, with explicit cache state, host orchestration metadata, processor contracts, and graph/parity coverage. Reject unsupported ORT GenAI configuration rather than advertising incomplete runtime support.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
@justinchuby
justinchuby requested review from a team and a lite review from Copilot September 4, 2026 17:22
Comment thread src/mobius/models/vibevoice_streaming.py Fixed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing 8c38c063cfe0e9

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0%
bert (feature-extraction) num_nodes 68 68 +0.0%
falcon model_size_bytes 364 KB 364 KB +0.0%
falcon num_nodes 66 66 +0.0%
gemma2 model_size_bytes 428 KB 428 KB +0.0%
gemma2 num_nodes 105 105 +0.0%
gpt2 model_size_bytes 324 KB 324 KB +0.0%
gpt2 num_nodes 54 54 +0.0%
llama model_size_bytes 425 KB 425 KB +0.0%
llama num_nodes 60 60 +0.0%
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0%
llama (static-cache) num_nodes 56 56 +0.0%
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0%
mamba (ssm-text-generation) num_nodes 94 94 +0.0%
phi3 model_size_bytes 421 KB 421 KB +0.0%
phi3 num_nodes 58 58 +0.0%
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0%
phi3 (static-cache) num_nodes 54 54 +0.0%
qwen2 model_size_bytes 425 KB 425 KB +0.0%
qwen2 num_nodes 60 60 +0.0%
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0%
qwen2 (static-cache) num_nodes 56 56 +0.0%
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0%
qwen3_5_moe (hybrid-text-generation) num_nodes 265 265 +0.0%
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0%
qwen3_5_text (hybrid-text-generation) num_nodes 127 127 +0.0%
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0%
qwen3_5_vl (hybrid-qwen-vl) num_nodes 450 450 +0.0%
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0%
t5 (seq2seq) num_nodes 176 176 +0.0%
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0%
whisper (speech-to-text) num_nodes 128 128 +0.0%

No performance regressions.

Comment thread src/mobius/models/vibevoice_streaming.py Fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It introduces a large new multi-stage model/task/config + exporter behavior surface area where correctness depends on nuanced runtime and source-parity constraints that warrants final human review.

Pull request overview

Adds a source-faithful, host-orchestrated multi-stage Mobius export pipeline for VibeVoice Realtime TTS (microsoft/VibeVoice-Realtime-0.5B), wiring it into the registry/build system and ensuring runtime exporters fail-closed (ORT GenAI) or emit advisory-only metadata (ONNX GenAI), with extensive source-parity and contract tests.

Changes:

  • Introduces VibeVoiceStreaming* config/model/task to export six explicit ONNX stages (embedding, LM backbone, TTS backbone, speech connector, diffusion head, audio decoder) with explicit KV + conv-cache I/O.
  • Registers the new architecture/model_type, pins the first Transformers config probe to an immutable revision, and annotates source revision metadata where applicable.
  • Adds L1–L3 test coverage (graph contracts, cache/metadata contracts, CUDA fp16 GQA lowering expectations, source parity + continuation), plus CI requirements and testdata case metadata.
File summaries
File Description
tests/weight_alignment_test.py Excludes vibevoice_streaming from initializer-name identity mapping assumptions.
tests/model_coverage_test.py Marks architecture alias as covered by the new staged VibeVoice Realtime tests.
tests/build_graph/speech_test.py Adds stage expectations for the new vibevoice-streaming-tts task.
tests/_test_configs.py Adds tiny-config overrides for vibevoice_streaming graph-build coverage.
testdata/cases/audio/vibevoice-realtime-0.5b.yaml Adds pinned-case metadata explaining why golden L4/L5 isn’t asserted for host-orchestrated Realtime.
src/mobius/tasks/_vibevoice.py Refactors conv-cache helpers to shared cache utilities.
src/mobius/tasks/_vibevoice_streaming.py New task exporting six Realtime stages and embedding host-protocol metadata in graph properties.
src/mobius/tasks/_cache_utils.py Adds shared helpers for causal-conv cache inputs/outputs.
src/mobius/tasks/init.py Exposes and registers VibeVoiceStreamingTask under vibevoice-streaming-tts.
src/mobius/models/vibevoice.py Extends tokenizer decoder to optionally preserve ratio order (needed by Realtime decoder).
src/mobius/models/vibevoice_streaming.py New staged Realtime model with strict checkpoint weight routing and explicit mask/cache behavior.
src/mobius/models/vibevoice_streaming_test.py New L1–L3 tests: stage graph contracts, cache I/O, metadata, CUDA fp16 GQA lowering, and source parity.
src/mobius/models/init.py Exports VibeVoiceStreamingForConditionalGeneration.
src/mobius/integrations/transformers/_builder.py Pins first config probe for Realtime model ID and tags source revision metadata for vibevoice_streaming.
src/mobius/integrations/transformers/_builder_test.py Tests that “no revision provided” still pins the first config probe for Realtime.
src/mobius/integrations/ort_genai/auto_export.py Fails closed for vibevoice_streaming with an explicit host-orchestration error.
src/mobius/integrations/onnx_genai/auto_export.py Emits advisory-only component contract metadata for vibevoice_streaming.
src/mobius/_registry.py Registers vibevoice_streaming and its architecture-discriminating alias, including pinned model_id/revision.
src/mobius/_configs/vibevoice.py Adds streaming tokenizer/diffusion/config dataclasses, parsing + validation, and torch_dtype-to-dtype resolution.
src/mobius/_configs/init.py Exports the new streaming config types from the configs package.
requirements/ci/vibevoice.txt Pins the Microsoft VibeVoice source package commit for parity tests (installed in CI with --no-deps).
Review details
  • Files reviewed: 21/21 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/mobius/models/vibevoice_streaming_test.py Outdated
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 8c38c063cfe0e9

Model Sub-model Changes Status
bert (feature-extraction) model 0
falcon model 0
gemma2 model 0
gemma4 (gemma4) decoder 0
gemma4 (gemma4) embedding 0
gemma4 (gemma4) vision_encoder 0
gemma4_text model 0
gpt2 model 0
llama model 0
llama (static-cache) model 0
mamba (ssm-text-generation) model 0
phi3 model 0
phi3 (static-cache) model 0
qwen model 0
qwen (static-cache) model 0
qwen2 model 0
qwen2 (static-cache) model 0
qwen2_moe model 0
qwen2_moe (static-cache) model 0
qwen3 model 0
qwen3 (static-cache) model 0
qwen3_5_moe (hybrid-text-generation) model 0
qwen3_5_text (hybrid-text-generation) model 0
qwen3_5_vl (hybrid-qwen-vl) decoder 0
qwen3_5_vl (hybrid-qwen-vl) embedding 0
qwen3_5_vl (hybrid-qwen-vl) vision_encoder 0
qwen3_moe model 0
qwen3_moe (static-cache) model 0
qwen3_next (hybrid-text-generation) model 0
t5 (seq2seq) decoder 0
t5 (seq2seq) encoder 0
whisper (speech-to-text) decoder 0
whisper (speech-to-text) encoder 0

No architecture changes detected.


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

Keep the specialized TTS backbone invocation signature-compatible, record its architecture alias as source-parity covered, and apply the repository formatter.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
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.

3 participants