From 2eda72b5dcec8383b79633a8fc3dbca5f5e51adb Mon Sep 17 00:00:00 2001 From: Taichang Zhou Date: Mon, 2 Feb 2026 21:51:01 +0800 Subject: [PATCH] Refactor comments and formatting in Qwen3 TTS configuration and modeling files for improved readability. Signed-off-by: Taichang Zhou --- .../models/qwen3_tts/configuration_qwen3_tts.py | 8 ++++---- .../model_executor/models/qwen3_tts/modeling_qwen3_tts.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vllm_omni/model_executor/models/qwen3_tts/configuration_qwen3_tts.py b/vllm_omni/model_executor/models/qwen3_tts/configuration_qwen3_tts.py index c7db33a59..dde690068 100644 --- a/vllm_omni/model_executor/models/qwen3_tts/configuration_qwen3_tts.py +++ b/vllm_omni/model_executor/models/qwen3_tts/configuration_qwen3_tts.py @@ -504,10 +504,10 @@ class Qwen3TTSConfig(PretrainedConfig): self.tts_bos_token_id = tts_bos_token_id self.tts_eos_token_id = tts_eos_token_id - #TODO: remove these dummy values after - self.image_token_id = 0 # dummy image token id - self.video_token_id = 0 # dummy video token id - self.vision_start_token_id = 0 # dummy vision start token id + # TODO: remove these dummy values after + self.image_token_id = 0 # dummy image token id + self.video_token_id = 0 # dummy video token id + self.vision_start_token_id = 0 # dummy vision start token id self.vision_config = PretrainedConfig() # dummy vision config self.vision_config.spatial_merge_size = 1 diff --git a/vllm_omni/model_executor/models/qwen3_tts/modeling_qwen3_tts.py b/vllm_omni/model_executor/models/qwen3_tts/modeling_qwen3_tts.py index 2bcc61031..1e759a8d2 100644 --- a/vllm_omni/model_executor/models/qwen3_tts/modeling_qwen3_tts.py +++ b/vllm_omni/model_executor/models/qwen3_tts/modeling_qwen3_tts.py @@ -428,6 +428,8 @@ def mel_spectrogram( mel_spec = dynamic_range_compression_torch(mel_spec) return mel_spec + + def _compute_default_rope_parameters( config, device, @@ -443,6 +445,7 @@ def _compute_default_rope_parameters( inv_freq = 1.0 / (base ** (torch.arange(0, dim, 2, dtype=torch.int64).to(device=device, dtype=torch.float) / dim)) return inv_freq, attention_factor + class Qwen3TTSPreTrainedModel(PreTrainedModel): config_class = Qwen3TTSConfig base_model_prefix = "model"