From 67239c4c4235ae668971625304390ed2078b4dd0 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Fri, 30 Jan 2026 16:30:10 +0000 Subject: [PATCH] Fix encoder-decoder model disabling mm processor cache (#33236) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- tests/models/multimodal/processing/test_common.py | 5 +++-- vllm/config/model.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/models/multimodal/processing/test_common.py b/tests/models/multimodal/processing/test_common.py index 57b7771928..b7348dc4ae 100644 --- a/tests/models/multimodal/processing/test_common.py +++ b/tests/models/multimodal/processing/test_common.py @@ -241,14 +241,15 @@ def _test_processing_correctness( revision=model_info.revision, trust_remote_code=model_info.trust_remote_code, hf_overrides=model_info.hf_overrides, - # Ensure that the cache can fit all of the data - mm_processor_cache_gb=2048, skip_tokenizer_init=model_info.require_embed_inputs, enable_prompt_embeds=model_info.require_embed_inputs, enable_mm_embeds=model_info.require_embed_inputs, enforce_eager=model_info.enforce_eager, dtype=model_info.dtype, ) + # Ensure that the cache can fit all of the data + # (set after because ModelConfig would set it to 0 for encoder-decoder models) + model_config.multimodal_config.mm_processor_cache_gb = 2048 model_cls = MULTIMODAL_REGISTRY._get_model_cls(model_config) factories = model_cls._processor_factory diff --git a/vllm/config/model.py b/vllm/config/model.py index c172069c89..1254d75ace 100644 --- a/vllm/config/model.py +++ b/vllm/config/model.py @@ -572,7 +572,7 @@ class ModelConfig: self.max_model_len = self.get_and_verify_max_len(self.max_model_len) if self.is_encoder_decoder: - self.mm_processor_cache_gb = 0 + mm_processor_cache_gb = 0 logger.info("Encoder-decoder model detected, disabling mm processor cache.") # Init multimodal config if needed