Skip to content

Commit 9c24073

Browse files
Isotr0pyyiliu30
authored andcommitted
[Bugfix] Fix PixtralHFImagePixelInputs dynamic shape check (vllm-project#22827)
Signed-off-by: Isotr0py <[email protected]>
1 parent 7e6f685 commit 9c24073

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/models/multimodal/test_tensor_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ def validate_model_input(model):
153153
if hasattr(model, method_name):
154154
getattr(model, method_name)(**mm_kwargs)
155155

156-
vllm_model.apply_model(validate_model_input)
156+
vllm_model.apply_model(validate_model_input)

vllm/model_executor/models/llava.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ class PixtralHFImagePixelInputs(TensorSchema):
7272
in which case the data is passed as a list instead of a batched tensor.
7373
"""
7474
type: Literal["pixel_values_pixtral"] = "pixel_values_pixtral"
75-
pixel_values: Annotated[Union[torch.Tensor, list[torch.Tensor]],
76-
TensorShape("bn", "c", "h", "w")]
75+
pixel_values: Annotated[
76+
Union[torch.Tensor, list[torch.Tensor]],
77+
TensorShape("bn", "c", "h", "w", dynamic_dims={"h", "w"})]
7778

7879

7980
class LlavaImageEmbeddingInputs(TensorSchema):

0 commit comments

Comments
 (0)