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:
1 parent
22ca74432b
commit
2eda72b5dc
1 file changed
+3
@@ -428,6 +428,8 @@ def mel_spectrogram(
|
|||||||
mel_spec = dynamic_range_compression_torch(mel_spec)
|
mel_spec = dynamic_range_compression_torch(mel_spec)
|
||||||
|
|
||||||
return mel_spec
|
return mel_spec
|
||||||
|
|
||||||
|
|
||||||
def _compute_default_rope_parameters(
|
def _compute_default_rope_parameters(
|
||||||
config,
|
config,
|
||||||
device,
|
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))
|
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
|
return inv_freq, attention_factor
|
||||||
|
|
||||||
|
|
||||||
class Qwen3TTSPreTrainedModel(PreTrainedModel):
|
class Qwen3TTSPreTrainedModel(PreTrainedModel):
|
||||||
config_class = Qwen3TTSConfig
|
config_class = Qwen3TTSConfig
|
||||||
base_model_prefix = "model"
|
base_model_prefix = "model"
|
||||||
|
|||||||
Reference in new issue
Block a user