<retrieval_status>timeout</retrieval_status>

<task_id>bkorg4884</task_id>

<task_type>local_bash</task_type>

<status>running</status>

<output>
=================================================================
  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base
  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16
=================================================================
WARNING 03-21 17:56:29 [envs.py:94] No Flash Attention backend found, using pytorch SDPA implementation
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.

Building inputs...
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:30,804 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:31,416 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:32,013 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:32,617 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:33,194 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:33,793 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:34,389 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:34,980 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:35,564 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:36,149 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:36,729 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:37,294 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:37,873 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:38,443 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:39,033 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.

[ENGINE] vLLM-Omni (sequential, batch_size=1)
  Loading model...
INFO 03-21 17:56:39 [weight_utils.py:50] Using model weights format ['*']
INFO 03-21 17:56:39 [omni.py:181] Initializing stages for model: Qwen/Qwen3-TTS-12Hz-0.6B-Base
INFO 03-21 17:56:39 [omni.py:313] No omni_master_address provided, defaulting to localhost (127.0.0.1)
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:39 [initialization.py:270] Loaded OmniTransferConfig with 1 connector configurations
INFO 03-21 17:56:39 [factory.py:46] Created connector: SharedMemoryConnector
INFO 03-21 17:56:39 [initialization.py:60] Created connector for 0 -> 1: SharedMemoryConnector
INFO 03-21 17:56:39 [omni.py:347] [Orchestrator] Loaded 2 stages
INFO 03-21 17:56:39 [omni.py:458] [Orchestrator] Waiting for 2 stages to initialize (timeout: 300s)
=================================================================
  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base
  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16
=================================================================
[Stage-0] WARNING 03-21 17:56:48 [envs.py:94] No Flash Attention backend found, using pytorch SDPA implementation
=================================================================
  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base
  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16
=================================================================
[Stage-1] WARNING 03-21 17:56:48 [envs.py:94] No Flash Attention backend found, using pytorch SDPA implementation
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.

Building inputs...
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:48,847 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.

Building inputs...
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,061 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,409 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,633 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,976 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:50,187 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:50,524 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:50,749 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,071 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,306 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,629 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,872 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,189 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,439 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,739 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,997 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:53 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:53 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:53 [configuration_qwen3_tts.py:441] code_predictor_config is N
</output>

Run vLLM-Omni RTF benchmark for Qwen3-TTS

Output:
=================================================================
  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base
  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16
=================================================================
WARNING 03-21 17:56:29 [envs.py:94] No Flash Attention backend found, using pytorch SDPA implementation
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.

Building inputs...
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:30 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:30,804 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:31 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:31,416 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:32,013 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:32 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:32,617 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:33,194 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:33 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:33,793 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:34,389 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:34 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:34,980 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:35 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:35,564 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:36,149 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:36 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:36,729 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:37,294 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:37 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:37,873 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:38 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:38,443 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
INFO 03-21 17:56:39 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:39,033 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.

[ENGINE] vLLM-Omni (sequential, batch_size=1)
  Loading model...
INFO 03-21 17:56:39 [weight_utils.py:50] Using model weights format ['*']
INFO 03-21 17:56:39 [omni.py:181] Initializing stages for model: Qwen/Qwen3-TTS-12Hz-0.6B-Base
INFO 03-21 17:56:39 [omni.py:313] No omni_master_address provided, defaulting to localhost (127.0.0.1)
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
INFO 03-21 17:56:39 [initialization.py:270] Loaded OmniTransferConfig with 1 connector configurations
INFO 03-21 17:56:39 [factory.py:46] Created connector: SharedMemoryConnector
INFO 03-21 17:56:39 [initialization.py:60] Created connector for 0 -> 1: SharedMemoryConnector
INFO 03-21 17:56:39 [omni.py:347] [Orchestrator] Loaded 2 stages
INFO 03-21 17:56:39 [omni.py:458] [Orchestrator] Waiting for 2 stages to initialize (timeout: 300s)
=================================================================
  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base
  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16
=================================================================
[Stage-0] WARNING 03-21 17:56:48 [envs.py:94] No Flash Attention backend found, using pytorch SDPA implementation
=================================================================
  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base
  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16
=================================================================
[Stage-1] WARNING 03-21 17:56:48 [envs.py:94] No Flash Attention backend found, using pytorch SDPA implementation
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.

Building inputs...
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:48 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:48,847 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.

Building inputs...
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,061 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,409 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,633 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:49 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:49,976 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:50,187 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:50,524 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:50 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:50,749 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,071 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,306 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,629 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:51 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:51,872 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,189 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,439 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-0] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,739 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
[Stage-1] INFO 03-21 17:56:52 [configuration_qwen3_tts.py:441] code_predictor_config is None. Initializing code_predictor model with default values
2026-03-21 17:56:52,997 WARNING Prompt length estimation failed, using fallback 2048: Base in-context voice cloning requires either `voice_clone_prompt.ref_code` or a readable `ref_audio` that can be mapped to a codec frame length.
The argument `trust_remote_code` is to be used with Auto classes. It has no effect here and is ignored.
[Stage-0] INFO 03-21 17:56:53 [configuration_qwen3_tts.py:489] talker_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:53 [configuration_qwen3_tts.py:492] speaker_encoder_config is None. Initializing talker model with default values
[Stage-0] INFO 03-21 17:56:53 [configuration_qwen3_tts.py:441] code_predictor_config is N


The output seems stuck - it's just repeating the same initialization messages. The multiprocessing spawned subprocesses are re-running the script's top-level code (the input building). This is because vLLM-Omni uses multiprocessing with "spawn" method, which re-imports the entire script in each subprocess.

The issue is that the script's top-level code (building inputs) runs in every spawned process. I need to protect the main code with `if __name__ == "__main__"`. Let me stop this and fix.


The script is stuck because `VLLM_WORKER_MULTIPROC_METHOD = "spawn"` causes subprocesses to re-execute the top-level script code. I need to protect everything with `if __name__ == "__main__"`. Let me kill it and fix.


ToolSearch

Question: select:TaskStop


Tool loaded.

Question: select:TaskStop


Successfully stopped task: bkorg4884 (cd /home/ubuntu/quench_0.6b && python3 bench_vllm_omni.py 2>&1)


Bash

pkill -f "bench_vllm_omni" 2>/dev/null; pkill -f "vllm_omni" 2>/dev/null; sleep 2; nvidia-smi | grep python | head -5

Kill any remaining vllm processes


Exit code 144


nvidia-smi | grep -i python | head -5; echo "---"; ps aux | grep -i vllm | grep -v grep | head -5

Check for remaining GPU processes


Good, all cleaned up. The problem was that with `spawn` multiprocessing, the entire script runs in each subprocess. I need to wrap everything in `if __name__ == "__main__"`. Let me rewrite the script properly.


     1→"""
     2→Qwen3-TTS-12Hz-0.6B-Base — vLLM-Omni RTF Benchmark
     3→Compares vLLM-Omni inference engine against baseline results.
     4→"""
     5→import os
     6→import sys
     7→import time
     8→import json
     9→import logging
    10→
    11→import numpy as np
    12→import soundfile as sf
    13→import torch
    14→
    15→os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
    16→
    17→logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
    18→logger = logging.getLogger(__name__)
    19→
    20→OUTPUT_DIR = "/home/ubuntu/quench_0.6b/results"
    21→os.makedirs(OUTPUT_DIR, exist_ok=True)
    22→
    23→MODEL_NAME = "Qwen/Qwen3-TTS-12Hz-0.6B-Base"
    24→REF_AUDIO = "/home/ubuntu/quench_0.6b/ref_audio.wav"
    25→REF_TEXT = "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And thanks to you."
    26→
    27→SENTENCES = [
    28→    "The quick brown fox jumps over the lazy dog near the riverbank.",
    29→    "Artificial intelligence is transforming how we approach complex problems in science and engineering.",
    30→    "The Massachusetts Institute of Technology announced groundbreaking research in superconductivity.",
    31→    "She couldn't believe it and then whispered this changes everything we know about quantum mechanics.",
    32→    "Beautiful weather today with clear skies and a gentle breeze coming from the northwest.",
    33→    "The orchestra performed a magnificent symphony that left the audience speechless and deeply moved.",
    34→    "Renewable energy sources such as solar and wind power are becoming increasingly important worldwide.",
    35→    "The philosopher argued that consciousness emerges from the complex interactions of neural networks.",
    36→    "International cooperation is essential for addressing global challenges like climate change and poverty.",
    37→    "The restaurant serves traditional Mediterranean cuisine with fresh ingredients sourced from local farmers.",
    38→    "Machine learning algorithms can identify patterns in large datasets that would be impossible for humans to detect manually.",
    39→    "The astronaut described the view of Earth from space as the most humbling experience of her entire career.",
    40→    "Quantum computing promises to revolutionize cryptography and drug discovery within the next decade.",
    41→    "The ancient library contained thousands of manuscripts dating back to the early medieval period.",
    42→    "Global temperatures have risen significantly over the past century due to increased greenhouse gas emissions.",
    43→]
    44→
    45→NUM_WARMUP = 2
    46→NUM_RUNS = 3
    47→
    48→
    49→def estimate_prompt_len(text, ref_audio, ref_text, model_name):
    50→    """Estimate prompt token length for the Talker stage."""
    51→    try:
    52→        from vllm_omni.model_executor.models.qwen3_tts.configuration_qwen3_tts import Qwen3TTSConfig
    53→        from vllm_omni.model_executor.models.qwen3_tts.qwen3_tts_talker import (
    54→            Qwen3TTSTalkerForConditionalGeneration,
    55→        )
    56→        from transformers import AutoTokenizer
    57→
    58→        tok = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, padding_side="left")
    59→        cfg = Qwen3TTSConfig.from_pretrained(model_name, trust_remote_code=True)
    60→        tcfg = getattr(cfg, "talker_config", None)
    61→
    62→        additional_information = {
    63→            "task_type": ["Base"],
    64→            "ref_audio": [ref_audio],
    65→            "ref_text": [ref_text],
    66→            "text": [text],
    67→            "language": ["English"],
    68→            "x_vector_only_mode": [False],
    69→            "max_new_tokens": [2048],
    70→        }
    71→
    72→        return Qwen3TTSTalkerForConditionalGeneration.estimate_prompt_len_from_additional_information(
    73→            additional_information=additional_information,
    74→            task_type="Base",
    75→            tokenize_prompt=lambda t: tok(t, padding=False)["input_ids"],
    76→            codec_language_id=getattr(tcfg, "codec_language_id", None),
    77→            spk_is_dialect=getattr(tcfg, "spk_is_dialect", None),
    78→        )
    79→    except Exception as exc:
    80→        logger.warning("Prompt length estimation failed, using fallback 2048: %s", exc)
    81→        return 2048
    82→
    83→
    84→def build_input(text, ref_audio, ref_text, model_name):
    85→    """Build a single vLLM-Omni input dict for Base (voice clone) task."""
    86→    additional_information = {
    87→        "task_type": ["Base"],
    88→        "ref_audio": [ref_audio],
    89→        "ref_text": [ref_text],
    90→        "text": [text],
    91→        "language": ["English"],
    92→        "x_vector_only_mode": [False],
    93→        "max_new_tokens": [2048],
    94→    }
    95→    prompt_len = estimate_prompt_len(text, ref_audio, ref_text, model_name)
    96→    return {
    97→        "prompt_token_ids": [0] * prompt_len,
    98→        "additional_information": additional_information,
    99→    }
   100→
   101→
   102→def extract_audio(output):
   103→    """Extract waveform and sample rate from OmniRequestOutput."""
   104→    mm = output.request_output.outputs[0].multimodal_output
   105→    audio_data = mm["audio"]
   106→    sr_raw = mm["sr"]
   107→    sr_val = sr_raw[-1] if isinstance(sr_raw, list) and sr_raw else sr_raw
   108→    sr = sr_val.item() if hasattr(sr_val, "item") else int(sr_val)
   109→    audio_tensor = torch.cat(audio_data, dim=-1) if isinstance(audio_data, list) else audio_data
   110→    wav = audio_tensor.float().cpu().numpy().flatten()
   111→    return wav, sr
   112→
   113→
   114→# ═══════════════════════════════════════════════
   115→print("=" * 65)
   116→print("  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base")
   117→print("  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16")
   118→print("=" * 65)
   119→
   120→from vllm_omni import Omni
   121→
   122→# Build all inputs first
   123→print("\nBuilding inputs...")
   124→inputs = [build_input(text, REF_AUDIO, REF_TEXT, MODEL_NAME) for text in SENTENCES]
   125→
   126→# ─────────────────────────────────────────────
   127→# Sequential benchmark (batch_size=1)
   128→# ─────────────────────────────────────────────
   129→print("\n[ENGINE] vLLM-Omni (sequential, batch_size=1)")
   130→print("  Loading model...")
   131→
   132→omni = Omni(
   133→    model=MODEL_NAME,
   134→    stage_init_timeout=600,
   135→)
   136→
   137→# Warmup
   138→print(f"  Warmup ({NUM_WARMUP} sentences)...")
   139→for i in range(NUM_WARMUP):
   140→    for output in omni.generate([inputs[i % len(inputs)]]):
   141→        _ = extract_audio(output)
   142→
   143→# Benchmark each sentence
   144→print(f"  Running {len(SENTENCES)} sentences x {NUM_RUNS} runs...")
   145→results = []
   146→for si, text in enumerate(SENTENCES):
   147→    times = []
   148→    durations = []
   149→    for r in range(NUM_RUNS):
   150→        t0 = time.time()
   151→        for output in omni.generate([inputs[si]]):
   152→            wav, sr = extract_audio(output)
   153→        elapsed = time.time() - t0
   154→        audio_dur = len(wav) / sr
   155→        times.append(elapsed)
   156→        durations.append(audio_dur)
   157→
   158→    avg_time = np.mean(times)
   159→    avg_dur = np.mean(durations)
   160→    rtf = avg_time / avg_dur
   161→    results.append({
   162→        "text": text,
   163→        "avg_gen_s": round(avg_time, 3),
   164→        "avg_audio_s": round(avg_dur, 2),
   165→        "rtf": round(rtf, 4),
   166→        "tokens_per_s": round(len(text) / avg_time, 1),
   167→    })
   168→    print(f"    [{si+1:2d}/{len(SENTENCES)}] RTF={rtf:.4f}  gen={avg_time:.2f}s  audio={avg_dur:.1f}s  | {text[:50]}...")
   169→
   170→rtfs = [r["rtf"] for r in results]
   171→total_gen = sum(r["avg_gen_s"] for r in results)
   172→total_audio = sum(r["avg_audio_s"] for r in results)
   173→seq_results = {
   174→    "engine": "vllm_omni_sequential",
   175→    "num_sentences": len(SENTENCES),
   176→    "num_runs": NUM_RUNS,
   177→    "avg_rtf": round(np.mean(rtfs), 4),
   178→    "median_rtf": round(np.median(rtfs), 4),
   179→    "min_rtf": round(np.min(rtfs), 4),
   180→    "max_rtf": round(np.max(rtfs), 4),
   181→    "std_rtf": round(np.std(rtfs), 4),
   182→    "total_gen_s": round(total_gen, 2),
   183→    "total_audio_s": round(total_audio, 2),
   184→    "overall_rtf": round(total_gen / total_audio, 4),
   185→    "per_sentence": results,
   186→}
   187→
   188→# ─────────────────────────────────────────────
   189→# Streaming TTFB benchmark
   190→# ─────────────────────────────────────────────
   191→import asyncio
   192→from vllm_omni import AsyncOmni
   193→
   194→print("\n[ENGINE] vLLM-Omni (streaming TTFB)")
   195→
   196→async def measure_ttfb(omni_async, inp, request_id):
   197→    """Measure time to first audio chunk."""
   198→    t_start = time.perf_counter()
   199→    ttfb = None
   200→    total_samples = 0
   201→    async for stage_output in omni_async.generate(inp, request_id=request_id):
   202→        mm = stage_output.request_output.outputs[0].multimodal_output
   203→        if not stage_output.finished:
   204→            if ttfb is None:
   205→                ttfb = (time.perf_counter() - t_start) * 1000  # ms
   206→            audio = mm.get("audio")
   207→            if isinstance(audio, list):
   208→                total_samples += sum(a.numel() for a in audio)
   209→            elif audio is not None:
   210→                total_samples += audio.numel()
   211→        else:
   212→            total_time = (time.perf_counter() - t_start) * 1000
   213→            sr_raw = mm["sr"]
   214→            sr_val = sr_raw[-1] if isinstance(sr_raw, list) and sr_raw else sr_raw
   215→            sr = sr_val.item() if hasattr(sr_val, "item") else int(sr_val)
   216→            audio_data = mm["audio"]
   217→            audio_tensor = torch.cat(audio_data, dim=-1) if isinstance(audio_data, list) else audio_data
   218→            wav = audio_tensor.float().cpu().numpy().flatten()
   219→            audio_dur = len(wav) / sr
   220→            return {
   221→                "ttfb_ms": round(ttfb, 1) if ttfb else None,
   222→                "total_ms": round(total_time, 1),
   223→                "audio_s": round(audio_dur, 2),
   224→                "rtf": round(total_time / 1000 / audio_dur, 4) if audio_dur > 0 else None,
   225→            }
   226→
   227→async def run_ttfb_bench():
   228→    omni_async = AsyncOmni(
   229→        model=MODEL_NAME,
   230→        stage_init_timeout=600,
   231→    )
   232→
   233→    # Warmup
   234→    print(f"  Warmup ({NUM_WARMUP} requests)...")
   235→    for i in range(NUM_WARMUP):
   236→        async for _ in omni_async.generate(inputs[i % len(inputs)], request_id=f"warmup_{i}"):
   237→            pass
   238→
   239→    # Measure TTFB
   240→    print(f"  Measuring TTFB for {min(10, len(SENTENCES))} sentences...")
   241→    ttfb_results = []
   242→    for si in range(min(10, len(SENTENCES))):
   243→        result = await measure_ttfb(omni_async, inputs[si], request_id=f"ttfb_{si}")
   244→        if result:
   245→            ttfb_results.append(result)
   246→            print(f"    [{si+1:2d}] TTFB={result['ttfb_ms']}ms  total={result['total_ms']}ms  audio={result['audio_s']}s")
   247→
   248→    return ttfb_results
   249→
   250→ttfb_results = asyncio.run(run_ttfb_bench())
   251→
   252→ttfb_values = [r["ttfb_ms"] for r in ttfb_results if r["ttfb_ms"]]
   253→streaming_summary = {
   254→    "engine": "vllm_omni_streaming",
   255→    "num_sentences": len(ttfb_results),
   256→    "ttfb_p50_ms": round(np.percentile(ttfb_values, 50), 1) if ttfb_values else None,
   257→    "ttfb_p95_ms": round(np.percentile(ttfb_values, 95), 1) if ttfb_values else None,
   258→    "ttfb_p99_ms": round(np.percentile(ttfb_values, 99), 1) if ttfb_values else None,
   259→    "ttfb_mean_ms": round(np.mean(ttfb_values), 1) if ttfb_values else None,
   260→    "per_request": ttfb_results,
   261→}
   262→
   263→# ─────────────────────────────────────────────
   264→# Save and compare
   265→# ─────────────────────────────────────────────
   266→all_vllm = {
   267→    "vllm_omni_sequential": seq_results,
   268→    "vllm_omni_streaming": streaming_summary,
   269→}
   270→
   271→results_path = os.path.join(OUTPUT_DIR, "vllm_omni_benchmark.json")
   272→with open(results_path, "w") as f:
   273→    json.dump(all_vllm, f, indent=2)
   274→
   275→# Load previous results for comparison
   276→prev_path = os.path.join(OUTPUT_DIR, "rtf_benchmark.json")
   277→prev = {}
   278→if os.path.exists(prev_path):
   279→    with open(prev_path) as f:
   280→        prev = json.load(f)
   281→
   282→print("\n" + "=" * 65)
   283→print("  FULL RTF COMPARISON — Qwen3-TTS-12Hz-0.6B-Base")
   284→print("  GPU: NVIDIA A100-SXM4-80GB | English Only")
   285→print("=" * 65)
   286→print()
   287→print(f"  {'Engine':35s}  {'RTF':>8s}  {'Gen/sample':>10s}")
   288→print(f"  {'-'*35}  {'-'*8}  {'-'*10}")
   289→
   290→if "qwen_tts_baseline" in prev:
   291→    r1 = prev["qwen_tts_baseline"]
   292→    print(f"  {'qwen_tts (sequential)':35s}  {r1['overall_rtf']:8.4f}  {r1['total_gen_s']/r1['num_sentences']:9.2f}s")
   293→
   294→if "qwen_tts_batch" in prev:
   295→    r1b = prev["qwen_tts_batch"]
   296→    print(f"  {'qwen_tts (batch x' + str(r1b.get('batch_size', '?')) + ')':35s}  {r1b['overall_rtf']:8.4f}  {r1b['per_sample_gen_s']:9.3f}s")
   297→
   298→if "faster_qwen3_tts" in prev:
   299→    r2 = prev["faster_qwen3_tts"]
   300→    print(f"  {'faster-qwen3-tts (CUDA graphs)':35s}  {r2['overall_rtf']:8.4f}  {r2['total_gen_s']/r2['num_sentences']:9.2f}s")
   301→
   302→print(f"  {'vLLM-Omni (sequential)':35s}  {seq_results['overall_rtf']:8.4f}  {seq_results['total_gen_s']/seq_results['num_sentences']:9.2f}s")
   303→
   304→if ttfb_values:
   305→    print()
   306→    print(f"  vLLM-Omni Streaming TTFB:")
   307→    print(f"    p50: {streaming_summary['ttfb_p50_ms']}ms  p95: {streaming_summary['ttfb_p95_ms']}ms  p99: {streaming_summary['ttfb_p99_ms']}ms")
   308→
   309→print()
   310→
   311→# Find best engine
   312→all_rtfs = []
   313→if "qwen_tts_baseline" in prev:
   314→    all_rtfs.append(("qwen_tts_sequential", prev["qwen_tts_baseline"]["overall_rtf"]))
   315→if "qwen_tts_batch" in prev:
   316→    all_rtfs.append(("qwen_tts_batch", prev["qwen_tts_batch"]["overall_rtf"]))
   317→if "faster_qwen3_tts" in prev:
   318→    all_rtfs.append(("faster_qwen3_tts", prev["faster_qwen3_tts"]["overall_rtf"]))
   319→all_rtfs.append(("vllm_omni_sequential", seq_results["overall_rtf"]))
   320→
   321→best = min(all_rtfs, key=lambda x: x[1])
   322→print(f"  BEST ENGINE: {best[0]} with RTF = {best[1]:.4f}")
   323→if "qwen_tts_baseline" in prev:
   324→    speedup = prev["qwen_tts_baseline"]["overall_rtf"] / best[1]
   325→    print(f"  Speedup over sequential baseline: {speedup:.2f}x")
   326→
   327→print()
   328→print(f"  RTF < 1.0 = faster than real-time")
   329→print(f"  Results saved to: {results_path}")
   330→print("=" * 65)
   331→

"""
Qwen3-TTS-12Hz-0.6B-Base — vLLM-Omni RTF Benchmark
Compares vLLM-Omni inference engine against baseline results.
"""
import os
import sys
import time
import json
import logging

import numpy as np
import soundfile as sf
import torch

os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"

logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
logger = logging.getLogger(__name__)

OUTPUT_DIR = "/home/ubuntu/quench_0.6b/results"
os.makedirs(OUTPUT_DIR, exist_ok=True)

MODEL_NAME = "Qwen/Qwen3-TTS-12Hz-0.6B-Base"
REF_AUDIO = "/home/ubuntu/quench_0.6b/ref_audio.wav"
REF_TEXT = "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And thanks to you."

SENTENCES = [
    "The quick brown fox jumps over the lazy dog near the riverbank.",
    "Artificial intelligence is transforming how we approach complex problems in science and engineering.",
    "The Massachusetts Institute of Technology announced groundbreaking research in superconductivity.",
    "She couldn't believe it and then whispered this changes everything we know about quantum mechanics.",
    "Beautiful weather today with clear skies and a gentle breeze coming from the northwest.",
    "The orchestra performed a magnificent symphony that left the audience speechless and deeply moved.",
    "Renewable energy sources such as solar and wind power are becoming increasingly important worldwide.",
    "The philosopher argued that consciousness emerges from the complex interactions of neural networks.",
    "International cooperation is essential for addressing global challenges like climate change and poverty.",
    "The restaurant serves traditional Mediterranean cuisine with fresh ingredients sourced from local farmers.",
    "Machine learning algorithms can identify patterns in large datasets that would be impossible for humans to detect manually.",
    "The astronaut described the view of Earth from space as the most humbling experience of her entire career.",
    "Quantum computing promises to revolutionize cryptography and drug discovery within the next decade.",
    "The ancient library contained thousands of manuscripts dating back to the early medieval period.",
    "Global temperatures have risen significantly over the past century due to increased greenhouse gas emissions.",
]

NUM_WARMUP = 2
NUM_RUNS = 3

def estimate_prompt_len(text, ref_audio, ref_text, model_name):
    """Estimate prompt token length for the Talker stage."""
    try:
        from vllm_omni.model_executor.models.qwen3_tts.configuration_qwen3_tts import Qwen3TTSConfig
        from vllm_omni.model_executor.models.qwen3_tts.qwen3_tts_talker import (
            Qwen3TTSTalkerForConditionalGeneration,
        )
        from transformers import AutoTokenizer

        tok = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, padding_side="left")
        cfg = Qwen3TTSConfig.from_pretrained(model_name, trust_remote_code=True)
        tcfg = getattr(cfg, "talker_config", None)

        additional_information = {
            "task_type": ["Base"],
            "ref_audio": [ref_audio],
            "ref_text": [ref_text],
            "text": [text],
            "language": ["English"],
            "x_vector_only_mode": [False],
            "max_new_tokens": [2048],
        }

        return Qwen3TTSTalkerForConditionalGeneration.estimate_prompt_len_from_additional_information(
            additional_information=additional_information,
            task_type="Base",
            tokenize_prompt=lambda t: tok(t, padding=False)["input_ids"],
            codec_language_id=getattr(tcfg, "codec_language_id", None),
            spk_is_dialect=getattr(tcfg, "spk_is_dialect", None),
        )
    except Exception as exc:
        logger.warning("Prompt length estimation failed, using fallback 2048: %s", exc)
        return 2048

def build_input(text, ref_audio, ref_text, model_name):
    """Build a single vLLM-Omni input dict for Base (voice clone) task."""
    additional_information = {
        "task_type": ["Base"],
        "ref_audio": [ref_audio],
        "ref_text": [ref_text],
        "text": [text],
        "language": ["English"],
        "x_vector_only_mode": [False],
        "max_new_tokens": [2048],
    }
    prompt_len = estimate_prompt_len(text, ref_audio, ref_text, model_name)
    return {
        "prompt_token_ids": [0] * prompt_len,
        "additional_information": additional_information,
    }

def extract_audio(output):
    """Extract waveform and sample rate from OmniRequestOutput."""
    mm = output.request_output.outputs[0].multimodal_output
    audio_data = mm["audio"]
    sr_raw = mm["sr"]
    sr_val = sr_raw[-1] if isinstance(sr_raw, list) and sr_raw else sr_raw
    sr = sr_val.item() if hasattr(sr_val, "item") else int(sr_val)
    audio_tensor = torch.cat(audio_data, dim=-1) if isinstance(audio_data, list) else audio_data
    wav = audio_tensor.float().cpu().numpy().flatten()
    return wav, sr

# ═══════════════════════════════════════════════
print("=" * 65)
print("  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base")
print("  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16")
print("=" * 65)

from vllm_omni import Omni

# Build all inputs first
print("\nBuilding inputs...")
inputs = [build_input(text, REF_AUDIO, REF_TEXT, MODEL_NAME) for text in SENTENCES]

# ─────────────────────────────────────────────
# Sequential benchmark (batch_size=1)
# ─────────────────────────────────────────────
print("\n[ENGINE] vLLM-Omni (sequential, batch_size=1)")
print("  Loading model...")

omni = Omni(
    model=MODEL_NAME,
    stage_init_timeout=600,
)

# Warmup
print(f"  Warmup ({NUM_WARMUP} sentences)...")
for i in range(NUM_WARMUP):
    for output in omni.generate([inputs[i % len(inputs)]]):
        _ = extract_audio(output)

# Benchmark each sentence
print(f"  Running {len(SENTENCES)} sentences x {NUM_RUNS} runs...")
results = []
for si, text in enumerate(SENTENCES):
    times = []
    durations = []
    for r in range(NUM_RUNS):
        t0 = time.time()
        for output in omni.generate([inputs[si]]):
            wav, sr = extract_audio(output)
        elapsed = time.time() - t0
        audio_dur = len(wav) / sr
        times.append(elapsed)
        durations.append(audio_dur)

    avg_time = np.mean(times)
    avg_dur = np.mean(durations)
    rtf = avg_time / avg_dur
    results.append({
        "text": text,
        "avg_gen_s": round(avg_time, 3),
        "avg_audio_s": round(avg_dur, 2),
        "rtf": round(rtf, 4),
        "tokens_per_s": round(len(text) / avg_time, 1),
    })
    print(f"    [{si+1:2d}/{len(SENTENCES)}] RTF={rtf:.4f}  gen={avg_time:.2f}s  audio={avg_dur:.1f}s  | {text[:50]}...")

rtfs = [r["rtf"] for r in results]
total_gen = sum(r["avg_gen_s"] for r in results)
total_audio = sum(r["avg_audio_s"] for r in results)
seq_results = {
    "engine": "vllm_omni_sequential",
    "num_sentences": len(SENTENCES),
    "num_runs": NUM_RUNS,
    "avg_rtf": round(np.mean(rtfs), 4),
    "median_rtf": round(np.median(rtfs), 4),
    "min_rtf": round(np.min(rtfs), 4),
    "max_rtf": round(np.max(rtfs), 4),
    "std_rtf": round(np.std(rtfs), 4),
    "total_gen_s": round(total_gen, 2),
    "total_audio_s": round(total_audio, 2),
    "overall_rtf": round(total_gen / total_audio, 4),
    "per_sentence": results,
}

# ─────────────────────────────────────────────
# Streaming TTFB benchmark
# ─────────────────────────────────────────────
import asyncio
from vllm_omni import AsyncOmni

print("\n[ENGINE] vLLM-Omni (streaming TTFB)")

async def measure_ttfb(omni_async, inp, request_id):
    """Measure time to first audio chunk."""
    t_start = time.perf_counter()
    ttfb = None
    total_samples = 0
    async for stage_output in omni_async.generate(inp, request_id=request_id):
        mm = stage_output.request_output.outputs[0].multimodal_output
        if not stage_output.finished:
            if ttfb is None:
                ttfb = (time.perf_counter() - t_start) * 1000  # ms
            audio = mm.get("audio")
            if isinstance(audio, list):
                total_samples += sum(a.numel() for a in audio)
            elif audio is not None:
                total_samples += audio.numel()
        else:
            total_time = (time.perf_counter() - t_start) * 1000
            sr_raw = mm["sr"]
            sr_val = sr_raw[-1] if isinstance(sr_raw, list) and sr_raw else sr_raw
            sr = sr_val.item() if hasattr(sr_val, "item") else int(sr_val)
            audio_data = mm["audio"]
            audio_tensor = torch.cat(audio_data, dim=-1) if isinstance(audio_data, list) else audio_data
            wav = audio_tensor.float().cpu().numpy().flatten()
            audio_dur = len(wav) / sr
            return {
                "ttfb_ms": round(ttfb, 1) if ttfb else None,
                "total_ms": round(total_time, 1),
                "audio_s": round(audio_dur, 2),
                "rtf": round(total_time / 1000 / audio_dur, 4) if audio_dur > 0 else None,
            }

async def run_ttfb_bench():
    omni_async = AsyncOmni(
        model=MODEL_NAME,
        stage_init_timeout=600,
    )

    # Warmup
    print(f"  Warmup ({NUM_WARMUP} requests)...")
    for i in range(NUM_WARMUP):
        async for _ in omni_async.generate(inputs[i % len(inputs)], request_id=f"warmup_{i}"):
            pass

    # Measure TTFB
    print(f"  Measuring TTFB for {min(10, len(SENTENCES))} sentences...")
    ttfb_results = []
    for si in range(min(10, len(SENTENCES))):
        result = await measure_ttfb(omni_async, inputs[si], request_id=f"ttfb_{si}")
        if result:
            ttfb_results.append(result)
            print(f"    [{si+1:2d}] TTFB={result['ttfb_ms']}ms  total={result['total_ms']}ms  audio={result['audio_s']}s")

    return ttfb_results

ttfb_results = asyncio.run(run_ttfb_bench())

ttfb_values = [r["ttfb_ms"] for r in ttfb_results if r["ttfb_ms"]]
streaming_summary = {
    "engine": "vllm_omni_streaming",
    "num_sentences": len(ttfb_results),
    "ttfb_p50_ms": round(np.percentile(ttfb_values, 50), 1) if ttfb_values else None,
    "ttfb_p95_ms": round(np.percentile(ttfb_values, 95), 1) if ttfb_values else None,
    "ttfb_p99_ms": round(np.percentile(ttfb_values, 99), 1) if ttfb_values else None,
    "ttfb_mean_ms": round(np.mean(ttfb_values), 1) if ttfb_values else None,
    "per_request": ttfb_results,
}

# ─────────────────────────────────────────────
# Save and compare
# ─────────────────────────────────────────────
all_vllm = {
    "vllm_omni_sequential": seq_results,
    "vllm_omni_streaming": streaming_summary,
}

results_path = os.path.join(OUTPUT_DIR, "vllm_omni_benchmark.json")
with open(results_path, "w") as f:
    json.dump(all_vllm, f, indent=2)

# Load previous results for comparison
prev_path = os.path.join(OUTPUT_DIR, "rtf_benchmark.json")
prev = {}
if os.path.exists(prev_path):
    with open(prev_path) as f:
        prev = json.load(f)

print("\n" + "=" * 65)
print("  FULL RTF COMPARISON — Qwen3-TTS-12Hz-0.6B-Base")
print("  GPU: NVIDIA A100-SXM4-80GB | English Only")
print("=" * 65)
print()
print(f"  {'Engine':35s}  {'RTF':>8s}  {'Gen/sample':>10s}")
print(f"  {'-'*35}  {'-'*8}  {'-'*10}")

if "qwen_tts_baseline" in prev:
    r1 = prev["qwen_tts_baseline"]
    print(f"  {'qwen_tts (sequential)':35s}  {r1['overall_rtf']:8.4f}  {r1['total_gen_s']/r1['num_sentences']:9.2f}s")

if "qwen_tts_batch" in prev:
    r1b = prev["qwen_tts_batch"]
    print(f"  {'qwen_tts (batch x' + str(r1b.get('batch_size', '?')) + ')':35s}  {r1b['overall_rtf']:8.4f}  {r1b['per_sample_gen_s']:9.3f}s")

if "faster_qwen3_tts" in prev:
    r2 = prev["faster_qwen3_tts"]
    print(f"  {'faster-qwen3-tts (CUDA graphs)':35s}  {r2['overall_rtf']:8.4f}  {r2['total_gen_s']/r2['num_sentences']:9.2f}s")

print(f"  {'vLLM-Omni (sequential)':35s}  {seq_results['overall_rtf']:8.4f}  {seq_results['total_gen_s']/seq_results['num_sentences']:9.2f}s")

if ttfb_values:
    print()
    print(f"  vLLM-Omni Streaming TTFB:")
    print(f"    p50: {streaming_summary['ttfb_p50_ms']}ms  p95: {streaming_summary['ttfb_p95_ms']}ms  p99: {streaming_summary['ttfb_p99_ms']}ms")

print()

# Find best engine
all_rtfs = []
if "qwen_tts_baseline" in prev:
    all_rtfs.append(("qwen_tts_sequential", prev["qwen_tts_baseline"]["overall_rtf"]))
if "qwen_tts_batch" in prev:
    all_rtfs.append(("qwen_tts_batch", prev["qwen_tts_batch"]["overall_rtf"]))
if "faster_qwen3_tts" in prev:
    all_rtfs.append(("faster_qwen3_tts", prev["faster_qwen3_tts"]["overall_rtf"]))
all_rtfs.append(("vllm_omni_sequential", seq_results["overall_rtf"]))

best = min(all_rtfs, key=lambda x: x[1])
print(f"  BEST ENGINE: {best[0]} with RTF = {best[1]:.4f}")
if "qwen_tts_baseline" in prev:
    speedup = prev["qwen_tts_baseline"]["overall_rtf"] / best[1]
    print(f"  Speedup over sequential baseline: {speedup:.2f}x")

print()
print(f"  RTF < 1.0 = faster than real-time")
print(f"  Results saved to: {results_path}")
print("=" * 65)


Write

"""
Qwen3-TTS-12Hz-0.6B-Base — vLLM-Omni RTF Benchmark
Compares vLLM-Omni inference engine against baseline results.
"""
import os
import sys
import time
import json
import logging

import numpy as np
import soundfile as sf
import torch

os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"

OUTPUT_DIR = "/home/ubuntu/quench_0.6b/results"
MODEL_NAME = "Qwen/Qwen3-TTS-12Hz-0.6B-Base"
REF_AUDIO = "/home/ubuntu/quench_0.6b/ref_audio.wav"
REF_TEXT = "Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And thanks to you."

SENTENCES = [
    "The quick brown fox jumps over the lazy dog near the riverbank.",
    "Artificial intelligence is transforming how we approach complex problems in science and engineering.",
    "The Massachusetts Institute of Technology announced groundbreaking research in superconductivity.",
    "She couldn't believe it and then whispered this changes everything we know about quantum mechanics.",
    "Beautiful weather today with clear skies and a gentle breeze coming from the northwest.",
    "The orchestra performed a magnificent symphony that left the audience speechless and deeply moved.",
    "Renewable energy sources such as solar and wind power are becoming increasingly important worldwide.",
    "The philosopher argued that consciousness emerges from the complex interactions of neural networks.",
    "International cooperation is essential for addressing global challenges like climate change and poverty.",
    "The restaurant serves traditional Mediterranean cuisine with fresh ingredients sourced from local farmers.",
    "Machine learning algorithms can identify patterns in large datasets that would be impossible for humans to detect manually.",
    "The astronaut described the view of Earth from space as the most humbling experience of her entire career.",
    "Quantum computing promises to revolutionize cryptography and drug discovery within the next decade.",
    "The ancient library contained thousands of manuscripts dating back to the early medieval period.",
    "Global temperatures have risen significantly over the past century due to increased greenhouse gas emissions.",
]

NUM_WARMUP = 2
NUM_RUNS = 3

def build_input(text):
    """Build a single vLLM-Omni input dict for Base (voice clone) task."""
    additional_information = {
        "task_type": ["Base"],
        "ref_audio": [REF_AUDIO],
        "ref_text": [REF_TEXT],
        "text": [text],
        "language": ["English"],
        "x_vector_only_mode": [False],
        "max_new_tokens": [2048],
    }
    return {
        "prompt_token_ids": [0] * 2048,
        "additional_information": additional_information,
    }

def extract_audio(output):
    """Extract waveform and sample rate from OmniRequestOutput."""
    mm = output.request_output.outputs[0].multimodal_output
    audio_data = mm["audio"]
    sr_raw = mm["sr"]
    sr_val = sr_raw[-1] if isinstance(sr_raw, list) and sr_raw else sr_raw
    sr = sr_val.item() if hasattr(sr_val, "item") else int(sr_val)
    audio_tensor = torch.cat(audio_data, dim=-1) if isinstance(audio_data, list) else audio_data
    wav = audio_tensor.float().cpu().numpy().flatten()
    return wav, sr

def main():
    logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
    logger = logging.getLogger(__name__)
    os.makedirs(OUTPUT_DIR, exist_ok=True)

    print("=" * 65)
    print("  vLLM-Omni RTF Benchmark — Qwen3-TTS-12Hz-0.6B-Base")
    print("  GPU: NVIDIA A100-SXM4-80GB | dtype: bfloat16")
    print("=" * 65)

    from vllm_omni import Omni

    # Build all inputs first
    print("\nBuilding inputs...")
    inputs = [build_input(text) for text in SENTENCES]

    # ─────────────────────────────────────────────
    # Sequential benchmark (batch_size=1)
    # ─────────────────────────────────────────────
    print("\n[ENGINE] vLLM-Omni (sequential, batch_size=1)")
    print("  Loading model...")

    omni = Omni(
        model=MODEL_NAME,
        stage_init_timeout=600,
    )

    # Warmup
    print(f"  Warmup ({NUM_WARMUP} sentences)...")
    for i in range(NUM_WARMUP):
        for output in omni.generate([inputs[i % len(inputs)]]):
            _ = extract_audio(output)

    # Benchmark each sentence
    print(f"  Running {len(SENTENCES)} sentences x {NUM_RUNS} runs...")
    results = []
    for si, text in enumerate(SENTENCES):
        times = []
        durations = []
        for r in range(NUM_RUNS):
            t0 = time.time()
            for output in omni.generate([inputs[si]]):
                wav, sr = extract_audio(output)
            elapsed = time.time() - t0
            audio_dur = len(wav) / sr
            times.append(elapsed)
            durations.append(audio_dur)

        avg_time = np.mean(times)
        avg_dur = np.mean(durations)
        rtf = avg_time / avg_dur
        results.append({
            "text": text,
            "avg_gen_s": round(avg_time, 3),
            "avg_audio_s": round(avg_dur, 2),
            "rtf": round(rtf, 4),
            "tokens_per_s": round(len(text) / avg_time, 1),
        })
        print(f"    [{si+1:2d}/{len(SENTENCES)}] RTF={rtf:.4f}  gen={avg_time:.2f}s  audio={avg_dur:.1f}s  | {text[:50]}...")

    rtfs = [r["rtf"] for r in results]
    total_gen = sum(r["avg_gen_s"] for r in results)
    total_audio = sum(r["avg_audio_s"] for r in results)
    seq_results = {
        "engine": "vllm_omni_sequential",
        "num_sentences": len(SENTENCES),
        "num_runs": NUM_RUNS,
        "avg_rtf": round(np.mean(rtfs), 4),
        "median_rtf": round(np.median(rtfs), 4),
        "min_rtf": round(np.min(rtfs), 4),
        "max_rtf": round(np.max(rtfs), 4),
        "std_rtf": round(np.std(rtfs), 4),
        "total_gen_s": round(total_gen, 2),
        "total_audio_s": round(total_audio, 2),
        "overall_rtf": round(total_gen / total_audio, 4),
        "per_sentence": results,
    }

    # Clean up Omni to free GPU
    del omni
    torch.cuda.empty_cache()

    # ─────────────────────────────────────────────
    # Save and compare
    # ─────────────────────────────────────────────
    all_vllm = {
        "vllm_omni_sequential": seq_results,
    }

    results_path = os.path.join(OUTPUT_DIR, "vllm_omni_benchmark.json")
    with open(results_path, "w") as f:
        json.dump(all_vllm, f, indent=2)

    # Load previous results for comparison
    prev_path = os.path.join(OUTPUT_DIR, "rtf_benchmark.json")
    prev = {}
    if os.path.exists(prev_path):
        with open(prev_path) as f:
            prev = json.load(f)

    print("\n" + "=" * 65)
    print("  FULL RTF COMPARISON — Qwen3-TTS-12Hz-0.6B-Base")
    print("  GPU: NVIDIA A100-SXM4-80GB | English Only")
    print("=" * 65)
    print()
    print(f"  {'Engine':35s}  {'RTF':>8s}  {'Gen/sample':>10s}")
    print(f"  {'-'*35}  {'-'*8}  {'-'*10}")

    if "qwen_tts_baseline" in prev:
        r1 = prev["qwen_tts_baseline"]
        print(f"  {'qwen_tts (sequential)':35s}  {r1['overall_rtf']:8.4f}  {r1['total_gen_s']/r1['num_sentences']:9.2f}s")

    if "qwen_tts_batch" in prev:
        r1b = prev["qwen_tts_batch"]
        print(f"  {'qwen_tts (batch x' + str(r1b.get('batch_size', '?')) + ')':35s}  {r1b['overall_rtf']:8.4f}  {r1b['per_sample_gen_s']:9.3f}s")

    if "faster_qwen3_tts" in prev:
        r2 = prev["faster_qwen3_tts"]
        print(f"  {'faster-qwen3-tts (CUDA graphs)':35s}  {r2['overall_rtf']:8.4f}  {r2['total_gen_s']/r2['num_sentences']:9.2f}s")

    print(f"  {'vLLM-Omni (sequential)':35s}  {seq_results['overall_rtf']:8.4f}  {seq_results['total_gen_s']/seq_results['num_sentences']:9.2f}s")

    print()

    # Find best engine
    all_rtfs = []
    if "qwen_tts_baseline" in prev:
        all_rtfs.append(("qwen_tts_sequential", prev["qwen_tts_baseline"]["overall_rtf"]))
    if "qwen_tts_batch" in prev:
        all_rtfs.append(("qwen_tts_batch", prev["qwen_tts_batch"]["overall_rtf"]))
    if "faster_qwen3_tts" in prev:
        all_rtfs.append(("faster_qwen3_tts", prev["faster_qwen3_tts"]["overall_rtf"]))
    all_rtfs.append(("vllm_omni_sequential", seq_results["overall_rtf"]))

    best = min(all_rtfs, key=lambda x: x[1])
    print(f"  BEST ENGINE: {best[0]} with RTF = {best[1]:.4f}")
    if "qwen_tts_baseline" in prev:
        speedup = prev["qwen_tts_baseline"]["overall_rtf"] / best[1]
        print(f"  Speedup over sequential baseline: {speedup:.2f}x")

    print()
    print(f"  RTF < 1.0 = faster than real-time")
    print(f"  Results saved to: {results_path}")
    print("=" * 65)

if __name__ == "__main__":
    main()