Upload configuration_dots.py with ModelScope SDK
This commit is contained in:
parent
6007ece62c
commit
7c89b55927
@ -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)
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user