Nodes/ComfyUI_ImageComparePro/Image Compare Pro
ComfyUI Node

Image Compare Pro

A/B Testing Two Generations Without the Squinting

By mmmmmmmmme·Created 4 months ago·Updated 4 months ago· 5
Image Compare Pro
  • image_a
  • image_b

    You know the workflow. Same seed, one setting changed, two images that look almost identical - except one has slightly cleaner hands, or the other nailed the lighting. Open them in two tabs, switch back and forth until your eyes cross, and you still can't say which one's better. ImageComparePro is the fix for exactly that: it shows two images in one node with a draggable slider down the middle, so you can scrub from one to the other instead of tab-flipping. It's the same trick rgthree's Image Comparer made famous - this is the standalone, do-one-thing-only version, and it's worth knowing if you don't want to install the whole rgthree pack just for a comparison view.

    There's no generation or processing here at all. It's a pure display node, and it's honest about it: two image inputs, zero outputs. It won't save your comparison, it won't tell you which image "won," and it certainly doesn't compute a pixel diff. What it does is give your eyeballs the best tool for the job - which, for "did this change help or hurt," is a slider.

    How it works

    The node is split across two halves, and that's the part that's easy to miss. The Python side does almost nothing: it takes image_a and image_b as IMAGE tensors, converts each to a PIL image, encodes it as a base64 PNG, and hands the result to the frontend. The actual slider is drawn entirely by a JavaScript extension that ships in the pack's js/ folder.

    When the data arrives, the JS fits both images into the node body at the same scale - a single "contain" fit so neither is stretched or cropped - then paints image A clipped to the left of the slider and image B clipped to the right. Drag the handle (or click anywhere in the preview) and the split point moves. It labels them A and B, shows each image's pixel dimensions, and remembers to draw them both with a "contain" fit so the comparison is apples-to-apples.

    That unified scaling is also the caveat hiding in the README's "no distortion guaranteed" claim. If your two images are different sizes, you're comparing them at the fitted preview scale, not at 1:1 pixels. For same-size A/B testing - which is what this node is for - that's a non-issue.

    The inputs that matter

    There are only two, and both are required:

    • image_a - first IMAGE, shown on the left.
    • image_b - second IMAGE, shown on the right.

    Wire them up, hit Queue, and the comparison appears. That's the whole input surface. The background colour you may have seen in the README is a color-swatch widget the node draws on itself (it defaults to a dark #222), not a server-side input - and it only matters when one of your images actually carries transparency. If you're comparing cutouts from a background-removal or matting workflow, that swatch is how you spot halo and edge artifacts against a colour instead of black. If your images are opaque, ignore it entirely.

    Installing it

    This one's painless - the pack has no model downloads and no real dependencies. Its requirements file lists Pillow, NumPy, and torch, all of which any working ComfyUI already has; the file's own comment says "no extra dependencies needed."

    ComfyUI Manager is the easy route: open Manager, search ComfyUI Image Compare Pro, install, restart. Or clone it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mmmmmmmmme/ComfyUI_ImageComparePro
    

    Restart ComfyUI and the node shows up as Image Compare Pro in the mmmmmmmmm category.

    Troubleshooting and gotchas

    The preview is empty until you queue a run. The node draws its comparison only after execution - the README's "click run workflow to get output mask" means exactly this. If you've wired it up and see a blank box, run the workflow once and look again.

    There's no output to wire anywhere, and that trips people up. If you want a saveable copy, feed the same two images into a Preview Image node instead - this node's only output is the display on your screen.

    Only the first frame of a batch shows. If you feed it a batch from an AnimateDiff-style node, it compares frame 0 of each, not the whole clip.

    Finally, the big one for this whole genre: it's a canvas-drawn preview node, and ComfyUI's Nodes 2.0 frontend rewrite broke exactly these. rgthree's comparer was one of the most-cited casualties. If you've enabled Nodes 2.0 and the comparison doesn't render, that's the likely culprit - switch back to the legacy canvas and it should behave.

    Categorymmmmmmmmm

    Inputs (2)

    NameTypeDefaultDescription
    image_aIMAGE
    image_bIMAGE

    Outputs (0)

    No outputs