From f14b80f6b42a0d0891718eb6284336b1694795cf Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 2 Sep 2026 18:20:14 -0400 Subject: fix: ZONOS2 only generating 1024 tokens max --- app/converter/clients/sglomni.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/converter') diff --git a/app/converter/clients/sglomni.py b/app/converter/clients/sglomni.py index 8484aba..d4b756f 100644 --- a/app/converter/clients/sglomni.py +++ b/app/converter/clients/sglomni.py @@ -274,6 +274,12 @@ class SgOmniTTSClient(BaseTTSClient): } if self._seed is not None: payload["seed"] = self._seed + if entry.max_new_tokens is not None: + # Models whose engine caps a request below what a full + # sub-chunk can narrate (Zonos2's 1024-frame default is ~12 s): + # raise the ceiling per request. Generation still stops at + # natural EOS, so an unused margin costs nothing. + payload["max_new_tokens"] = entry.max_new_tokens if entry.capability == "design": payload["task_type"] = "VoiceDesign" payload["instructions"] = self.instructions -- cgit v1.2.3