From 91877a9f9c8763a504373e41d238dbf9adf65f8c Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Sun, 6 Oct 2024 15:43:32 -0700 Subject: [PATCH] Fix modality for image inputs (#1592) --- python/sglang/srt/managers/schedule_batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/managers/schedule_batch.py b/python/sglang/srt/managers/schedule_batch.py index 98fc5581c..f4d41feef 100644 --- a/python/sglang/srt/managers/schedule_batch.py +++ b/python/sglang/srt/managers/schedule_batch.py @@ -144,7 +144,7 @@ class ImageInputs: ] ret.image_sizes = obj["image_sizes"] # Only when pixel values is not None we have modalities - ret.modalities = obj["modalities"] + ret.modalities = obj["modalities"] or ["image"] return ret