From 33ef67e9fb5f3f9c2dfe1aa95e9880d5ecd7b38b Mon Sep 17 00:00:00 2001 From: Canlin Guo Date: Sat, 25 Jul 2026 22:48:12 +0800 Subject: [PATCH] [BugFix] Increase the max supported duration for MOSS-TD (#49403) Signed-off-by: Canlin Guo --- vllm/model_executor/models/moss_transcribe_diarize.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vllm/model_executor/models/moss_transcribe_diarize.py b/vllm/model_executor/models/moss_transcribe_diarize.py index 5236f5c61be..789c789f0bb 100644 --- a/vllm/model_executor/models/moss_transcribe_diarize.py +++ b/vllm/model_executor/models/moss_transcribe_diarize.py @@ -67,6 +67,7 @@ from vllm.transformers_utils.processor import cached_processor_from_config from vllm.utils.tensor_schema import TensorSchema, TensorShape WHISPER_ENCODER_STRIDE = 2 +MAX_AUDIO_DURATION_S = 90 * 60 AUDIO_PLACEHOLDER = "<|audio_start|><|audio_pad|><|audio_end|>" @@ -145,9 +146,7 @@ def _compute_total_audio_tokens( def _get_max_audio_samples(feature_extractor: Any) -> int: - if hasattr(feature_extractor, "chunk_length"): - return int(feature_extractor.chunk_length * feature_extractor.sampling_rate) - return int(feature_extractor.n_samples) + return int(MAX_AUDIO_DURATION_S * feature_extractor.sampling_rate) def _as_audio_embedding_list(audio_embeds: object) -> list[torch.Tensor]: