From ef21879c3a9fdd5e8dd315c934eeff4c383b74f1 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Fri, 30 Jan 2026 02:43:26 +0000 Subject: [PATCH] Refactor GPU model runner to streamline multimodal configuration handling - Removed the unused import of supports_mm_encoder_only from interfaces. - Updated the dummy run check to utilize the multimodal configuration directly, enhancing clarity and future extensibility. Signed-off-by: tzhouam --- vllm_omni/worker/gpu_model_runner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vllm_omni/worker/gpu_model_runner.py b/vllm_omni/worker/gpu_model_runner.py index a486212aa..60ec053d1 100644 --- a/vllm_omni/worker/gpu_model_runner.py +++ b/vllm_omni/worker/gpu_model_runner.py @@ -8,7 +8,7 @@ from vllm.distributed.parallel_state import get_pp_group from vllm.forward_context import set_forward_context from vllm.logger import init_logger from vllm.model_executor.layers.rotary_embedding import MRotaryEmbedding -from vllm.model_executor.models.interfaces import supports_mm_encoder_only, supports_mrope +from vllm.model_executor.models.interfaces import supports_mrope from vllm.model_executor.models.interfaces_base import VllmModelForPooling from vllm.sampling_params import SamplingType from vllm.utils.import_utils import LazyLoader @@ -447,7 +447,8 @@ class OmniGPUModelRunner(GPUModelRunner): remove_lora: If False, dummy LoRAs are not destroyed after the run activate_lora: If False, dummy_run is performed without LoRAs. """ - if supports_mm_encoder_only(self.model): + mm_config = self.vllm_config.model_config.multimodal_config + if mm_config and mm_config.mm_encoder_only: # The current dummy run only covers LM execution, so we can skip it. # mm encoder dummy run may need to add in the future. return torch.tensor([]), torch.tensor([])