Nodes/h4_Live/h4 - Pixel Visualizer
ComfyUI Node

h4 - Pixel Visualizer

See exactly where two images differ

By m3rr·Created 9 months ago·Updated 10 days ago· 1
h4 - Pixel Visualizer
  • image_a
  • image_b
  • heatmap
  • side_by_side
  • image_a
  • image_b
heatmap_scale5.0

Refinement loops have a visibility problem. You changed a setting, re-ran, and now you have two images that look almost identical - but where did they actually differ? Eyeballing two previews side by side is useless for subtle changes. The h4 - Pixel Visualizer is the debug tool for exactly that moment: it computes a pixel difference between image A and image B, amplifies it, and renders it as a heatmap so the changed regions light up like a target.

It's the "diff inspector" of h4_Live's image family, and it's the quiet hero of any workflow where you're iterating on small settings changes.

How it works

Feed it two images (image_a and image_b). It computes the per-pixel absolute difference |A - B|, then multiplies that by heatmap_scale to amplify even tiny changes into visible bright spots - a difference of 0.02 in pixel value is invisible to the eye but screams on a heatmap scaled to 5. The result is emitted as a heatmap image, alongside a side-by-side composite of A | B, plus both originals passed through untouched.

That passthrough behavior is a small design nicety with a real payoff: you can drop the node into a debug branch without breaking the rest of the graph. The originals keep flowing, and the heatmap is just there when you want to look.

The inputs and outputs

  • image_a / image_b - the two renders to compare.
  • heatmap_scale - amplification. 5 is the default and a good starting point; crank it for near-identical images, drop it when changes are already obvious.
  • Outputs: heatmap, side_by_side, image_a, image_b.

When to reach for it

Any A/B situation: comparing two denoise levels, two LoRA strengths, two prompt tweaks, or before/after passes of an upscale or color treatment. Pair it with h4_Live's loop nodes and you've got a poor man's test rig - run a sweep, route each pair through the visualizer, and instantly see which regions the change actually touched. For grid work, the heatmap doubles as a "here's what's different in cell 7" assistant.

Installing it

It's part of h4_Live:

cd ComfyUI/custom_nodes
git clone https://github.com/m3rr/h4_Live
# restart ComfyUI

or ComfyUI Manager → search "h4_Live." No extra dependencies.

Where it can bite you

A few honest caveats. The diff is strictly per-pixel, so it won't catch structural changes - if both images have a face but the eyes moved, you'll see edge highlights but not a clean "the eyes are different" read. Images of different resolutions will need a matching step first, because a strict pixel diff assumes same shape. And don't mistake heatmap brightness for perceptual importance: a region that glows bright could be noise amplified, not a meaningful change. Keep heatmap_scale modest and you'll get a useful tool rather than a fireworks display. For its narrow job - "where exactly did these two images differ" - it's genuinely the most useful debug node in the pack.

Categoryh4_Live/Image

Inputs (3)

NameTypeDefaultDescription
image_aIMAGE
image_bIMAGE
heatmap_scaleFLOAT5.00–100

Outputs (4)

NameTypeDescription
heatmapIMAGE
side_by_sideIMAGE
image_aIMAGE
image_bIMAGE