Nodes/comfyui-unlimited-ocr/Configure Inference
ComfyUI Node

Configure Inference

Seven knobs that mostly tune themselves

By PsychoLogicAu·Created 2 months ago·Updated 2 months ago· 0
Configure Inference
    • config
    max_length32768
    temperature0.00
    no_repeat_ngram_size35
    ngram_window128
    crop_modetrue
    base_size1024
    image_size640

    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.

    CategoryUnlimited OCR/Config

    Inputs (7)

    NameTypeDefaultDescription
    max_lengthINT327681–65536
    temperatureFLOAT0.000–1
    no_repeat_ngram_sizeINT351–1024
    ngram_windowINT1281–1024
    crop_modeBOOLEANtrue
    base_sizeINT10241–4096
    image_sizeINT6401–4096

    Outputs (1)

    NameTypeDescription
    configunlimited_ocr_config