From 6df57c5ba8e0b5307cb16edc639af5b103da57f2 Mon Sep 17 00:00:00 2001 From: Sy03 <1370724210@qq.com> Date: Sat, 3 Oct 2026 01:08:33 +0800 Subject: [PATCH] [Bugfix] Clamp CosyVoice3 offline minimum to its output budget Signed-off-by: Sy03 <1370724210@qq.com> --- .../offline_inference/text_to_speech/cosyvoice3/end2end.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/offline_inference/text_to_speech/cosyvoice3/end2end.py b/examples/offline_inference/text_to_speech/cosyvoice3/end2end.py index 3d1f6bd7e..4228b6fd9 100644 --- a/examples/offline_inference/text_to_speech/cosyvoice3/end2end.py +++ b/examples/offline_inference/text_to_speech/cosyvoice3/end2end.py @@ -147,8 +147,8 @@ def run_e2e(): # Keep the deploy profile's sampling policy, penalties and required stops. sampling_params_list = copy.deepcopy(omni.default_sampling_params_list) - sampling_params_list[0].min_tokens = max(1, min_len) - sampling_params_list[0].max_tokens = min(2048, max_len) + sampling_params_list[0].max_tokens = max(1, min(2048, max_len)) + sampling_params_list[0].min_tokens = min(max(1, min_len), sampling_params_list[0].max_tokens) profiler_enabled = args.profiler_config is not None if profiler_enabled: