From 7c89b55927fe51bf8c54b0eadf8f73c039df490d Mon Sep 17 00:00:00 2001 From: Cherrytest Date: Thu, 25 Sep 2025 23:22:17 +0000 Subject: [PATCH] Upload configuration_dots.py with ModelScope SDK --- configuration_dots.py | 1 + preprocessor_config.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/configuration_dots.py b/configuration_dots.py index 55901c2..f128b8a 100644 --- a/configuration_dots.py +++ b/configuration_dots.py @@ -70,6 +70,7 @@ class DotsVLProcessor(Qwen2_5_VLProcessor): def __init__(self, image_processor=None, tokenizer=None, chat_template=None, **kwargs): super().__init__(image_processor, tokenizer, chat_template=chat_template) self.image_token = "<|imgpad|>" if not hasattr(tokenizer, "image_token") else tokenizer.image_token + self.image_token_id = 151665 if not hasattr(tokenizer, "image_token_id") else tokenizer.image_token_id AutoProcessor.register("dots_ocr", DotsVLProcessor) diff --git a/preprocessor_config.json b/preprocessor_config.json index 5786e21..c5e511a 100644 --- a/preprocessor_config.json +++ b/preprocessor_config.json @@ -1,4 +1,7 @@ { + "auto_map": { + "AutoProcessor": "configuration_dots.DotsVLProcessor" + }, "min_pixels": 3136, "max_pixels": 11289600, "patch_size": 14,