From c1ba86ab5b72d8bc00a1caefe0d8662015755e3f Mon Sep 17 00:00:00 2001 From: amy-why-3459 Date: Tue, 21 Apr 2026 11:51:39 +0800 Subject: [PATCH] [BugFix] Fix the issue with stream=True (#2955) Signed-off-by: amy-why-3459 --- vllm_omni/engine/output_processor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vllm_omni/engine/output_processor.py b/vllm_omni/engine/output_processor.py index 67b4dd165..a5ed29ece 100644 --- a/vllm_omni/engine/output_processor.py +++ b/vllm_omni/engine/output_processor.py @@ -118,10 +118,9 @@ class OmniRequestState(RequestState): if isinstance(v, list) and v and isinstance(v[0], torch.Tensor): try: if k == "audio": - # Concatenate delta audio chunks (1-D) into the full waveform. - # Each entry is a per-step slice; flatten to -1 so chunks with - # inconsistent leading dims can still be joined on the sample axis. - self.mm_accumulated[k] = torch.cat([t.reshape(-1) for t in v], dim=0) + # When the audio tensor shape is inconsistent, torch.cat will fail. + # We need to use torch.cat in -1 dimension. + continue elif k == "sr": # Sample rate is a constant scalar, keep last value. self.mm_accumulated[k] = v[-1]