Repository navigation
Fix PocketTTS streaming quality and speed up PocketTTS decoders - #1291
Merged
Merged
Conversation
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.
Fix PocketTTS streaming audio quality and reduce decoder overhead
Closes #1289.
PocketTTS streaming could reuse Mimi cache storage before the cache update finished, corrupting decoder history. It also retained Mimi state across independent text chunks. The decoder now updates its cache inside the graph and resets at each text-chunk boundary.
CUDA ELU activations now run inside the existing convolution graphs instead of host loops. Graphs remain session-owned and cached. No framework, GGML kernel, weight precision, sampling option or public API changes are included.
CUDA performance
RTX 5090, published English BF16 package, eight threads. Warmed main → PR → PR → main, with three measured requests per workload per block. TTFA is measured at the client’s first audio event.
Maximum sampled process peak VRAM was 1,334 MiB for both main and PR, sampled every 20 ms.
Correctness and other backends
Short warmed CPU/Vulkan checks showed no large performance regression:
CPU output was byte-identical to main. Corrected Vulkan streaming output matched its offline reference at 0.999991 cosine. These are short checks, not extensive performance validation.
PocketTTS Small
Published F32 packages, RTX 5090, eight threads, warmed main → PR → PR → main with three measured requests per workload per block.
Process peak VRAM was unchanged: 1,294 MiB for 2M, 1,336 MiB for 7M and 1,432 MiB for 18M, including ReFL variants. TTFA was unchanged or improved.
All 24 offline/streaming waveform comparisons passed with minimum cosine 0.99999997. Another 36 comparisons with matching request histories passed at the same level. Short→long→short reuse already changes repeated outputs on main; the PR matches main under the same history rather than introducing a new difference.
Short warmed 18M CPU/Vulkan checks produced byte-identical outputs. CPU RTF was 0.06801 → 0.06898; Vulkan RTF was 0.05353 → 0.05091. These are targeted checks, not broad backend performance claims.