RM Image Comparer
The A/B wipe slider, without dragging in all of rgthree
- image_a
- image_b
- images
The before/after slider is the most useful QA node in the ecosystem and nobody writes about it, because it just works. rgthree's version alone is named in nearly a hundred corpus threads. This is the author's self-contained take: same wipe, same slider, but written from scratch so you don't need rgthree's base-node framework - roughly 480 lines of TypeScript and most of a pack - to compare two images.
What it does
Wire two images in, drag the mouse across the node, and it wipes from one to the other. Hovering moves the slider; click to lock it in place so you can look away without losing the position; click again to release. The lock position is saved with the workflow, so the comparison you set up deliberately survives a reload.
Both inputs - image_a and image_b - are optional. Wire only one and it just previews normally, which is a nice touch: the node never sits there broken while you're mid-build. If either side is a batch, an index widget appears so you can step through the frames. Output is images (IMAGE), and the node is marked as an output node - you don't wire it forward, you drop it at the end of the graph and hit queue.
You'll reach for it every time the words "which is better" come up: seed comparisons, LoRA on/off, CFG sweeps, upscale before/after, a frame pair from a video test. It's the fastest way to answer "did that actually change anything" without saving two files and squinting at them side by side in a viewer.
How it works
The Python half is deliberately boring: it subclasses ComfyUI's PreviewImage and hands the frontend two sets of preview images. Subclassing PreviewImage means the images land in ComfyUI's temp preview folder and get cleaned up with the rest of the previews - they don't pile up in your output/ directory. The interesting half is the JS, which draws everything on the node's own canvas in onDrawBackground. Because the wipe is drawn on the node rather than as a DOM overlay floating above the graph, it pans and zooms with everything else. There's also a cache-buster: previews reuse filenames across runs, so the frontend appends a random param to the image URL to keep the browser from showing last run's picture.
Installing it
One node from a bigger pack, so installation is the pack's:
cd ComfyUI/custom_nodes
git clone https://github.com/Moser9815/ComfyUI-RMAutomation
Restart ComfyUI, done. Or in ComfyUI Manager, search RMAutomation and install. No models, no heavy dependencies - the comparer itself needs nothing beyond what core ComfyUI ships (the pack's requirements list opencv-python and ultralytics, but those are for the face-detection and YOLO nodes elsewhere in the suite, lazy-imported, never touched by this one).
When it bites
Honestly, there's not much to trip over. It's an output node, so if it shows nothing, check that an actual image is reaching at least one input - and remember a lone input is fine. If you were hoping for A/B plus a save, remember it's a preview node: it doesn't write files, so put a SaveImage after the branch you care about if you need the winner on disk. And if you're used to rgthree's comparer, the interaction is the same hover/lock/click gesture - this one just doesn't bring the rest of rgthree's UI along for the ride.
For a pure QA utility, that's about the best thing you can say: it disappears into the workflow and you forget it's there, until the moment you need to know which of two images is the one you actually want.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_aopt | IMAGE | — | |
| image_bopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |