Repository navigation
Consolidate PocketTTS Small Mimi decoding and reduce inference overhead - #1318
Merged
Merged
Conversation
Keep PocketTTS unchanged. The Small-only refactor builds successfully; regression validation of the final scoped changes remains pending.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PocketTTS Small's decoder previously submitted separate convolution graphs and moved intermediate results through the host. Replace that execution with a session-owned framework
MimiLatentDecoderRuntime, reusing existing convolution, transformer and graph-management modules.Default offline blocks and streaming execute the complete decoder block in one cached graph per mode, with persistent KV and convolution state. CUDA full-sequence decoding retains its single graph; CPU full-sequence decoding uses three coarse, bounded stages. Model-specific latent normalization, fades and text-chunk resets remain in the session.
No GGML kernel changes, shared-module math changes, precision changes or public-option changes. Original PocketTTS and existing Mimi codec callers are unchanged.
Performance
Main versus this PR, sequential warmed A→B→B→A, eight threads, matching published F32 packages. Each block has two excluded warmups and 15 measured requests. CUDA: RTX 5090; CPU: Ryzen 9 7900X. Debug builds on both sides.
Across all six variants, default offline/streaming RTF is 27–33% lower on CUDA and 9–16% lower on CPU, with gains in both run orders.
Representative 18M results:
Warmed 18M streaming TTFA, using the same A→B→B→A runs and eight threads (cold-start time excluded):
Process memory is sampled every 20 ms.
Explicit full-sequence CUDA performance and VRAM remain effectively unchanged. CPU full-sequence RTF improves by 8–15% for the two distinct decoder configurations; 18M peak RSS decreases from 966.1 to 540.7 MiB.
Correctness and lifecycle