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
b3683829
Unverified
Commit
b3683829
authored
Oct 27, 2025
by
Cyrus Leung
Committed by
GitHub
Oct 27, 2025
Browse files
[Model] Deprecate `merge_by_field_config=False` (#27551)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
a806c14c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
vllm/multimodal/utils.py
vllm/multimodal/utils.py
+14
-4
No files found.
vllm/multimodal/utils.py
View file @
b3683829
...
@@ -18,6 +18,7 @@ from PIL import Image, UnidentifiedImageError
...
@@ -18,6 +18,7 @@ from PIL import Image, UnidentifiedImageError
import
vllm.envs
as
envs
import
vllm.envs
as
envs
from
vllm.connections
import
HTTPConnection
,
global_http_connection
from
vllm.connections
import
HTTPConnection
,
global_http_connection
from
vllm.logger
import
init_logger
from
vllm.utils.jsontree
import
json_map_leaves
from
vllm.utils.jsontree
import
json_map_leaves
from
.audio
import
AudioMediaIO
from
.audio
import
AudioMediaIO
...
@@ -25,8 +26,6 @@ from .base import MediaIO
...
@@ -25,8 +26,6 @@ from .base import MediaIO
from
.image
import
ImageEmbeddingMediaIO
,
ImageMediaIO
from
.image
import
ImageEmbeddingMediaIO
,
ImageMediaIO
from
.video
import
VideoMediaIO
from
.video
import
VideoMediaIO
_M
=
TypeVar
(
"_M"
)
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
.inputs
import
(
from
.inputs
import
(
BatchedTensorInputs
,
BatchedTensorInputs
,
...
@@ -38,11 +37,15 @@ else:
...
@@ -38,11 +37,15 @@ else:
MultiModalKwargsItem
=
Any
MultiModalKwargsItem
=
Any
MultiModalPlaceholderDict
=
Any
MultiModalPlaceholderDict
=
Any
logger
=
init_logger
(
__name__
)
global_thread_pool
=
ThreadPoolExecutor
(
global_thread_pool
=
ThreadPoolExecutor
(
max_workers
=
envs
.
VLLM_MEDIA_LOADING_THREAD_COUNT
max_workers
=
envs
.
VLLM_MEDIA_LOADING_THREAD_COUNT
)
)
atexit
.
register
(
global_thread_pool
.
shutdown
)
atexit
.
register
(
global_thread_pool
.
shutdown
)
_M
=
TypeVar
(
"_M"
)
class
MediaConnector
:
class
MediaConnector
:
def
__init__
(
def
__init__
(
...
@@ -413,14 +416,21 @@ def group_mm_kwargs_by_modality(
...
@@ -413,14 +416,21 @@ def group_mm_kwargs_by_modality(
"`merge_by_field_config` arg, please update your model runner "
"`merge_by_field_config` arg, please update your model runner "
"according to https://github.com/vllm-project/vllm/pull/25676."
"according to https://github.com/vllm-project/vllm/pull/25676."
)
)
if
merge_by_field_config
is
False
:
logger
.
warning_once
(
"The legacy code for batching multi-modal kwargs is deprecated and "
"will be removed in v0.12. Please update your model with "
"`merge_by_field_config=True` to use the new code defined by "
"`MultiModalFieldConfig`. You can refer to "
"https://github.com/vllm-project/vllm/issues/26149 "
"for some examples on how to do this."
)
from
vllm.multimodal.inputs
import
MultiModalKwargs
,
MultiModalKwargsItems
from
vllm.multimodal.inputs
import
MultiModalKwargs
,
MultiModalKwargsItems
for
modality
,
items
in
groupby
(
mm_kwargs
,
key
=
lambda
item
:
item
.
modality
):
for
modality
,
items
in
groupby
(
mm_kwargs
,
key
=
lambda
item
:
item
.
modality
):
items_lst
=
list
(
items
)
items_lst
=
list
(
items
)
# TODO: Deprecate `merge_by_field_config` once
# we have migrated all in-tree models
if
merge_by_field_config
:
if
merge_by_field_config
:
mm_kwargs_group
:
BatchedTensorInputs
=
dict
(
mm_kwargs_group
:
BatchedTensorInputs
=
dict
(
MultiModalKwargsItems
.
from_seq
(
items_lst
).
get_data
(
MultiModalKwargsItems
.
from_seq
(
items_lst
).
get_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