Load Unlimited OCR Model
This 6.7GB download is why OCR in ComfyUI finally got good
- unlimited_ocr
Every workflow that wants real-world text - a receipt, a scanned contract, a screenshot of a table - needs the same thing first: an actual OCR model on the canvas. That's this node. Load Unlimited OCR Model is the front door to Baidu's Unlimited-OCR, a vision-language model built to read whole pages in one shot, and it's the one node in the pack that touches the network. Nothing else works until it's loaded.
The good news is there's nothing clever to do here. The loader wraps baidu/Unlimited-OCR, an MIT-licensed VLM with over three million downloads on HuggingFace, and it runs entirely on your machine. No API key, no cloud call - this is the "drop a model into the graph as a node" pattern the ecosystem has converged on, applied to OCR instead of captioning.
The three inputs that matter
- model_path (default
baidu/Unlimited-OCR) - the HF repo ID, or a local path if you already have the weights. Leave it alone and the first run downloads the model (~6.7GB, one safetensors file) and caches it. - dtype (default
bfloat16) -auto,bfloat16,float16, orfloat32. bfloat16 is the right default on modern cards: half the memory of float32 with effectively no quality loss. The catch is that bf16 needs an Ampere-or-newer GPU; on older cards switch tofloat16. - trust_remote_code (default on) - the model ships its own custom modeling code (it's built on a DeepSeek-style MoE backbone), so
AutoModelrefuses to load it without this flag. It's literally "run the code that ships in this repo." It's Baidu's official repo with millions of downloads, which is about as safe as this category gets - but know what the toggle means before you flip it.
How loading actually works
Under the hood the node loads via AutoModel.from_pretrained with safetensors, drops the weights on ComfyUI's CPU offload device, and wraps them in a CoreModelPatcher. That means the model plays by the same VRAM rules as your diffusion checkpoints: it's moved to the GPU only for inference, and ComfyUI can evict it to make room. A small LRU cache keeps up to two loaded models around, so re-running a workflow doesn't re-download or reload from scratch.
Installing it
You're installing the whole pack - that's the only way to get this node. In ComfyUI Manager, search "Unlimited OCR" and install comfyui-unlimited-ocr, or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/PsychoLogicAu/ComfyUI-Unlimited-OCR
then restart ComfyUI. One gotcha: the README tells you to pip install -r requirements.txt, but there's no requirements.txt in the repo. Manager installs from pyproject.toml instead (transformers>=4.57.1, torch, torchvision, Pillow, numpy). If you're installing by hand and the tokenizer throws a sentencepiece error, pip install sentencepiece.
Troubleshooting
- Slow first run - it's downloading 6.7GB. Give it a minute, it's not hung.
- OOM on load - the weights alone are 6.7GB in bf16. ComfyUI's offloading usually keeps it alive on an 8GB card, but it's fighting everything else in your graph for the same memory.
- dtype errors on older GPUs - bf16 fails on pre-Ampere cards;
float16is the fallback.
The loader outputs a single unlimited_ocr handle, which plugs straight into the OCR / Text Extraction node. And honestly? That's where the story starts.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_path | STRING | baidu/Unlimited-OCR | — |
| dtype | COMBO | bfloat16 | 4 options: auto, bfloat16, float16, float32 |
| trust_remote_code | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| unlimited_ocr | unlimited_ocr_model | — |