"vscode:/vscode.git/clone" did not exist on "36e35facd6720b31c10b3e5bf14222bf25cd8744"
Unverified Commit 68bc8170 authored by Roger Wang's avatar Roger Wang Committed by GitHub
Browse files

[Frontend][Misc] Enforce Pixel Values as Input Type for VLMs in API Server (#5374)

parent 5884c2b4
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment