Debug Model
When OCR returns nothing, run this before you blame the model
- unlimited_ocr
- image
- model_info
- debug_image
- debug_output
OCR came back empty and you're staring at the annotated image like it owes you money. Before you reinstall anything, drop Debug Model on the canvas. It's the pack's smoke test: run a tiny inference against your loaded model and report exactly what's happening.
What it does
It takes the model handle, an image, and a test_prompt (default "document parsing."), then runs a deliberately small decode - it forces max_length down to 256 and temperature to 0, ignoring any config you've built elsewhere. A smoke test shouldn't burn a full 32,000-token generation just to prove the plumbing works.
Three outputs come out:
- model_info - a JSON string with
model_path,load_device,offload_device, anddtype. The fastest check that the loader did what you asked: it tells you whether the model actually landed on the GPU or got offloaded to CPU, and at what precision. If it saystorch.float16when you asked for bf16, there's your clue. - debug_image - the input image passed straight through. Useful for confirming which image the test actually ran on.
- debug_output - the first 200 characters of the model's answer, or the full exception text if inference failed. This is the money output: real output proves the model works and the problem is your image, prompt, or settings; an error trace proves the model itself is the problem.
How to read it
Wire the model from Load Unlimited OCR Model and any image in, then put a Show Text node on model_info and debug_output. The diagnostic flow goes: does the model load (is model_info sane)? Does it produce anything (is debug_output non-empty)? Only then is it worth debugging your actual OCR settings. It saves you the classic trap of tuning image_size and max_length for an hour when the real issue was a half-downloaded model.
Notes
The debug node shares the pack's memory management - the model loads through ComfyUI's patcher, so it plays nice with whatever else is in VRAM, and the cache keeps the model warm for the inference node right after. And remember: it ignores your Configure Inference node on purpose, so don't try to "fix" a debug failure by tweaking config. The smoke test runs fixed tiny settings regardless.
Install is the same as its siblings: it ships in comfyui-unlimited-ocr, so ComfyUI Manager (search "Unlimited OCR") or cloning https://github.com/PsychoLogicAu/ComfyUI-Unlimited-OCR gives you all four nodes plus the shared model download.
Honestly, most workflows will never need this node. But when OCR silently fails - and it will, eventually - this is the difference between a five-minute diagnosis and a two-hour rabbit hole.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| unlimited_ocr | unlimited_ocr_model | — | |
| image | IMAGE | — | |
| test_prompt | STRING | document parsing. | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model_info | text | — |
| debug_image | IMAGE | — |
| debug_output | text | — |