From e1bc001872985a23af65c367b802ff8fb44edafc Mon Sep 17 00:00:00 2001 From: JoyFuture <35593546+JoyFuture@users.noreply.github.com> Date: Fri, 8 May 2026 13:40:08 +0800 Subject: [PATCH] fix(mimo_v2): auto-disable multimodal when vision/audio configs are absent (#24652) --- python/sglang/srt/configs/model_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/sglang/srt/configs/model_config.py b/python/sglang/srt/configs/model_config.py index 4c2a7231e..0e62338f6 100644 --- a/python/sglang/srt/configs/model_config.py +++ b/python/sglang/srt/configs/model_config.py @@ -226,6 +226,16 @@ class ModelConfig: logger.info( f"Multimodal is disabled for {self.hf_config.model_type}. To enable it, set --enable-multimodal." ) + elif self.hf_config.architectures[0] in MIMO_V2_MULTIMODAL_ARCHS and not ( + hasattr(self.hf_config, "vision_config") + and hasattr(self.hf_config, "audio_config") + ): + enable_multimodal = False + logger.info( + "Multimodal is disabled for this MiMoV2 checkpoint: " + "vision_config/audio_config not found in the model config " + "(likely a text-only MiMoV2 variant)." + ) else: enable_multimodal = True