[Bugfix] Vendor MiniCPMV/MiniCPMO processors to unblock Transformers v5 (#44282)

Signed-off-by: guanwei-wu <b08901019@ntu.edu.tw>
Signed-off-by: wjinxu <1299461899@qq.com>
Co-authored-by: guanwei-wu <b08901019@ntu.edu.tw>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
王金旭
2026-06-02 07:14:38 -07:00
committed by GitHub
co-authored by guanwei-wu Cursor
parent 0cbc48c4f9
commit 0bdfd5eb84
7 changed files with 965 additions and 16 deletions
+8
View File
@@ -545,6 +545,14 @@ class MiniCPMVProcessingInfo(BaseProcessingInfo):
def get_hf_processor(self, **kwargs: object):
hf_processor = self.ctx.get_hf_processor(**kwargs)
from vllm.transformers_utils.processors.minicpmv import MiniCPMVProcessor
vendored_processor = MiniCPMVProcessor(
image_processor=hf_processor.image_processor,
tokenizer=hf_processor.tokenizer,
)
hf_processor = vendored_processor
# NumPy arrays are considered as Iterable but not Sequence in
# https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L428
image_processor = hf_processor.image_processor # type: ignore