Nodes/PixText/Compare Regions · PixText
ComfyUI Node

Compare Regions · PixText

The Node You'll Still Have Loaded Next Month

By ATH-MaaS·Created 3 days ago·Updated 2 days ago· 23
Compare Regions · PixText
  • before
  • after
  • targets
  • contact_sheet
◄padding6►

Here's the annoying thing about fixing text in an image: the fixed word is usually 40 pixels tall. You hit Run, you get back a 2048×2048 image that looks identical to the input, and now you're zooming into a corner of a canvas at 400% trying to decide whether the shape you're looking at is a better "Nayeon" or just a differently wrong one.

Compare Regions · PixText answers that question directly. Point it at the before and after images, hand it the same targets the refiner just used, and it builds one contact sheet with every repaired region - cropped the same way on both sides, labelled, at a size you can actually judge.

What it does with them

It's a compositor, not a model. For each enabled target it crops before and after to the same box, expands both by the same number of pixels, and scales both into a fixed tile with LANCZOS - so magnification, aspect and framing match exactly on both sides. Then it lays the pairs out two cards wide on a dark sheet, each card headed REGION 01, with BEFORE and AFTER on their tiles, numbered to match the little index badges the editor draws on your image.

The matching matters more than the prettiness. If the two crops came from slightly different framings you'd be comparing composition instead of legibility, and every word would look "fixed." Same crop, same scale, same padding, or the comparison is worthless.

It also publishes the same cards through the node's UI panel - that's what Open comparison opens.

Inputs and outputs

Four inputs, and the naming is honest about the trap:

  • before - the original, unedited image. In the pack's workflows this is the Region Editor's image output, not a reloaded file.
  • after - whatever came out of Refine Text.
  • targets - the same wire that fed the refiner; the node reads boxes and labels off it, so crops always match what was edited.
  • padding - integer, default 6, range 0–64. The tooltip is exactly right: "Context pixels around each target in both crops." Zero padding gives you a tight letterform inspection; 20-ish gives you enough neighbourhood to see whether the new word sits on the sign's baseline or floats above it. That context margin is the whole reason this beats cropping by hand.

You get one output: contact_sheet, an IMAGE. It's an output node, so it runs and displays without anything wired downstream - but if you want the sheet on disk, pipe it into a Save Image.

Install

Same pack, same install as everything else in PixText - no extra dependencies, no models, nothing to download:

cd ComfyUI/custom_nodes
git clone https://github.com/ATH-MaaS/PixText.git
python -m pip install -r PixText/requirements.txt

Restart. This node is pure Pillow work over tensors ComfyUI already handed you - no VRAM, no sampling, no cold start.

Where people get burned

"Use the original image from the same PixText Region Editor." That message is the node's source-digest check firing. It hashes the before pixels and compares them against the digest stored in the targets, so anything that alters the image between the editor and the comparison - a resize, a color grade, a scale node you added "just to see" - invalidates it. If you want to compare at higher resolution, upscale before the Region Editor so the whole chain agrees.

The related one is Target regions and input image have different dimensions, which is the same mistake with a different symptom: something resampled the frame.

Feeding after where before goes. Then both halves of every card show the refined result and everything looks perfect, which is a genuinely funny way to waste an afternoon. before comes off the Region Editor; after comes off Refine Text. Don't cross them.

Wiring a batch. One image at a time; if your graph is iterating, each cycle needs its own pair.

And one non-bug: if you haven't enabled any region yet, you get a small dark placeholder that says "Enable a target region to compare before and after" rather than an error. That's the node telling you the editor produced zero enabled targets and the refiner passed your image straight through - no crash, just nothing done.

Why it's worth two nodes' worth of canvas

The 2026 consensus on editing is crop-and-stitch: keep everything outside the edit bit-identical and only regenerate the region. PixText is built that way from the ground up - pixels outside the edited footprints come back identical to the original RGB, no VAE round-trip on the rest of the frame. Which means the only thing you need to review is the footprint, and there might be thirteen of them on one poster.

Installing a comparison node feels like overhead right up until the first time you ship a word that reads "Nic0la."

CategoryPixText

Inputs (4)

NameTypeDefaultDescription
beforeIMAGE—
afterIMAGE—
targetsPIXTEXT_TARGETS—
paddingINT60–64Context pixels around each target in both crops.

Outputs (1)

NameTypeDescription
contact_sheetIMAGE—