From f5a78f2ad73dda260e87477ae491157e59f5de1d Mon Sep 17 00:00:00 2001 From: Zijing Liu Date: Thu, 24 Sep 2026 03:47:50 -0700 Subject: [PATCH] [Multimodal] Reuse the supplied tokenizer in the MiniMax-M3 VL processor (#58460) Signed-off-by: Zijing Liu --- vllm/transformers_utils/processors/minimax_m3.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vllm/transformers_utils/processors/minimax_m3.py b/vllm/transformers_utils/processors/minimax_m3.py index 60fa7ed536..dbf47d0b11 100644 --- a/vllm/transformers_utils/processors/minimax_m3.py +++ b/vllm/transformers_utils/processors/minimax_m3.py @@ -522,9 +522,14 @@ class MiniMaxVLProcessor(ProcessorMixin): # register() API now stores classes as {"pil": cls} dicts in # _extra_content, but get_possibly_dynamic_module() still calls # .__name__ on the raw value, crashing with AttributeError on dicts. - tokenizer = AutoTokenizer.from_pretrained( - pretrained_model_name_or_path, **kwargs - ) + # + # Reuse the tokenizer passed by vLLM instead of loading another one, + # and keep it out of the kwargs forwarded to the sub-processor loaders. + tokenizer = kwargs.pop("tokenizer", None) + if tokenizer is None: + tokenizer = AutoTokenizer.from_pretrained( + pretrained_model_name_or_path, **kwargs + ) image_processor = MiniMaxM3VLImageProcessor.from_pretrained( pretrained_model_name_or_path, **kwargs )