diff options
Diffstat (limited to 'app/backends/sglomni/catalog.py')
| -rw-r--r-- | app/backends/sglomni/catalog.py | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/app/backends/sglomni/catalog.py b/app/backends/sglomni/catalog.py index 1e4ca2d..160eb8b 100644 --- a/app/backends/sglomni/catalog.py +++ b/app/backends/sglomni/catalog.py @@ -69,11 +69,20 @@ class ModelEntry: # 86.13 fps, ~12 s) and Higgs's to 2048 frames (75 fps, ~27 s, and # per-request values are clamped to the engine cap, so its vendored # config raises the cap too) — and silently truncate longer text. - # 12288 frames covers a full 250-word CHUNK_SIZE sub-chunk on both and - # stays under the KV-pool admission check on every GPU that can host - # the model (the scheduler rejects prompt + max_new_tokens above it, - # and these requests are not auto-clamped). + # 12288 frames covers a full 250-word CHUNK_SIZE sub-chunk on ZONOS2 + # (whose KV pools are >= 28083 tokens on every GPU that can host it) + # but NOT on Higgs: its thinker engine pins context_length at 4096, + # and the scheduler rejects any request whose prompt tokens plus + # max_new_tokens exceed that window (kv_capacity=4095, on every GPU — + # the pool side is never the binding constraint there). max_new_tokens: Optional[int] = None + # The largest sub-request (words) the model can narrate within its + # admission window, for models whose engine cannot cover a full + # CHUNK_SIZE sub-chunk (None = no cap; config.CHUNK_SIZE stands). + # Higgs: 3000 frames ≈ 40 s at 75 fps ≈ 80 words of narration, and + # the run pre-flight offers to clamp CHUNK_SIZE for the run (the + # client's adaptive retry still rescues requests the window rejects). + chunk_words: Optional[int] = None # The Qwen3-TTS CustomVoice speaker table — the same built-in speakers the @@ -177,9 +186,18 @@ ENTRIES: Tuple[ModelEntry, ...] = ( requires_reference=False, # The engine's 2048-frame default is ~27 s of speech at the codec's # 75 fps; requests are clamped to the engine cap server-side, so the - # yaml raises the cap and every request carries 12288 frames - # (~164 s) — enough for a full CHUNK_SIZE sub-chunk. - max_new_tokens=12288, + # yaml raises the cap and every request carries 3000 frames (~40 s) + # — the most the admission window allows: upstream pins the thinker + # engine's context_length at 4096, and the scheduler rejects any + # request whose prompt (including the reference-audio tokens) plus + # max_new_tokens exceeds it. 3000 frames leaves ~1095 tokens of + # prompt headroom (an 80-word chunk with a 20.5 s reference + # measured 684). Sub-requests cap at 80 words so the text fits the + # window too — the pre-flight offers to clamp CHUNK_SIZE for the + # run, and the client refits rejected requests to whatever the + # server reports as its capacity. + max_new_tokens=3000, + chunk_words=80, notes="zero-shot narration, cloning from a reference clip", ), ModelEntry( |
