[Multimodal] Reuse the supplied tokenizer in the MiniMax-M3 VL processor (#58460)
Signed-off-by: Zijing Liu <liuzijing2014@gmail.com>
Zijing Liu committed
Sep 24, 2026 at 03:47 UTC
f5a78f2ad73dda260e87477ae491157e59f5de1d
1 file changed
+8
-3
vllm/transformers_utils/processors/minimax_m3.py
+8
-3
@@ -522,9 +522,14 @@ class MiniMaxVLProcessor(ProcessorMixin):
522
# register() API now stores classes as {"pil": cls} dicts in
523
# _extra_content, but get_possibly_dynamic_module() still calls
524
# .__name__ on the raw value, crashing with AttributeError on dicts.
525
- tokenizer = AutoTokenizer.from_pretrained(
526
- pretrained_model_name_or_path, **kwargs
527
- )
525
+ #
526
+ # Reuse the tokenizer passed by vLLM instead of loading another one,
527
+ # and keep it out of the kwargs forwarded to the sub-processor loaders.
528
+ tokenizer = kwargs.pop("tokenizer", None)
529
+ if tokenizer is None:
530
+ tokenizer = AutoTokenizer.from_pretrained(
531
+ pretrained_model_name_or_path, **kwargs
532
+ )
533
image_processor = MiniMaxM3VLImageProcessor.from_pretrained(
534
pretrained_model_name_or_path, **kwargs
535
)