A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 10:45 UTC
[Bugfix] Reshape the dimensions of the input image embeddings in Qwen2VL (#9071)
whyiug committed
Oct 4, 2024 at 22:34 UTC
3d826d2c52242f4f78789adcb7c02938c84ed18b
1 file changed
+3
vllm/model_executor/models/qwen2_vl.py
+3
@@ -967,6 +967,9 @@ class Qwen2VLForConditionalGeneration(nn.Module, SupportsMultiModal,
967
image_grid_thw=image_grid_thw)
968
969
if image_embeds is not None:
970
+ image_embeds = self._validate_and_reshape_mm_tensor(
971
+ image_embeds, "image embeds")
972
+
973
if not isinstance(image_embeds, torch.Tensor):
974
raise ValueError("Incorrect type of image embeddings. "
975
f"Got type: {type(image_embeds)}")