[Bugfix] Reshape the dimensions of the input image embeddings in Qwen2VL (#9071)
This commit is contained in:
parent
0e36fd4909
commit
3d826d2c52
@ -967,6 +967,9 @@ class Qwen2VLForConditionalGeneration(nn.Module, SupportsMultiModal,
|
||||
image_grid_thw=image_grid_thw)
|
||||
|
||||
if image_embeds is not None:
|
||||
image_embeds = self._validate_and_reshape_mm_tensor(
|
||||
image_embeds, "image embeds")
|
||||
|
||||
if not isinstance(image_embeds, torch.Tensor):
|
||||
raise ValueError("Incorrect type of image embeddings. "
|
||||
f"Got type: {type(image_embeds)}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user