[Bugfix] Honor request seed in MOSS-TTS adapters (#6543)

Signed-off-by: JiataiWang <wangjiatai@proton.me>
This commit is contained in:
Jiatai Wang authored and GitHub committed 2026-08-28 22:44:13 -07:00
1 parent 457c6e2793
commit f66f05633c
2 files changed
+50 -3

No files matched your search

@@ -1,4 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""MOSS-TTS serving adapters (Nano + full family).
Both variants share the same build/validate flow (``_build_moss_tts_params``
@@ -97,9 +98,13 @@ class _MossTTSAdapterBase(ARTTSAdapter):
if voice_lower in server.uploaded_speakers and not has_inline_ref_audio:
tts_params["voice_name"] = [voice_lower]
tts_params["voice_created_at"] = [server._voice_created_at(voice_lower)]
# MOSS reads the resolved seed at build time (it samples internally).
if sampling_params_list and getattr(sampling_params_list[0], "seed", None) is not None:
tts_params["seed"] = [sampling_params_list[0].seed]
# MOSS samples internally from additional_information. build() runs
# before the shared path applies request.seed to SamplingParams.
seed = request.seed
if seed is None and sampling_params_list:
seed = getattr(sampling_params_list[0], "seed", None)
if seed is not None:
tts_params["seed"] = [int(seed)]
if isinstance(tts_params.get("prompt_token_ids"), list):
prompt_token_ids = tts_params.pop("prompt_token_ids")
prompt = tokens_input(prompt_token_ids=prompt_token_ids)