blob: 8a42771eb6d979707db3bd137ed7ce7d13b99671 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# Higgs Audio v3 TTS with VRAM headroom and a raised generation cap.
#
# The upstream default pipeline (HiggsTtsPipelineConfig) budgets VRAM as
# gpu_memory_fraction 0.85 (tts_engine) + 0.10 (vocoder) + 0.03
# (audio_encoder) = 0.98 of the card. The engine's static pool then fills
# ~85% of a 24 GB GPU by itself (sglang mem_fraction_static = 0.85), and any
# other VRAM consumer on the card (desktop, browsers) leaves too little room
# for transient allocations: the first /v1/audio/speech request aborts with
# "CUDA out of memory. Tried to allocate 14.00 MiB".
#
# 0.80 trims the engine's static pool by ~1.2 GB per 24 GB of VRAM while
# leaving a KV cache pool far larger than any narration request needs.
# Cards with heavy other-GPU-process usage can go lower (e.g. 0.75).
#
# The tts_engine factory also caps every request at max_new_tokens=2048
# audio frames, and per-request values are clamped to that cap server-side
# (make_higgs_scheduler_adapters) — the Higgs codec runs 75 frames per
# second (24 kHz / 320 downsample), so the default is ~27 s of speech, which
# silently truncates this tool's full 250-word sub-chunks (~100 s). Raising
# the factory cap is the only way past it, but the ceiling is hard: upstream
# pins the thinker engine's context_length at 4096 (HiggsTtsEngineBuilder —
# not overridable), and the scheduler rejects any request whose prompt
# tokens (including the reference-audio tokens) plus max_new_tokens exceed
# that window ("Request requires more tokens than the thinker KV cache can
# hold", kv_capacity=4095, on every GPU). The cap therefore lands at 3000
# frames ≈ 40 s — the most the window allows with prompt headroom (an
# 80-word chunk with a 20.5 s reference measured 684 prompt tokens) — and
# the catalog caps sub-requests at 80 words to match (chunk_words).
config_cls: HiggsTtsPipelineConfig
model_path: bosonai/higgs-audio-v3-tts-4b
stages:
tts_engine:
gpu_memory_fraction: 0.80
factory:
max_new_tokens: 3000
|