[Bugfix] Allow dynamic number of patches for llava_onevision (#23525)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-08-25 16:34:54 +08:00
committed by GitHub
parent 0cb7b065c3
commit ebafb0936d

View File

@ -75,7 +75,7 @@ class LlavaOnevisionImagePixelInputs(TensorSchema):
pixel_values: Annotated[
Union[torch.Tensor, list[torch.Tensor]],
TensorShape("bn", "np", 3, "h", "w"),
TensorShape("bn", "np", 3, "h", "w", dynamic_dims={"np"}),
]
image_sizes: Annotated[Optional[torch.Tensor], TensorShape("bn", 2)]