[Models][Qwen3VL] Optimise _validate_and_reshape_mm_tensor (#26426)
Signed-off-by: Lukas Geiger <lukas.geiger94@gmail.com>
This commit is contained in:
@@ -1304,7 +1304,7 @@ class Qwen3VLForConditionalGeneration(
|
|||||||
f"Got ndim: {mm_input.ndim} "
|
f"Got ndim: {mm_input.ndim} "
|
||||||
f"(shape={mm_input.shape})"
|
f"(shape={mm_input.shape})"
|
||||||
)
|
)
|
||||||
return torch.concat(list(mm_input))
|
return mm_input.reshape(-1, mm_input.shape[-1])
|
||||||
else:
|
else:
|
||||||
return torch.concat(mm_input)
|
return torch.concat(mm_input)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user