mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-03 12:28:43 +08:00
[Bugfix] Fix broken internvl2 inference with v1 (#12360)
Signed-off-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
parent
99d01a5e3d
commit
8c01b8022c
@ -503,8 +503,13 @@ def group_mm_inputs_by_modality(
|
||||
if len(mm_input.modalities) > 1:
|
||||
return id(mm_input)
|
||||
|
||||
# Otherwise return the modality string
|
||||
return list(mm_input.modalities)[0]
|
||||
elif len(mm_input.modalities) == 1:
|
||||
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 [
|
||||
list(group) for _, group in groupby(mm_inputs, key=modality_group_func)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user