[BugFix] Increase the max supported duration for MOSS-TD (#49403)
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Canlin Guo committed
Jul 25, 2026 at 22:48 UTC
33ef67e9fb5f3f9c2dfe1aa95e9880d5ecd7b38b
1 file changed
+2
-3
vllm/model_executor/models/moss_transcribe_diarize.py
+2
-3
@@ -67,6 +67,7 @@ from vllm.transformers_utils.processor import cached_processor_from_config
67
from vllm.utils.tensor_schema import TensorSchema, TensorShape
68
69
WHISPER_ENCODER_STRIDE = 2
70
+MAX_AUDIO_DURATION_S = 90 * 60
71
72
AUDIO_PLACEHOLDER = "<|audio_start|><|audio_pad|><|audio_end|>"
73
@@ -145,9 +146,7 @@ def _compute_total_audio_tokens(
146
147
148
def _get_max_audio_samples(feature_extractor: Any) -> int:
148
- if hasattr(feature_extractor, "chunk_length"):
149
- return int(feature_extractor.chunk_length * feature_extractor.sampling_rate)
150
- return int(feature_extractor.n_samples)
149
+ return int(MAX_AUDIO_DURATION_S * feature_extractor.sampling_rate)
150
151
152
def _as_audio_embedding_list(audio_embeds: object) -> list[torch.Tensor]: