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
8c01b802
Unverified
Commit
8c01b802
authored
Jan 24, 2025
by
Isotr0py
Committed by
GitHub
Jan 23, 2025
Browse files
[Bugfix] Fix broken internvl2 inference with v1 (#12360)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
99d01a5e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
vllm/multimodal/utils.py
vllm/multimodal/utils.py
+7
-2
No files found.
vllm/multimodal/utils.py
View file @
8c01b802
...
@@ -503,9 +503,14 @@ def group_mm_inputs_by_modality(
...
@@ -503,9 +503,14 @@ def group_mm_inputs_by_modality(
if
len
(
mm_input
.
modalities
)
>
1
:
if
len
(
mm_input
.
modalities
)
>
1
:
return
id
(
mm_input
)
return
id
(
mm_input
)
# Otherwise return the modality string
elif
len
(
mm_input
.
modalities
)
==
1
:
return
list
(
mm_input
.
modalities
)[
0
]
return
list
(
mm_input
.
modalities
)[
0
]
# FIXME(Isotr0py): Modality of mm_input from legacy pipeline is empty,
# this is used to make InternVL with legacy pipeline still work with v1.
else
:
return
""
return
[
return
[
list
(
group
)
for
_
,
group
in
groupby
(
mm_inputs
,
key
=
modality_group_func
)
list
(
group
)
for
_
,
group
in
groupby
(
mm_inputs
,
key
=
modality_group_func
)
]
]
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