[Models][Qwen3VL] Optimise _validate_and_reshape_mm_tensor (#26426)

Signed-off-by: Lukas Geiger <lukas.geiger94@gmail.com>
This commit is contained in:
Lukas Geiger 2025-10-09 11:25:48 +01:00 committed by GitHub
parent 4bdf7ac593
commit 0426e3c5e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1304,7 +1304,7 @@ class Qwen3VLForConditionalGeneration(
f"Got ndim: {mm_input.ndim} "
f"(shape={mm_input.shape})"
)
return torch.concat(list(mm_input))
return mm_input.reshape(-1, mm_input.shape[-1])
else:
return torch.concat(mm_input)