Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
4c04eef7
Unverified
Commit
4c04eef7
authored
Sep 10, 2025
by
Wenlong Wang
Committed by
GitHub
Sep 10, 2025
Browse files
[BugFix][Multi Modal] Fix TensorSchema shape mismatch in Molmo (#24559)
Signed-off-by:
wwl2755
<
wangwenlong2755@gmail.com
>
parent
f36355ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
vllm/model_executor/models/molmo.py
vllm/model_executor/models/molmo.py
+8
-6
No files found.
vllm/model_executor/models/molmo.py
View file @
4c04eef7
...
...
@@ -76,20 +76,22 @@ class MolmoImageInputs(TensorSchema):
"""
Dimensions:
- bn: Batch size * number of images
- nc: Number of crops
- nc: Number of crops
(dynamic)
- np: Number of patches
- tp: Token sequence positions
- pd: Patch dimension
"""
images
:
Annotated
[
Union
[
torch
.
Tensor
,
list
[
torch
.
Tensor
]],
TensorShape
(
"bn"
,
"nc"
,
"np"
,
"pd"
)]
TensorShape
(
"bn"
,
"nc"
,
"np"
,
"pd"
,
dynamic_dims
=
{
"nc"
})]
# Number of crops may vary per batch and image, so pass it as a list.
image_masks
:
Annotated
[
Optional
[
Union
[
torch
.
Tensor
,
list
[
torch
.
Tensor
]]],
TensorShape
(
"bn"
,
"nc"
,
"np"
)]
TensorShape
(
"bn"
,
"nc"
,
"np"
,
dynamic_dims
=
{
"nc"
}
)]
feat_is_patch
:
Annotated
[
Union
[
torch
.
Tensor
,
list
[
torch
.
Tensor
]],
TensorShape
(
"bn"
,
"nc"
,
"np"
)]
feat_is_patch
:
Annotated
[
Union
[
torch
.
Tensor
,
list
[
torch
.
Tensor
]],
TensorShape
(
"bn"
,
"nc"
,
"tp"
,
dynamic_dims
=
{
"nc"
})]
# A boolean mask indicating which image features correspond to patch tokens.
num_crops
:
Annotated
[
torch
.
Tensor
,
TensorShape
(
"bn"
)]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment