Nodes/ComfyUI-WJNodes/ApplyEasyOCR_batch
ComfyUI Node

ApplyEasyOCR_batch

Find text across a whole image batch, get a mask and the text back

By 807502278·Created 2 years ago·Updated 11 months ago· 21
ApplyEasyOCR_batch
  • images
  • EasyOCR_model
  • MASK
  • JSON
merge_masktrue
invert_maskfalse

This is the other half of the load_EasyOCR_model split - the node that actually runs text detection, once you've loaded a model upstream. Feed it a batch of images plus the EasyOCR_model output from load_EasyOCR_model, and it finds where text sits in every image in the batch, all in one call, using the model instance you already loaded rather than reloading it per image.

The inputs and outputs that matter

Two outputs: MASK, marking where the detected text regions are, and JSON, carrying the structured detection result - the recognized text itself plus wherever EasyOCR's detection data (bounding boxes, confidence) lives for each hit. The mask is what you want if your goal is to do something with the text region visually - most commonly, feed it straight into an inpainting pipeline to paint over watermarks, subtitles, or burned-in UI text across a batch of frames or images. The JSON is what you want if you actually care about the text content itself, not just its location.

merge_mask (on by default) combines every detected text region in an image into one unified mask rather than keeping each detection as a separate region - leave it on for the common "just remove all the text" case, and turn it off if you specifically need to treat each text block independently downstream. invert_mask flips which side of the mask is text and which is background, useful depending on which convention the node you're feeding this into expects.

Because this node is "batch," the real reason to use it over the original ComfyUI-EasyOCR project's own apply node is throughput: OCR-ing a whole batch of video frames or a folder of screenshots one at a time, reloading the model for each, is slow. Loading once via load_EasyOCR_model and running that single loaded model across an entire batch here is the whole reason this modified version exists.

Installing it

Needs the same two things as load_EasyOCR_model: the ComfyUI-WJNodes pack itself, and the EasyOCR Python package, which the README states plainly is required for this section of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-WJNodes.git

then pip install easyocr. Nothing extra needed for this node specifically beyond that - the language model download happens on the load_EasyOCR_model side, into ComfyUI's models/EasyOCR/ folder, and this node just consumes whatever model that one hands it.

Where people get burned

The most common mistake is trying to wire something other than a genuine EasyOCR_model output into the EasyOCR_model input - it's a custom type, so a stock ComfyUI model loader or the wrong node's output won't connect; it has to come from load_EasyOCR_model upstream. If detection quality is poor on a language you expect it to handle, check back on the loader node's language_list or language_name setting - this node has no language controls of its own, it just runs whatever the model it was handed was configured for. And if you're OCR-ing scanned or heavily stylized text and getting weak results, that's an EasyOCR accuracy limitation more broadly, not something specific to this batch wrapper.

CategoryWJNode/Other-plugins/EasyOCR

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
merge_maskBOOLEANtrue
invert_maskBOOLEANfalse
EasyOCR_modelEasyOCR_model

Outputs (2)

NameTypeDescription
MASKMASK
JSONJSON