From 5ad494b103df6d8346cf4a5544fce9f90ef590da Mon Sep 17 00:00:00 2001 From: princepride Date: Fri, 20 Mar 2026 14:21:26 +0000 Subject: [PATCH] remove mm_prefix_lm patch because vllm==0.18.0 already support Signed-off-by: princepride --- vllm_omni/patch.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/vllm_omni/patch.py b/vllm_omni/patch.py index c9dea609e61..6daef1a23fa 100644 --- a/vllm_omni/patch.py +++ b/vllm_omni/patch.py @@ -1,8 +1,6 @@ import sys -from functools import cached_property as _cached_property from aenum import extend_enum -from vllm.config import ModelConfig as _ModelConfig from vllm.inputs.data import TokensPrompt as _OriginalTokensPrompt from vllm.model_executor.layers.rotary_embedding import ( MRotaryEmbedding as _OriginalMRotaryEmbedding, @@ -45,20 +43,6 @@ def _patched_glm_image_text_config_init(self, *args, **kwargs): # GlmImageTextConfig not available, skip patching pass - -# Patch ModelConfig.is_mm_prefix_lm to include Bagel (bidirectional attention -# for multimodal prefix positions, same as Gemma3/Molmo2/PaliGemma). -_orig_is_mm_prefix_lm = _ModelConfig.__dict__["is_mm_prefix_lm"].func - - -@_cached_property -def _patched_is_mm_prefix_lm(self) -> bool: - return _orig_is_mm_prefix_lm(self) or getattr(self.hf_config, "model_type", None) == "bagel" - - -_patched_is_mm_prefix_lm.__set_name__(_ModelConfig, "is_mm_prefix_lm") -_ModelConfig.is_mm_prefix_lm = _patched_is_mm_prefix_lm - # Extend RequestStatus enum with omni-specific statuses if not hasattr(RequestStatus, "WAITING_FOR_CHUNK"): # The value - 1 is intentionally chosen to ensure it is treated