NH Large Image Compare
A/B your 4K renders without melting the browser
- image_a
- image_b
- image_a
- image_b
- manifest
You've been there: two 4K upscales you need to eyeball side by side, you wire both into ComfyUI's built-in preview, and the browser starts having a bad time. Full-res previews are ComfyUI's oldest pain point - the canvas tries to ship the whole image to the UI, and a big upscale stutters every time you pan. NH Large Image Compare (class NH_LargeImageCompare) is the fix: it hands the browser a small, tile-based proxy to drag around, and it's from the NH-Nodes pack, a grab-bag of production-oriented workflow helpers.
How it works
Instead of sending the raw 4K bitmap to the frontend, the node builds a preview cache for each input: a downscaled thumbnail plus a pyramid of small tiles (default 512px) in JPEG or WebP. The frontend viewer fetches only the tiles in view, at the zoom level it needs - the same trick image tile servers use. You get smooth pan/zoom at full resolution, and the canvas only ever sees a light thumbnail. All of that lives under ComfyUI's temp directory in a subfolder the pack calls nh_large_preview, which is why there's a cache manager sibling node.
The output node is OUTPUT_NODE, so it acts like a preview node, but it also passes both images through (image_a, image_b) so you can keep the chain going downstream if you want.
The inputs that matter
- compare_mode -
slider,side_by_side, ordifference. The slider is the one you'll reach for: drag a divider across to spot changes.differenceis great for spotting exactly where two renders diverge. - sync_pan_zoom - keeps both sides locked to the same viewport, which is what makes A/B comparison usable. Leave it on.
- preview_megapixels (default 1) - how big the interactive proxy is. 1 is plenty for a quick look; bump it if fine detail actually matters for what you're comparing.
- preview_format / preview_quality - JPEG at 90 is the sweet spot for speed. PNG only if you're comparing flat-color regions where JPEG artifacts would fool you.
- title - just a label for the viewer window.
Optional tile inputs (tile_size, tile_format, tile_quality) control the pyramid tiles. You generally don't touch them; if panning feels sluggish at 512, dropping tile_size to 256 makes tile loads snappier on slow disks.
It also handles batch mismatches: if A is one image and B is a batch, it repeats the single one so every pair gets compared.
Installing
NH-Nodes is in ComfyUI Manager - search for NH-Nodes and install, then restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/NH-Nodes.git
cd NH-Nodes
pip install -r requirements.txt
Restart ComfyUI after install, and if a node looks cached in the browser, refresh the page. Note the pack's requirements.txt pulls in the heavier deps (onnxruntime, transformers, scikit-image) for its Vision/VTON nodes - you're installing those alongside, but this compare node itself only needs numpy/Pillow.
Where people get burned
The cache is temporary by design, so don't rely on the viewer keeping files around - it's a preview, not a save. And since it's an output node, having it wired into a workflow you're running in a loop will regenerate the cache each run; pair it with the cache manager if you notice ComfyUI/temp/nh_large_preview growing. Honestly, for a quick A/B this is the nicest option in the pack - way better than stacking two preview images and squinting.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image_a | IMAGE | — | |
| image_b | IMAGE | — | |
| compare_mode | COMBO | slider | 3 options: slider, side_by_side, difference |
| sync_pan_zoom | BOOLEAN | true | — |
| preview_megapixels | FLOAT | 1.000.05–8 | — |
| preview_format | COMBO | jpg | 3 options: jpg, webp, png |
| preview_quality | INT | 901–100 | — |
| title | STRING | NH Large Image Compare | — |
| tile_sizeopt | INT | 512128–2048 | — |
| tile_formatopt | COMBO | jpg | 2 options: jpg, webp |
| tile_qualityopt | INT | 901–100 | — |
| cache_policyopt | COMBO | temp | 1 options: temp |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image_a | IMAGE | — |
| image_b | IMAGE | — |
| manifest | STRING | — |