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
139a97ec
Unverified
Commit
139a97ec
authored
Jul 28, 2025
by
Cyrus Leung
Committed by
GitHub
Jul 28, 2025
Browse files
[Bugfix] Fix shape checking for Fuyu (#21709)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
18cc33dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
vllm/model_executor/models/fuyu.py
vllm/model_executor/models/fuyu.py
+5
-4
No files found.
vllm/model_executor/models/fuyu.py
View file @
139a97ec
...
...
@@ -55,14 +55,15 @@ class FuyuImagePatchInputs(TensorSchema):
"""
Dimensions:
- bn: Batch size * number of images
- fn: Num channels * patch_size_x * patch_size_y
- bnp: Batch size * number of images * number of patches
- fn: patch_size_x * patch_size_y * num_channels
"""
type
:
Literal
[
"image_patches"
]
=
"image_patches"
flat_data
:
Annotated
[
torch
.
Tensor
,
TensorShape
(
"bn"
,
"fn"
),
TensorShape
(
"bn
p
"
,
"fn"
),
]
patches_per_image
:
Annotated
[
list
[
int
],
TensorShape
(
"bn"
)]
...
...
@@ -309,8 +310,8 @@ class FuyuForCausalLM(nn.Module, SupportsMultiModal, SupportsPP):
image_patches
=
kwargs
.
pop
(
"image_patches"
,
None
)
if
image_patches
is
not
None
:
image_patches_flat
=
flatten_bn
(
image_patches
)
flat_data
=
flatten_bn
(
image_patches
,
concat
=
True
)
.
data
.
to
(
self
.
vision_embed_tokens
.
weight
.
dtype
)
flat_data
=
flatten_bn
(
image_patches
_flat
,
concat
=
True
)
return
FuyuImagePatchInputs
(
type
=
"image_patches"
,
flat_data
=
flat_data
,
...
...
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