Skip to content

Commit 5789b6d

Browse files
guarinclaude
andauthored
Add Unlimited OCR (#46836)
* Add Unlimited OCR * update * add CLIP * add r-swa * fix tests * update expected values * enable _can_compile_fullgraph * fix downsample outputs * use temp repo for tests * fix mlp_layer_types None * add partial conversion mapping * handle sparse layers * update conversion mapping * update num_hidden_layers * ignore lm_head * update conversion mapping * draft docs * add default config values * update text config handling * update post init * update * fix to dtype * update docs * update MODELS_WITH_INCORRECT_HUB_TOKENIZER_CLASS * update conversion mapping to unlimted_ocr * add num_local_patches * update num_local_patches handling * inline _preprocess * update tests * update docs * add multi page test * update pad_to_square * update tile handling * update tile handling * update multi page test * update docs * add cache * update test * add better error message * add reference_sliding_attention * update * refactor * optimize * fix-repo * update docs * update tests * rename to local_patches_grid * add comment * update comment * rename * cleanup * add architecture to docs * fix modular generation * remove mask helper * add image processing tests * remove redundant var * fix-repo * update docstring * add broken static layer * make static cache work * test * cleanup * cleanup dynamic * update * update static reference sliding window cache * move create mask to top level * move cache to model files * remove unused config attributes * cleanup * fix check-repo * handle weird resize/padding * handle past_key_values is None * update deepseek ocr2 processing * update date * use replace_image_token * add processing tests * update tests * clean up test * add all imports to __init__ * updaet names * typos * disable flex attn * enable torch export tests * update no_split_modules * enable skipped tests * update conversion mapping * remove PretrainedConfig * add replace_image_tokens tests * remove can_return_tuple * add _input_embed_layer * update tests * update docs * update docs and handle image dtype * fix conversion mapping * fix cache * update docs * cleanup * drop UnlimitedOcrTextModel conversion mapping * allow mixed layer types * add UnlimitedOcrSlidingWindowNoRepeatNgramLogitsProcessor * add UnlimitedOcrGenerationConfig * allow custom generation config * refactor UnlimitedOcrSlidingWindowNoRepeatNgramLogitsProcessor * refactor UnlimitedOcrSlidingWindowNoRepeatNgramLogitsProcessor * update config docstrings * cleanup UnlimitedOcrVisionEmbeddings * cleanup UnlimitedOcrVisionModel * update docs and docstrings * update tests * update init * update docs * add generation test * remove getattr * update tests to use revision * update tests * fix-repo * cleanup tests * update get_max_length * update date * add cache sliding window too small test * fix get_max_length * add comments * update comment * update test * add full cache test * add detection docs * fix-repo * move logits processor * update test * update docstring * remove import * inherit * update docs * add _prefill * update max_new_tokens * Add return_detections * Add return_detections * cleanup _preprocess * remove total=False * remane to maximum_pad_value * cleanup * add chat template * add comment * remove decorators * convert to int * handle cache record_past * cleanup validate_inputs * update pooler_output * cleanup masking * flatten images early * move doc to multimodal section, fix hfoption block * remove no-op image_newline renaming * add license header * fix config and image processor docstrings * remove dead _input_embed_layer from vision encoder * reuse base decode implementations and fix batch detections * only check image placeholders when images are passed * fix-repo * improve mask handling * replace end_prefill with set_prefill_length * simplify * try super.update * cleanup * fix kwargs * move logits processor test to test_logits_process.py Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * don't filter text config kwargs Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * remove use_sliding_window * handle patches grid * update expectations * remove test_all_params_have_gradient * refactor dynamic cache * update check * fix offset * add reorder_cache * handle overlapping prefill/window overlap * fix crop * update tests * fix-repo * cleanup * match static cache impl with dynamic one * add comment * update test utils * clarify comment * fix-repo * update * fixes * revert * cleanup docstrings * fixes * remove tensor option * skip export tests for now * use config default * re anton * change order * Remove None option * update * update to new conventions * update to match new cache crop * update tests * fix repo * update expectations * make tests more robust * relax tests --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 89d1c88 commit 5789b6d

30 files changed

Lines changed: 5720 additions & 102 deletions

‎docs/source/en/_toctree.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,8 @@
15631563
title: TVP
15641564
- local: model_doc/udop
15651565
title: UDOP
1566+
- local: model_doc/unlimited_ocr
1567+
title: UnlimitedOcr
15661568
- local: model_doc/video_llama_3
15671569
title: VideoLlama3
15681570
- local: model_doc/video_llava
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
<!--Copyright 2026 the HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
15+
16+
⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer.
17+
18+
-->
19+
*This model was published in HF papers on 2026-06-23 and contributed to Hugging Face Transformers on 2026-10-14.*
20+
21+
22+
# UnlimitedOcr
23+
24+
## Overview
25+
26+
The UnlimitedOcr model was proposed in [Unlimited OCR Works](https://huggingface.co/papers/2606.23050) by Youyang Yin, Huanhuan Liu, Qunyi Xie, Chaorun Liu, Shiqi Yang, Shaohua Wang, Zhanlong Liu, Hao Zou, Jinyue Chen, Shu Wei, Jingjing Wu, Mingxin Huang, Zhen Wu, Guibin Wang, Tengyu Du, and Lei Jia from Baidu Inc.
27+
28+
It is a single 3B parameter model with a standard context length of 32,768 tokens.
29+
30+
The abstract from the paper is the following:
31+
32+
*Recently, end-to-end OCR models, exemplified by DeepSeek OCR, have once again thrust OCR into the spotlight. A widely held view is that employing a large language model (LLM) as the decoder allows the model to leverage the prior distribution of language, leading to improved OCR performance. However, the downside is equally evident: as the output sequence lengthens, the accumulated KV cache drives up memory consumption and progressively slows down generation. This stands in stark contrast to humans, who exhibit no such decline in efficiency during long-horizon copying tasks. In this technical report, we propose Unlimited OCR, a model designed to emulate human parsing working memory. Taking DeepSeek OCR as the baseline, we replace all attention layers in the decoder with our proposed Reference Sliding Window Attention (R-SWA), which reduces attention computation costs while maintaining a constant KV cache throughout the entire decoding process. By combining the high compression rate of DeepSeek OCR's encoder with our constant KV cache design, Unlimited OCR can transcribe dozens of pages of documents in a single forward pass under a standard maximum length of 32K. More importantly, R-SWA is a general-purpose parsing attention mechanism — beyond OCR, it is equally applicable to tasks such as ASR, translation, etc. Codes and model weights are publicly available at http://github.com/baidu/Unlimited-OCR*
33+
34+
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/unlimited_ocr_architecture.png" width="600">
35+
36+
Unlimited-OCR supports two inference configurations: the default "gundam" mode uses 640x640 tiles with dynamic cropping for high-resolution documents, and "base" mode uses a single 1024x1024 global view for standard-resolution inputs. To enable base mode set `crop_to_patches=False` in the processor, or pass it via `processor_kwargs` when using [`~ProcessorMixin.apply_chat_template`].
37+
38+
The vision tower follows the two-stage approach from [DeepSeek-OCR-2](./deepseek_ocr2): a SAM ViT-B encoder feeds into a CLIP ViT encoder. Unlike DeepSeek-OCR-2, the CLIP features are additionally concatenated with the SAM features to yield the final image tokens. Unlimited-OCR also omits the learnable patch queries from DeepSeek-OCR-2.
39+
40+
The text model is identical to DeepSeek-OCR-2 with the additional Reference Sliding Window Attention (R-SWA). R-SWA applies only to generated tokens. All image and prompt tokens remain fully visible throughout decoding, so long documents do not lose context from earlier pages.
41+
42+
This model was contributed by [guarin](https://huggingface.co/guarin).
43+
The original code can be found [here](https://github.com/baidu/Unlimited-OCR).
44+
45+
> [!TIP]
46+
> The original implementation runs the model with [torch.autocast](https://pytorch.org/docs/stable/amp.html#torch.autocast) in bfloat16. Wrap the forward and generate calls in an autocast context to reproduce its outputs.
47+
>
48+
> ```python
49+
> with torch.autocast(device_type=model.device.type, dtype=torch.bfloat16):
50+
> output = model.generate(**inputs)
51+
> ```
52+
53+
<hfoptions id="usage">
54+
<hfoption id="Single-page OCR">
55+
56+
```python
57+
from transformers import AutoProcessor, AutoModelForImageTextToText
58+
59+
model = AutoModelForImageTextToText.from_pretrained("baidu/Unlimited-OCR", device_map="auto")
60+
processor = AutoProcessor.from_pretrained("baidu/Unlimited-OCR")
61+
62+
image = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_suggestion_form.jpg"
63+
messages = [
64+
{
65+
"role": "user",
66+
"content": [{"type": "image", "url": image}, {"type": "text", "text": "document parsing."}],
67+
}
68+
]
69+
inputs = processor.apply_chat_template(
70+
messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt"
71+
).to(model.device, model.dtype)
72+
73+
output = model.generate(**inputs, max_new_tokens=512)
74+
processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True)
75+
# image [383, 87, 497, 171]\ntext [333, 201, 558, 230]R&D QUALITY IMPROVEMENT\nSUGGESTION/SOLUTION FORM...
76+
77+
# All bounding boxes are in (x1, y1, x2, y2) format with coordinates normalized to [0, 999]
78+
```
79+
80+
### Batch processing
81+
82+
For batch processing, pass a list of messages. Set `padding=True` for the processor if images have different sizes.
83+
84+
```python
85+
from transformers import AutoProcessor, AutoModelForImageTextToText
86+
87+
model = AutoModelForImageTextToText.from_pretrained("baidu/Unlimited-OCR", device_map="auto")
88+
processor = AutoProcessor.from_pretrained("baidu/Unlimited-OCR")
89+
90+
image1 = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_suggestion_form.jpg"
91+
image2 = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_receipt.jpeg"
92+
messages = [
93+
[
94+
{
95+
"role": "user",
96+
"content": [{"type": "image", "url": image}, {"type": "text", "text": "document parsing."}],
97+
}
98+
]
99+
for image in [image1, image2]
100+
]
101+
inputs = processor.apply_chat_template(
102+
messages,
103+
add_generation_prompt=True,
104+
tokenize=True,
105+
return_dict=True,
106+
return_tensors="pt",
107+
processor_kwargs={"padding": True},
108+
).to(model.device, model.dtype)
109+
110+
output = model.generate(**inputs)
111+
processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True)
112+
# image [383, 87, 497, 171]\ntext [333, 201, 558, 230]R&D QUALITY IMPROVEMENT\nSUGGESTION/SOLUTION FORM...
113+
114+
# All bounding boxes are in (x1, y1, x2, y2) format with coordinates normalized to [0, 999]
115+
```
116+
117+
### Region detections
118+
119+
Set `skip_special_tokens=False` to wrap all detections and region types in `<|det|>...<|/det|>` markers. This is useful for further post-processing of the output, for example to plot the detected bounding boxes on the image. Each detection is wrapped as `<|det|>region_type [x1, y1, x2, y2]<|/det|>text...` with coordinates normalized to a `[0, 999]` range. Set `return_detections=True` to get an additional list of dictionaries with all detections parsed as `{"region_type": region_type, "box": [x1, y1, x2, y2], "text": "..."}`.
120+
121+
```python
122+
from transformers import AutoProcessor, AutoModelForImageTextToText
123+
124+
model = AutoModelForImageTextToText.from_pretrained("baidu/Unlimited-OCR", device_map="auto")
125+
processor = AutoProcessor.from_pretrained("baidu/Unlimited-OCR")
126+
127+
image = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_suggestion_form.jpg"
128+
messages = [
129+
{
130+
"role": "user",
131+
"content": [{"type": "image", "url": image}, {"type": "text", "text": "document parsing."}],
132+
}
133+
]
134+
inputs = processor.apply_chat_template(
135+
messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt"
136+
).to(model.device, model.dtype)
137+
138+
output = model.generate(**inputs)
139+
decoded, detections = processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False, return_detections=True)
140+
# <|det|>image [383, 87, 497, 171]<|/det|>\n<|det|>text [333, 201, 558, 230]<|/det|>R&D QUALITY IMPROVEMENT\nSUGGESTION/SOLUTION FORM...
141+
142+
# Visualization
143+
import random
144+
import matplotlib.pyplot as plt
145+
import matplotlib.patches as patches
146+
from transformers.image_utils import load_image
147+
148+
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_suggestion_form.jpg")
149+
width, height = image.size
150+
151+
figure, axis = plt.subplots(figsize=(10, 12))
152+
axis.imshow(image)
153+
for detection in detections:
154+
region_type = detection["region_type"]
155+
x1, y1, x2, y2 = detection["box"]
156+
x1, y1, x2, y2 = int(x1) / 999 * width, int(y1) / 999 * height, int(x2) / 999 * width, int(y2) / 999 * height
157+
color = (random.random(), random.random(), random.random())
158+
rectangle = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=1.5, edgecolor=color, facecolor="none")
159+
axis.add_patch(rectangle)
160+
axis.text(x1, y1, region_type, color="white", fontsize=8, backgroundcolor=color, verticalalignment="top")
161+
axis.axis("off")
162+
plt.show()
163+
```
164+
165+
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/unlimited_ocr_suggestion_form_boxes.jpg" width="600">
166+
167+
</hfoption>
168+
<hfoption id="Multi-page OCR">
169+
170+
Multi-page documents can be parsed jointly in a single forward pass by passing all page images together. Add one image block per page to the message so the model processes all pages as a continuous document.
171+
172+
```python
173+
from transformers import AutoProcessor, AutoModelForImageTextToText
174+
175+
model = AutoModelForImageTextToText.from_pretrained("baidu/Unlimited-OCR", device_map="auto")
176+
processor = AutoProcessor.from_pretrained("baidu/Unlimited-OCR")
177+
178+
page1 = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_suggestion_form.jpg"
179+
page2 = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/ocr_receipt.jpeg"
180+
181+
messages = [
182+
{
183+
"role": "user",
184+
"content": [{"type": "image", "url": page} for page in [page1, page2]]
185+
+ [{"type": "text", "text": "Multi page parsing."}],
186+
}
187+
]
188+
inputs = processor.apply_chat_template(
189+
messages,
190+
add_generation_prompt=True,
191+
tokenize=True,
192+
return_dict=True,
193+
return_tensors="pt",
194+
processor_kwargs={"crop_to_patches": False},
195+
).to(model.device, model.dtype)
196+
197+
output = model.generate(
198+
**inputs,
199+
no_repeat_ngram_window_size=1024, # default: 128, larger window size recommended for long documents
200+
)
201+
processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True)
202+
# <PAGE>image [382, 87, 489, 174]\ntitle [333, 201, 556, 230]R&D QUALITY IMPROVEMENT\nSUGGESTION/SCLUTION FORM...
203+
204+
# All bounding boxes are in (x1, y1, x2, y2) format with coordinates normalized to [0, 999]
205+
```
206+
207+
</hfoption>
208+
</hfoptions>
209+
210+
## UnlimitedOcrConfig
211+
212+
[[autodoc]] UnlimitedOcrConfig
213+
214+
## UnlimitedOcrTextConfig
215+
216+
[[autodoc]] UnlimitedOcrTextConfig
217+
218+
## UnlimitedOcrVisionConfig
219+
220+
[[autodoc]] UnlimitedOcrVisionConfig
221+
222+
## UnlimitedOcrVisionEncoderConfig
223+
224+
[[autodoc]] UnlimitedOcrVisionEncoderConfig
225+
226+
## UnlimitedOcrSamVisionConfig
227+
228+
[[autodoc]] UnlimitedOcrSamVisionConfig
229+
230+
## UnlimitedOcrImageProcessor
231+
232+
[[autodoc]] UnlimitedOcrImageProcessor
233+
234+
## UnlimitedOcrProcessor
235+
236+
[[autodoc]] UnlimitedOcrProcessor
237+
238+
## UnlimitedOcrPreTrainedModel
239+
240+
[[autodoc]] UnlimitedOcrPreTrainedModel
241+
242+
## UnlimitedOcrTextPreTrainedModel
243+
244+
[[autodoc]] UnlimitedOcrTextPreTrainedModel
245+
246+
## UnlimitedOcrTextModel
247+
248+
[[autodoc]] UnlimitedOcrTextModel
249+
- forward
250+
251+
## UnlimitedOcrVisionModel
252+
253+
[[autodoc]] UnlimitedOcrVisionModel
254+
- forward
255+
256+
## UnlimitedOcrModel
257+
258+
[[autodoc]] UnlimitedOcrModel
259+
- forward
260+
261+
## UnlimitedOcrForConditionalGeneration
262+
263+
[[autodoc]] UnlimitedOcrForConditionalGeneration
264+
- forward

‎src/transformers/cache_utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,7 @@ def get_layer_types_and_kwargs(config: PreTrainedConfig) -> tuple[list[str], lis
17521752
per_layer_kwargs = []
17531753
for layer_type, layer_config in zip(layer_types, layer_configs):
17541754
layer_kwargs = {}
1755-
if layer_type in ("sliding_attention", "hybrid_sliding"):
1755+
if layer_type in ("sliding_attention", "hybrid_sliding", "reference_sliding_attention"):
17561756
layer_kwargs["sliding_window"] = layer_config.sliding_window
17571757
elif layer_type == "chunked_attention":
17581758
layer_kwargs["sliding_window"] = layer_config.attention_chunk_size

‎src/transformers/configuration_utils.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"moe", # for nemotron_h, which uses either attention, mamba or moe
7777
"hybrid", # layers that combine attention + mamba/linear-attention-shaped states (zamba2, falcon_h1, zaya1)
7878
"hybrid_sliding", # layers that combine sliding attention + linear-attention-shaped states (zaya1)
79+
"reference_sliding_attention", # UnlimitedOcr: full attention over prefill + ring-buffered sliding window over generated tokens
7980
# Recurrent layers (mamba / mamba2 / GDN / minimax-lightning)
8081
"linear_attention",
8182
)

‎src/transformers/conversion_mapping.py‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
"Qwen2_5_VLModel": "Qwen2VLModel",
133133
"Qwen2_5_VLForConditionalGeneration": "Qwen2VLForConditionalGeneration",
134134
"Tipsv2VisionBackbone": "Tipsv2VisionModel",
135+
"UnlimitedOcrTextModel": "qwen2_moe",
135136
# ViT-style vision models (old HuggingFace checkpoint format → new modular format)
136137
"ASTModel": "ViTModel",
137138
"BeitModel": "ViTModel",
@@ -1758,6 +1759,50 @@ def _build_checkpoint_conversion_mapping():
17581759
),
17591760
WeightRenaming(r"decode_head\.conv_matting\.", r"decode_head.predictor."),
17601761
],
1762+
"unlimited_ocr": [
1763+
WeightRenaming(r"(^|model\.)sam_model", r"\1vision_tower.sam_encoder"),
1764+
WeightRenaming(r"(^|model\.)vision_model", r"\1vision_tower.vision_encoder"),
1765+
WeightRenaming(r"(^|model\.)view_seperator", r"\1view_separator"),
1766+
WeightRenaming(r"(^|model\.)projector\.layers\.weight", r"\1multi_modal_projector.weight"),
1767+
WeightRenaming(r"(^|model\.)projector\.layers\.bias", r"\1multi_modal_projector.bias"),
1768+
WeightRenaming(r"(^|model\.)embed_tokens\.", r"\1language_model.embed_tokens."),
1769+
WeightRenaming(r"(^|model\.)layers\.", r"\1language_model.layers."),
1770+
WeightRenaming(r"(^|model\.)norm\.", r"\1language_model.norm."),
1771+
],
1772+
"UnlimitedOcrSamVisionEncoder": [
1773+
WeightRenaming(r"blocks\.(\d+)\.norm1\.", r"layers.\1.layer_norm1."),
1774+
WeightRenaming(r"blocks\.(\d+)\.norm2\.", r"layers.\1.layer_norm2."),
1775+
WeightRenaming(r"blocks\.(\d+)\.attn\.", r"layers.\1.attn."),
1776+
WeightRenaming(r"blocks\.(\d+)\.mlp\.", r"layers.\1.mlp."),
1777+
WeightRenaming(r"patch_embed\.proj\.", "patch_embed.projection."),
1778+
WeightRenaming(r"neck\.0\.", "neck.conv1."),
1779+
WeightRenaming(r"neck\.1\.", "neck.layer_norm1."),
1780+
WeightRenaming(r"neck\.2\.", "neck.conv2."),
1781+
WeightRenaming(r"neck\.3\.", "neck.layer_norm2."),
1782+
WeightRenaming(r"net_2\.", "proj.conv1."),
1783+
WeightRenaming(r"net_3\.", "proj.conv2."),
1784+
],
1785+
"UnlimitedOcrVisionEncoder": [
1786+
WeightRenaming(r"transformer", "encoder"),
1787+
WeightConverter(
1788+
source_patterns="qkv_proj.weight",
1789+
target_patterns=[
1790+
"q_proj.weight",
1791+
"k_proj.weight",
1792+
"v_proj.weight",
1793+
],
1794+
operations=[Chunk(dim=0)],
1795+
),
1796+
WeightConverter(
1797+
source_patterns="qkv_proj.bias",
1798+
target_patterns=[
1799+
"q_proj.bias",
1800+
"k_proj.bias",
1801+
"v_proj.bias",
1802+
],
1803+
operations=[Chunk(dim=0)],
1804+
),
1805+
],
17611806
"tipsv2": [
17621807
WeightRenaming("text_encoder", "text_model"),
17631808
WeightRenaming("vision_encoder", "vision_model"),

‎src/transformers/generation/utils.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
"image_sizes_videos",
169169
"pixel_attention_mask",
170170
"pixel_values_images",
171+
"pixel_values_local",
172+
"patches_grid",
171173
"image_token_pooling",
172174
"image_grids",
173175
"image_num_crops",

‎src/transformers/models/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@
497497
from .unispeech import *
498498
from .unispeech_sat import *
499499
from .univnet import *
500+
from .unlimited_ocr import *
500501
from .upernet import *
501502
from .uvdoc import *
502503
from .vaultgemma import *

0 commit comments

Comments
 (0)