Skip to content

Commit

Permalink
fix handling of image_input type (vllm<=0.5.0.post1)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrifiro committed Jul 3, 2024
1 parent 9ff9ece commit ef32ca9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vllm_tgis_adapter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ async def run_http_server(

engine_args = AsyncEngineArgs.from_cli_args(args)

# Enforce pixel values as image input type for vision language models
# when serving with API server
if (
if hasattr(engine_args, "image_input_type") and ( # vllm <= 0.5.0.post1
engine_args.image_input_type is not None
and engine_args.image_input_type.upper() != "PIXEL_VALUES"
):
# Enforce pixel values as image input type for vision language models
# when serving with API server
raise ValueError(
f"Invalid image_input_type: {engine_args.image_input_type}. "
"Only --image-input-type 'pixel_values' is supported for serving "
Expand Down

0 comments on commit ef32ca9

Please sign in to comment.