Image Comparer
An A/B slider for two generations, right in the canvas
- image_a
- image_b
- image_a
Half of ComfyUI is just A/B testing. Same prompt, two samplers. Same seed, two CFGs. Same everything, two LoRA weights. And the standard workflow for deciding which is better is... squinting at two preview windows placed arbitrarily far apart. Image Comparer exists to fix that: wire two images in, and you get a single widget in the canvas with a draggable divider so you can slide between them - or click to toggle. This is the node from this pack I'd actually reach for.
Mechanically it's two halves. The backend is an output node that saves both input images to ComfyUI's temp folder (reusing the stock PreviewImage save logic, with the pack's JS loaded from its js folder) and pushes the file references to the front-end. The front-end is a custom widget that draws the two images and renders the comparison - a "Slide" mode with a draggable vertical divider, or a "Click" mode that shows one and swaps when you press. When a batch comes in, you get A1/A2/… and B1/B2… labels above the image and can click the letters to pick which pair to compare.
Because it's an output node, it forces both branches to actually run - which is exactly what you want in an A/B graph, because you're comparing two live generations. And it still outputs image_a, so it can sit inline in the workflow and feed the winner onward if you're routing by hand.
Inputs and outputs that matter
- image_a (in) - first candidate.
- image_b (in) - second candidate. Both optional, but an A/B compare with one input is a single-image viewer.
- image_a (out) - passes the first input through, so the node can sit mid-graph.
- In-node: a Slide / Click mode toggle (in the node's properties/combo).
Installing it
Part of wenchengxiang/ComfyUI-Practical-Tools. ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-Practical-Tools" → Install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools
then restart. The front-end widget needs that restart to load the JS - if you installed mid-session and see a blank node, restart before assuming anything's broken. No pip dependencies, no models.
Issues and gotchas
Because both branches must run for the comparison to mean anything, an Image Comparer forces every node upstream of either input to execute - that's the feature, but it means you can't "cheaply" preview one branch alone. Also, the images are compared as saved temp files, so the quality of the slide match depends on both being the same size; mismatched resolutions look a little off but still work. If you only need a static side-by-side for sharing, a grid node (like this pack's Image Grid Table) is the better endgame - the slider is for deciding, the grid is for showing.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_aopt | IMAGE | — | |
| image_bopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_a | IMAGE | — |