Image Comparer Magnifier
Two images, one linked magnifier
- image_0
- image_1
- image_2
- image_3
Here's the scenario this node was built for, and it's the most ComfyUI thing there is: you've got two checkpoints, two LoRAs, or two upscaler settings, and you need to tell which one wins. The differences are almost never in the broad strokes - they're in the skin texture, the eyes, the hands, the rendering of a stray text string. Compare them side by side and you end up ping-ponging your eyes between two images, hoping the same spot lines up. YC.ImageComparerMagnifier shows both images stacked next to each other and hovering over either one magnifies both at the same relative position - one cursor, two synchronized 3x lenses. You can now actually diff the region you care about.
It's the headliner of ycchanau's ComfyUI Preview Magnifier pack - the one node that does something stock ComfyUI genuinely can't. The whole pack is MIT-licensed and dependency-free, and the README is a one-liner ("For learning purpose"), so the source is the docs.
How it works
Same architecture as the pack's other two nodes: the Python class subclasses ComfyUI's built-in PreviewImage, and the JavaScript in web/image_magnifier.js does the display work. Each input image is saved to ComfyUI/output - under a YC.ImageComparatorMagnifier. prefix, and yes, "Comparator" with an 'r' is a typo in the code that shows up in your output filenames; the node itself is spelled Comparer. Then the frontend draws the two images side by side, and a single mousemove event drives both magnifier lenses so whatever region is under your cursor on image A is the same region, zoomed, on image B. That linked lens is the entire point.
The inputs that matter
image_0(IMAGE) - your "before" (or contender A).image_1(IMAGE) - your "after" (or contender B).img_count(INT, default 2) - here's the honest part: it's locked at 2. The slider's min and max are both 2, so you can't actually change it.
One gotcha worth flagging: the schema also lists optional image_2 and image_3 inputs, and the frontend code clearly wants to support up to 4 images. But the backend clamps img_count at 2 and never reads those extra inputs, so in practice this is a two-image tool. Don't build a 4-way comparison workflow around it.
No outputs - it's a terminal display node. Nothing wires out of it; it's the end of the branch.
Installing it
ComfyUI Manager, search "ComfyUI Preview Magnifier," install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ycchanau/ComfyUI_Preview_Magnifier
then restart. No pip deps, no models to download.
Things to know
Two quirks you'll hit immediately. First, there's a debug print(result) left in the backend, so every run dumps the full result dict to your terminal - harmless, just noisy. Second, the on-node layout is driven by the first image's aspect ratio, so if your two images have different dimensions the smaller one gets letterboxed; feeding them matching sizes keeps the comparison honest.
Where people actually reach for this: LoRA strength sweeps, checkpoint swaps, and especially upscaler A/B tests, where the differences genuinely live in fine detail that a 1:1 zoom hides. If you spend real time on those comparisons, this node quietly pays for itself.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| img_count | INT | 22–2 | — |
| image_0 | IMAGE | — | |
| image_1 | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — |
Outputs (0)
No outputs