Upload configuration_dots.py with ModelScope SDK

This commit is contained in:
Cherrytest 2025-09-25 23:22:17 +00:00
parent 6007ece62c
commit 7c89b55927
2 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,7 @@ class DotsVLProcessor(Qwen2_5_VLProcessor):
def __init__(self, image_processor=None, tokenizer=None, chat_template=None, **kwargs): def __init__(self, image_processor=None, tokenizer=None, chat_template=None, **kwargs):
super().__init__(image_processor, tokenizer, chat_template=chat_template) 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 = "<|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) AutoProcessor.register("dots_ocr", DotsVLProcessor)

View File

@ -1,4 +1,7 @@
{ {
"auto_map": {
"AutoProcessor": "configuration_dots.DotsVLProcessor"
},
"min_pixels": 3136, "min_pixels": 3136,
"max_pixels": 11289600, "max_pixels": 11289600,
"patch_size": 14, "patch_size": 14,