Skip to content

Fix PocketTTS decoder lifetimes across chunk and session reuse - #1314

Merged
0xShug0 merged 2 commits into
mainfrom
fix/pocket-tts-vulkan-robotic-voice-1310
Nov 16, 2026
Merged

0xShug0 merged 2 commits into
mainfrom
fix/pocket-tts-vulkan-robotic-voice-1310

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

PocketTTS can overwrite Mimi decoder constants when reusing a graph across text chunks, producing quieter, altered speech after the first chunk. Preserve the offline decoder constants and streaming transformer inputs/constants across graph executions.

The fix is confined to PocketTTS tensor-lifetime flags and a gated real-weight lifecycle test. It retains the existing streaming quality and chunk-reset fixes. Graph math, precision, sampling, defaults, PocketTTS Small, shared framework code and GGML are unchanged. The separate capture-cache cleanup calls have been removed.

Validation against main 87a2fadfc, using Debug builds, the English BF16 package, eight server threads and sequential warmed A→B→B→A blocks:

Backend Mode Main RTF PR RTF
CUDA Offline 0.00985 0.00987
CUDA Streaming 0.02441 0.02401
Vulkan Offline 0.01711 0.01688
Vulkan Streaming 0.05727 0.05763
CPU Offline 0.17418 0.17380
CPU Streaming 0.19922 0.19740

Each row has 30 measured requests per condition. CUDA offline was additionally confirmed in reverse order with 60 requests per condition; its table row uses that confirmation. No CPU performance regression was observed.

Streaming TTFA Main PR
CUDA 5.69 ms 5.68 ms
Vulkan 14.89 ms 15.27 ms
CPU 28.15 ms 27.67 ms

Process peak VRAM for the warmed workload: CUDA offline 1,150 → 1,150 MiB, CUDA streaming 1,068 → 1,068 MiB, Vulkan offline 536.84 → 536.84 MiB, Vulkan streaming 413.66 → 413.72 MiB. CPU peak RSS was essentially unchanged.

Correctness and lifecycle:

  • Reproduced [Pocket TTS 100M BF16] Low probability that offline gneration results in robotic voice #1310 on current main with eight identical text chunks: later-chunk RMS drops from 0.119 to approximately 0.065. With the fix, all eight chunks match fresh decoding exactly.
  • All 360 measured normal-path WAV/PCM outputs in the full six-row A/B matrix are byte-identical to main.
  • Real-weight decoder lifecycle tests pass on CUDA, Vulkan and CPU BF16, plus Vulkan Q8: changed/restored inputs, frame-count changes, streaming resets and cache recreation.
  • Eighteen long outputs of 70.6–86 seconds cover both modes on all three backends, long/short reuse, cloning and preset restoration. Restored-preset outputs are byte-identical. No long silence or clipping was detected. English lifecycle outputs have 0% ASR WER; diarization reports one speaker in every checked clip. Minimum long-clip start/end CAM++ cosine is 0.896.
  • The Pocket TTS streaming bad sound quality #1289 cloning prompt and temperature setting preserve current-main output in both modes; offline and streaming waveform cosine is 0.999764. The reporter’s reference was unavailable, so a repository reference recording was used.
  • French generation succeeds on all three backends in both modes. A sentence longer than 50 characters remains one streaming chunk, retaining the chunking behavior relevant to Pocket TTS: *_24l models fail to load, and streaming cuts every sentence at 50 characters (fixes included) #668. The available French package has six transformer layers; the separate 24-layer checkpoint was not tested.

The reporter’s exact #1310 request/reference was unavailable; the deterministic reproducer demonstrates the same altered/quiet speech symptom. Intel/Adreno-specific Vulkan limits and forced-OOM recovery were not validated. Automated checks cannot rule out every rare audible artifact.

Fixes #1310.

@0xShug0
0xShug0 force-pushed the fix/pocket-tts-vulkan-robotic-voice-1310 branch from f7a3feb to c3d1672 Compare November 16, 2026 22:33
@0xShug0
0xShug0 merged commit 71b620d into main Nov 16, 2026
7 checks passed
@0xShug0
0xShug0 deleted the fix/pocket-tts-vulkan-robotic-voice-1310 branch November 16, 2026 22:53
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.

[Pocket TTS 100M BF16] Low probability that offline gneration results in robotic voice

1 participant