From cd8c3ccd95596db38dfeb610fa19e3b22d9b857f Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Sat, 3 Feb 2024 11:48:01 +0800 Subject: [PATCH] Fix `is_multimodal_model` judge (#132) --- python/sglang/srt/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/utils.py b/python/sglang/srt/utils.py index 47c9aab91..54274f366 100644 --- a/python/sglang/srt/utils.py +++ b/python/sglang/srt/utils.py @@ -233,12 +233,12 @@ def wrap_kernel_launcher(kernel): def is_multimodal_model(model): if isinstance(model, str): - return "llava" or "yi-vl" in model + return "llava" in model or "yi-vl" in model from sglang.srt.model_config import ModelConfig if isinstance(model, ModelConfig): model_path = model.path.lower() - return "llava" in model_path or "yi-vl" in model_path + return "llava" in model_path or "yi-vl" in model_path raise Exception("unrecognized type")