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
fbd8595c
Unverified
Commit
fbd8595c
authored
Aug 10, 2025
by
Isotr0py
Committed by
GitHub
Aug 09, 2025
Browse files
[Bugfix] Fix basic models tests hanging due to mm processor creation (#22571)
Signed-off-by:
Isotr0py
<
mozf@mail2.sysu.edu.cn
>
parent
5a16fa61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
vllm/multimodal/registry.py
vllm/multimodal/registry.py
+23
-5
No files found.
vllm/multimodal/registry.py
View file @
fbd8595c
...
@@ -138,8 +138,8 @@ class MultiModalRegistry:
...
@@ -138,8 +138,8 @@ class MultiModalRegistry:
if
not
model_config
.
is_multimodal_model
:
if
not
model_config
.
is_multimodal_model
:
return
False
return
False
processor
=
self
.
create_processo
r
(
model_config
,
disable_cache
=
Fals
e
)
info
=
self
.
_
create_process
ing_inf
o
(
model_config
,
tokenizer
=
Non
e
)
supported_modalities
=
processor
.
info
.
get_supported_mm_limits
()
supported_modalities
=
info
.
get_supported_mm_limits
()
mm_config
=
model_config
.
get_multimodal_config
()
mm_config
=
model_config
.
get_multimodal_config
()
...
@@ -278,6 +278,26 @@ class MultiModalRegistry:
...
@@ -278,6 +278,26 @@ class MultiModalRegistry:
model_cls
,
_
=
get_model_architecture
(
model_config
)
model_cls
,
_
=
get_model_architecture
(
model_config
)
return
model_cls
return
model_cls
def
_create_processing_ctx
(
self
,
model_config
:
"ModelConfig"
,
tokenizer
:
Optional
[
AnyTokenizer
]
=
None
,
)
->
InputProcessingContext
:
if
tokenizer
is
None
and
not
model_config
.
skip_tokenizer_init
:
tokenizer
=
cached_tokenizer_from_config
(
model_config
)
return
InputProcessingContext
(
model_config
,
tokenizer
)
def
_create_processing_info
(
self
,
model_config
:
"ModelConfig"
,
*
,
tokenizer
:
Optional
[
AnyTokenizer
]
=
None
,
)
->
BaseProcessingInfo
:
model_cls
=
self
.
_get_model_cls
(
model_config
)
factories
=
self
.
_processor_factories
[
model_cls
]
ctx
=
self
.
_create_processing_ctx
(
model_config
,
tokenizer
)
return
factories
.
info
(
ctx
)
def
create_processor
(
def
create_processor
(
self
,
self
,
model_config
:
"ModelConfig"
,
model_config
:
"ModelConfig"
,
...
@@ -291,15 +311,13 @@ class MultiModalRegistry:
...
@@ -291,15 +311,13 @@ class MultiModalRegistry:
if
not
model_config
.
is_multimodal_model
:
if
not
model_config
.
is_multimodal_model
:
raise
ValueError
(
f
"
{
model_config
.
model
}
is not a multimodal model"
)
raise
ValueError
(
f
"
{
model_config
.
model
}
is not a multimodal model"
)
if
tokenizer
is
None
and
not
model_config
.
skip_tokenizer_init
:
tokenizer
=
cached_tokenizer_from_config
(
model_config
)
if
disable_cache
is
None
:
if
disable_cache
is
None
:
disable_cache
=
not
model_config
.
enable_mm_processor_cache
disable_cache
=
not
model_config
.
enable_mm_processor_cache
model_cls
=
self
.
_get_model_cls
(
model_config
)
model_cls
=
self
.
_get_model_cls
(
model_config
)
factories
=
self
.
_processor_factories
[
model_cls
]
factories
=
self
.
_processor_factories
[
model_cls
]
ctx
=
InputP
rocessing
Context
(
model_config
,
tokenizer
)
ctx
=
self
.
_create_p
rocessing
_ctx
(
model_config
,
tokenizer
)
cache
=
None
if
disable_cache
else
self
.
_get_processor_cache
(
cache
=
None
if
disable_cache
else
self
.
_get_processor_cache
(
model_config
)
model_config
)
...
...
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