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
68bc8170
Unverified
Commit
68bc8170
authored
Jun 10, 2024
by
Roger Wang
Committed by
GitHub
Jun 10, 2024
Browse files
[Frontend][Misc] Enforce Pixel Values as Input Type for VLMs in API Server (#5374)
parent
5884c2b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
vllm/entrypoints/openai/api_server.py
vllm/entrypoints/openai/api_server.py
+10
-0
No files found.
vllm/entrypoints/openai/api_server.py
View file @
68bc8170
...
...
@@ -183,6 +183,16 @@ if __name__ == "__main__":
served_model_names
=
[
args
.
model
]
engine_args
=
AsyncEngineArgs
.
from_cli_args
(
args
)
# Enforce pixel values as image input type for vision language models
# when serving with API server
if
engine_args
.
image_input_type
is
not
None
and
\
engine_args
.
image_input_type
.
upper
()
!=
"PIXEL_VALUES"
:
raise
ValueError
(
f
"Invalid image_input_type:
{
engine_args
.
image_input_type
}
. "
"Only --image-input-type 'pixel_values' is supported for serving "
"vision language models with the vLLM API server."
)
engine
=
AsyncLLMEngine
.
from_engine_args
(
engine_args
,
usage_context
=
UsageContext
.
OPENAI_API_SERVER
)
...
...
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