Configure Inference
Seven knobs that mostly tune themselves
- config
This is the laziest node in the pack, and I mean that affectionately. Configure Inference builds a small dictionary of generation settings and hands it to the OCR / Text Extraction node. That's the whole job. You can skip it entirely - the inference node has all seven defaults baked in - and only add one when the defaults aren't cutting it.
The knobs
All seven inputs ship with sensible defaults:
- max_length (default 32768) - the cap on how much text the model can emit. Big for a reason: long documents generate a lot of tokens.
- temperature (default 0.0) - greedy decoding. For OCR you almost never want randomness, so zero is the correct setting, not a placeholder.
- no_repeat_ngram_size (35) and ngram_window (128) - repetition-suppression internals. Leave them alone.
- crop_mode (on) - lets the model slice the image into regions before reading. On is the smart default for dense pages.
- base_size (1024) - the reference resolution the model resizes against.
- image_size (640) - the resolution images actually get processed at. This is the one worth touching.
What a beginner actually changes
Two knobs, really. image_size - bump it toward 1024 for fine print or tiny screenshots, drop it for speed on big simple pages; lower means faster and lighter on VRAM. And max_length - raise it for genuinely enormous documents, cut it when memory is tight (the README's own advice for CUDA OOM is to lower this).
The output is a single config object that wires into the inference node's optional config input. Don't connect one and inference silently uses these same defaults - nothing breaks when you skip it.
How it fits
Mechanically this node just returns a dict; the inference node merges it with its own defaults and prints a console warning if it sees a key it doesn't recognize. One trap: don't wire a model handle into the config slot - inference will raise a "did you forget to wire an UnlimitedOCRConfig node?" error. And note the Debug Model node ignores your config on purpose; it runs its own fixed smoke-test settings.
Install is shared with the rest of the pack - it's one of four nodes in comfyui-unlimited-ocr, so ComfyUI Manager (search "Unlimited OCR") or a git clone of https://github.com/PsychoLogicAu/ComfyUI-Unlimited-OCR gets you all of them, and the Loader node handles the shared model download.
If default OCR quality is already good, you'll never open this node. That's fine. It exists for the day a document trips up the defaults.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| max_length | INT | 327681–65536 | — |
| temperature | FLOAT | 0.000–1 | — |
| no_repeat_ngram_size | INT | 351–1024 | — |
| ngram_window | INT | 1281–1024 | — |
| crop_mode | BOOLEAN | true | — |
| base_size | INT | 10241–4096 | — |
| image_size | INT | 6401–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config | unlimited_ocr_config | — |