Refactor comments and formatting in Qwen3 TTS configuration and modeling files for improved readability.

Signed-off-by: Taichang Zhou <tzhouam@connect.ust.hk>
This commit is contained in:
Taichang Zhou committed 2026-02-02 21:51:01 +08:00
1 parent 22ca74432b
commit 2eda72b5dc
2 files changed
+7 -4

No files matched your search

@@ -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
@@ -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"