Image Compare
Hover to flip between before and after, then keep the one you like
- original
- result
- image
The problem it solves
Inpainting is a loop, and the loop has an awkward step in the middle: you generated five candidates on a crop, one of them is good, and now you have to get that candidate back into your editor as the new source - without losing the mask you spent two minutes painting.
In a normal ComfyUI graph that step doesn't exist. You save the image, find it in the output folder, drag it back in, redo the mask. Image Compare is the node that closes that loop inside the graph: hover to compare, click Adopt this result, keep painting.
It's the piece of the workbench that people underrate. The painting node gets the screenshots; this one is why the painting node is worth using twice.
How it works
Underneath, it's simpler than it looks. It takes your original and your result, runs both through ComfyUI's own PreviewImage saver to get two preview files, and hands the frontend three things: the before list, the after list, and an "origin" tag describing which inline editor and which crop region these came from. The frontend paints the two images on one canvas with a one-pixel divider - result on the left, original on the right - and as you move your pointer across it, the divider follows. Move off the picture and you see the full result.
Results accumulate across an editing round, so a batch_size of four gives you a four-entry list to flip through; the newest is selected for you. Because the stored previews get tagged with the crop they came from, a result generated against your previous crop selection is rejected after you move the region rather than being pasted into the wrong place.
The origin tag is found by walking upstream from the node's original input until it hits an Inline Mask node, which is worth knowing: adoption needs an Inline Mask somewhere behind this node, or there's nothing for it to write into.
Inputs and outputs
There are exactly two inputs and one output, and the author's tooltips are the whole spec:
original- "Original image shown on the right." In practice:Inline Mask.image.result- "Full-size generated image shown on the left; useimage, notcrop."image- the result batch, unchanged, passed through. Wire it to Save Image if you also want a file.
That output-node flag matters more than the wiring. Image Compare is a terminal node (OUTPUT_NODE = True), so you can hang it off the graph as a viewer and it will still execute - you don't have to feed it into a Save Image just to make it run.
Wiring it, in full
Inline Mask.image → Image Compare.original
Inline Mask.image → WebUI Inpaint.image
Inline Mask.mask → WebUI Inpaint.mask
WebUI Inpaint.image → Image Compare.result ← the composite, not crop
Then paint, queue, hover, adopt, paint again. Adoption replaces the inline source, keeps the mask and the current session's undo/redo history, resets the comparison list to 1/1 for the next round, and - this is the part I appreciate - never queues a generation on its own. You decide when the next pass happens.
Install
It's one of six user-facing nodes in the same pack, so:
cd ComfyUI/custom_nodes
git clone https://github.com/adachi0130/Adachi-Inpaint-Workbench.git
Full restart of ComfyUI, then Ctrl+F5 in the browser. No models, no extra dependencies - the pack installs nothing beyond numpy, Pillow and torch, which you already have. If you're inclined to use ComfyUI Manager's search box for "Adachi-Inpaint-Workbench," note the README's own warning that Git-URL installation and appearing in Manager's search index are separate things; the reliable route is the clone or Manager's Git URL option. One copy of the pack in custom_nodes, not two.
Common issues
"Image sizes must match. Connect the final image output, not crop." You wired crop. The crop output is the sampling canvas - it can be 1024×1024 while your composite is 2048×1400, and the comparison would be meaningless. Use image.
"Result batch must be a multiple of the original batch." Your original is a single image and your result is three images from some other source. Keep the batch relationship the node expects: N originals, M×N results.
The preview went blank days later. Comparison history stores references to ComfyUI's temp previews, and temp cleanup expires them. Regenerate. Adopted images are safe - those live under input/adachi-inpaint/.
Nothing happens when you click Adopt. Either the preview is still loading, no crop target is selected, or the crop/layer state changed since the result was generated; 0.7.2 added visible messages for these instead of failing quietly. If your result carries an old crop tag, pick a fresh result from the current round.
The hover-compare interaction is credited in the README to rgthree's Image Comparer, and if you already use rgthree you know the gesture. The difference here is the adoption path - rgthree's comparer shows you things, this one writes back into the editor.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| original | IMAGE | Original image shown on the right. | |
| result | IMAGE | Full-size generated image shown on the left; use image, not crop. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |