Nodes/comfyui_LLM_party/☁️🖥️Mini Advanced OCR
ComfyUI Node

☁️🖥️Mini Advanced OCR

EasyOCR detection plus a vision LLM read-out

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
☁️🖥️Mini Advanced OCR
  • image
  • images
  • masks
  • json_str
  • text
gputrue
language_namech_sim,en
model_namegpt-4o-mini
base_url
api_key
imgbb_api_key
is_enabletrue

Plain OCR is good at finding text regions and bad at understanding them - messy layouts, handwriting, or a language your OCR engine doesn't handle well will all trip it up. Mini Advanced OCR pairs the two approaches: it uses EasyOCR to actually locate where the text is on the image, then hands crops of those regions to a vision-capable LLM to read and interpret. You get the reliability of dedicated text detection plus the comprehension of a real language model, instead of picking one or the other.

It lives in the "mini-party" corner of comfyui_LLM_party - a lighter-weight slice of the pack's much larger node collection, built for common tasks without wiring together five separate nodes. Worth knowing upfront: this pack isn't the only way to get an LLM working inside ComfyUI (comfyui-ollama and the Griptape nodes show up in the same conversations), but it's the one that bundles this specific OCR-plus-VLM combo as a single node rather than making you assemble the pipeline yourself.

How it works

EasyOCR runs first, locating text regions in the image. Those regions - and the full image - then go to a vision LLM (an OpenAI-compatible chat-completions endpoint, gpt-4o-mini by default) which actually reads and interprets the content, returning both a structured breakdown and plain text.

The inputs and outputs that matter

  • image - the image to read.
  • gpu (default true) - whether EasyOCR's detection stage runs on GPU.
  • language_name (default ch_sim,en) - a comma-separated list of EasyOCR language codes for the detection stage; Simplified Chinese and English by default.
  • model_name (default gpt-4o-mini) - which vision model does the actual reading.
  • base_url / api_key - your OpenAI-compatible endpoint and key for the vision call; both empty by default, so you have to fill them in (or point base_url at a local OpenAI-compatible server if you're not using OpenAI directly).
  • imgbb_api_key (optional) - some vision APIs want an image URL rather than raw bytes; this hosts the crop on imgbb so the API can fetch it.

Outputs: images and masks (the detected text regions), json_str (structured detection data), and text (the final read-out from the LLM).

How to install it

Search comfyui_LLM_party in ComfyUI Manager and install, restart, then fill in base_url/api_key on the node (or in the pack's config.ini). Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/heshengtao/comfyui_LLM_party.git

Run pip install -r requirements.txt from the pack's own folder using ComfyUI's Python, then restart. EasyOCR downloads its language model weights on first use for any language you haven't run before - expect the very first run with a new language_name to be noticeably slower than every run after it.

Common issues & troubleshooting

API call fails. base_url and api_key are blank by default and this node has no offline fallback for the reading step - fill both in, or point base_url at a local OpenAI-compatible server (Ollama, vLLM, etc.) if you'd rather not use a hosted API.

Crashes with gpu=true on a machine without a working CUDA setup. EasyOCR's GPU path needs a real CUDA-enabled PyTorch install; if you're on CPU-only hardware, flip gpu off rather than fighting the driver stack.

Slow on first run with a new language. Not a bug - EasyOCR is downloading model weights for that language the first time you use it. Subsequent runs with the same language_name are fast.

Category大模型派对(llm_party)/迷你派对(mini-party)

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
gpuBOOLEANtrue
language_nameSTRINGch_sim,en
model_nameSTRINGgpt-4o-mini
base_urloptSTRING
api_keyoptSTRING
imgbb_api_keyoptSTRING
is_enableoptBOOLEANtrue

Outputs (4)

NameTypeDescription
imagesIMAGE
masksMASK
json_strSTRING
textSTRING