Advanced Image Comparer
The image A/B comparer that remembers your last generation
- image_a
- image_b
Half of ComfyUI is A/B testing. You nudge a CFG, a LoRA strength, a seed - and then you eyeball two images and try to remember which side was which. A comparer node exists for that, and this one ships in the same pack as the ShaderNoiseKSampler (you'll find it under utils). It shows two images or two batches in the UI with a layout dropdown - slider, click-to-toggle, side-by-side, stacked, grid, carousel, batch, and onion-skin views - so you can actually see the difference instead of squinting at tabs.
Its party trick is auto_fill. The node caches the last images it was given during your current session, and when auto_fill is on (it's the default), any empty slot gets filled from that cache. That means you can wire up just your latest generation and it will automatically compare against the one that came right before it. Iterative refinement becomes: run, tweak, run - and each time, the previous result is already sitting in the other slot. It pulls from session cache, not your output folder, so it stays fast and never scans your disk.
How it works
Under the hood it's a subclass of ComfyUI's own PreviewImage, so it does the normal "save to output, hand filenames to the frontend" dance (with an advanced.compare. filename prefix), and a JS extension renders the comparison UI - that's the golden eyeball in the title bar. The A/B tracking lives in class-level state, and only fresh, non-auto-filled inputs update the cache. So the "previous" slot always holds your actual last generation rather than a copy of itself, which is what keeps the loop from collapsing into comparing an image to itself.
The inputs
auto_fill- BOOLEAN, default true. Leave it on until it bites you.image_a/image_b- both optional IMAGE inputs. Feed these from a VAE Decode, an upscaler, or a Load Image.
There are no outputs. This is a sink node - an output node, so it ends the chain. Comparing batches works pairwise: image A1 vs B1, A2 vs B2, and so on.
Gotchas
- The cache is per-session. Freshly restarted ComfyUI with nothing generated yet means
auto_fillhas nothing to fill with - your first run just shows the one image you wired up. Generate once and the magic kicks in. - Turn
auto_filloff if you're deliberately comparing two fresh things and don't want a stale cache sneaking into a slot.
Install
Same pack as the shader sampler. ComfyUI Manager → Install Custom Nodes → search "ComfyUI-ShaderNoiseKSampler", or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/AEmotionStudio/ComfyUI-ShaderNoiseKSampler.git
Restart ComfyUI. No pip dependencies.
It won't dethrone rgthree's Image Comparer if that's already in your muscle memory - rgthree's is the incumbent for a reason. But if you're installing this pack for the shader sampler anyway, the auto-fill A/B flow is a genuinely nice bonus for tuning, and the golden eyeball makes it easy to spot in a busy graph.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| auto_fill | BOOLEAN | true | Auto-fill empty slot with last generated images |
| image_aopt | IMAGE | — | |
| image_bopt | IMAGE | — |
Outputs (0)
No outputs