Skip to content

DES-009: the TTS image builds from our fork until upstream takes the leak fix - #16

Merged
secretzer0 merged 3 commits into
mainfrom
fix/tts-builds-from-the-fork
Aug 16, 2026
Merged

DES-009: the TTS image builds from our fork until upstream takes the leak fix#16
secretzer0 merged 3 commits into
mainfrom
fix/tts-builds-from-the-fork

Conversation

@secretzer0

Copy link
Copy Markdown
Owner

Operator's call: build the TTS image from secretzer0/Chatterbox-TTS-Server@09a22c75 (upstream 915ae289 + one line: torch.inference_mode around generate) so the image we run does not leak ~200 MB of VRAM per distinct voice. Upstream PR: devnen/Chatterbox-TTS-Server#166 -- pin moves back to devnen when it merges.

Evidence (RTX 4070 8 GB, cu128 image): unguarded, 6 voices +1341 MB allocated with embedding.grad_fn set; guarded, +1 MB. Patched server: 21 clones + 5 predefined + long text, 4414 -> 5256 MB and flat.

docker/tts.upstream is the only input; TTS_IMAGE 0.2.0 -> 0.2.1 (image-pin-check pairs them). Publish will build 0.2.1 cold from the fork SHA on merge. Merge deploys nothing; the voices profile stays down on the VM until the GPU carve-out.

secretzer0 added 3 commits August 15, 2026 22:10
…leak fix

docker/tts.upstream moves to secretzer0/Chatterbox-TTS-Server@09a22c75 --
upstream main plus one line, torch.inference_mode around generate. Without
it their conds cache pins ~200 MB of autograd graph per distinct voice
(measured: 6 voices +1341 MB, guarded +1 MB; ~20 voices OOMed an 8 GB card
at 7.39 GiB allocated). Upstream PR devnen/Chatterbox-TTS-Server#166 carries
the same line; the pin returns to upstream when it merges. TTS_IMAGE 0.2.1.
…chunks)

Cherry-picked upstream PR #156 (three commits, authorship kept) onto the fork:
markdown divider lines (---, ***, ___) become paragraph breaks in
chunk_text_by_sentences, so a bus message full of "---" no longer glues into
one chunk; an optional hard-limit fallback stays off by default. Their
regression test passes in the image. Our #166 was closed as a duplicate of
upstream #164 (same line); the fork's guard commit is that line. Pin moves to
the new fork head; TTS_IMAGE stays 0.2.1 (unpublished).
…rbo in one pass

Vetted on an RTX 4070, same 6-chunk message, both paths warmed, 3 runs each:
sequential 6.42s, batched (4) 3.79s, batched (8) 3.28s -- 1.7x / 1.96x, the
author's claim holds. Cherry-picked #160 (LRU conds cache, its dependency) and
#161's two commits with authorship kept, plus one fork commit guarding the
batched path with inference_mode: 12 new voices through it grew VRAM 190 MB
unguarded, 6 MB guarded, speed unchanged, zero fallbacks. Seeded requests and
non-turbo models fall back to the sequential path by construction. Compose
sets TTS_BATCH_SIZE=8 for the 12 GB target. Pin moves to fork head 56e59fc.
@secretzer0
secretzer0 merged commit 11d8fe3 into main Aug 16, 2026
1 check passed
@secretzer0
secretzer0 deleted the fix/tts-builds-from-the-fork branch August 16, 2026 03:26
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