Nodes/NH-Nodes/NH Large Image Compare
ComfyUI Node

NH Large Image Compare

A/B your 4K renders without melting the browser

By jetthuangai·Created 5 months ago·Updated 21 days ago· 6
NH Large Image Compare
  • image_a
  • image_b
  • image_a
  • image_b
  • manifest
compare_modeslider
sync_pan_zoomtrue
preview_megapixels1.00
preview_formatjpg
preview_quality90
titleNH Large Image Compare
tile_size512
tile_formatjpg
tile_quality90
cache_policytemp

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, or difference. The slider is the one you'll reach for: drag a divider across to spot changes. difference is 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.

CategoryNH-Nodes/Image

Inputs (12)

NameTypeDefaultDescription
image_aIMAGE
image_bIMAGE
compare_modeCOMBOslider3 options: slider, side_by_side, difference
sync_pan_zoomBOOLEANtrue
preview_megapixelsFLOAT1.000.05–8
preview_formatCOMBOjpg3 options: jpg, webp, png
preview_qualityINT901–100
titleSTRINGNH Large Image Compare
tile_sizeoptINT512128–2048
tile_formatoptCOMBOjpg2 options: jpg, webp
tile_qualityoptINT901–100
cache_policyoptCOMBOtemp1 options: temp

Outputs (3)

NameTypeDescription
image_aIMAGE
image_bIMAGE
manifestSTRING