[BugFix] Increase the max supported duration for MOSS-TD (#49403)

Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
This commit is contained in:
Canlin Guo
2026-07-25 14:48:12 +00:00
committed by GitHub
parent 3e74c60b9c
commit 33ef67e9fb
@@ -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]: