From 2c157fb670598cf5a88e74304a9a93aef861569e Mon Sep 17 00:00:00 2001 From: Sy03 <1370724210@qq.com> Date: Tue, 25 Aug 2026 02:34:57 +0800 Subject: [PATCH] [Perf][Qwen3-TTS] Enable chunk ramp by default Signed-off-by: Sy03 <1370724210@qq.com> --- tests/config/test_config_factory.py | 12 ++++++++++++ vllm_omni/deploy/qwen3_tts.yaml | 13 +++++++------ vllm_omni/deploy/qwen3_tts_high_concurrency.yaml | 13 +++++++------ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/tests/config/test_config_factory.py b/tests/config/test_config_factory.py index 374a6d212..1c69b21ad 100644 --- a/tests/config/test_config_factory.py +++ b/tests/config/test_config_factory.py @@ -1854,6 +1854,18 @@ class TestQwen3TTSPipeline: # Stage 1 uses its per-stage override assert stages[1].yaml_engine_args["model_arch"] == "Qwen3TTSCode2Wav" + @pytest.mark.parametrize( + "deploy_name", + ["qwen3_tts.yaml", "qwen3_tts_high_concurrency.yaml"], + ) + def test_default_async_deploy_enables_chunk_ramp(self, deploy_name): + deploy = load_deploy_config(Path(get_deploy_config_path(deploy_name))) + + assert deploy.async_chunk is True + assert deploy.connectors is not None + extra = deploy.connectors["connector_of_shared_memory"]["extra"] + assert extra["codec_chunk_ramp"] == [4, 4, 8, 16, 25] + def test_subtalker_sampling_params_deep_merge_preserves_base_keys(self): """Verify subtalker sampling params participate in stage deep-merge.""" base = { diff --git a/vllm_omni/deploy/qwen3_tts.yaml b/vllm_omni/deploy/qwen3_tts.yaml index 58b191f77..cd0f7c480 100644 --- a/vllm_omni/deploy/qwen3_tts.yaml +++ b/vllm_omni/deploy/qwen3_tts.yaml @@ -26,13 +26,14 @@ connectors: codec_left_context_frames: 72 # Emit only the first audio chunk early, then return to codec_chunk_frames. initial_codec_chunk_frames: 1 - # Chunk ramp (opt-in): gradual size increase for first N chunks to - # eliminate the IC→steady cliff (1→25). Uncomment to enable. + # Gradual size increase for the first N chunks eliminates the + # IC-to-steady cliff (1->25) and improves streaming continuity. # Each entry is the size of that chunk index; indices past the table - # fall back to codec_chunk_frames. When enabled, ramp overrides - # initial_codec_chunk_frames (including the per-request API field). - # Example: - # codec_chunk_ramp: [4, 4, 8, 16, 25] + # fall back to codec_chunk_frames. Ramp overrides + # initial_codec_chunk_frames, including the per-request API field. + # Set this to null in a deployment overlay to restore the legacy + # initial_codec_chunk_frames behavior. + codec_chunk_ramp: [4, 4, 8, 16, 25] # Decoder CUDA Graph sizing: # * async_chunk=true derives all stateful ICL/xvec shapes from # codec_chunk_ramp when enabled, otherwise from diff --git a/vllm_omni/deploy/qwen3_tts_high_concurrency.yaml b/vllm_omni/deploy/qwen3_tts_high_concurrency.yaml index ff086beb5..8129df166 100644 --- a/vllm_omni/deploy/qwen3_tts_high_concurrency.yaml +++ b/vllm_omni/deploy/qwen3_tts_high_concurrency.yaml @@ -31,13 +31,14 @@ connectors: ref_code_context_frames: 72 # Emit only the first audio chunk early, then return to codec_chunk_frames. initial_codec_chunk_frames: 1 - # Chunk ramp (opt-in): gradual size increase for first N chunks to - # eliminate the IC→steady cliff (1→25). Uncomment to enable. + # Gradual size increase for the first N chunks eliminates the + # IC-to-steady cliff (1->25) and improves streaming continuity. # Each entry is the size of that chunk index; indices past the table - # fall back to codec_chunk_frames. When enabled, ramp overrides - # initial_codec_chunk_frames (including the per-request API field). - # Example: - # codec_chunk_ramp: [4, 4, 8, 16, 25] + # fall back to codec_chunk_frames. Ramp overrides + # initial_codec_chunk_frames, including the per-request API field. + # Set this to null in a deployment overlay to restore the legacy + # initial_codec_chunk_frames behavior. + codec_chunk_ramp: [4, 4, 8, 16, 25] # async_chunk derives stateful ICL/xvec graph shapes from the ramp when # enabled, otherwise from the fixed chunk settings above, and ignores # decode_cudagraph_capture_sizes. Keep B>1