Nodes/BV Nodes/πŸŒ€ BV Image Difference Heatmap
ComfyUI Node

πŸŒ€ BV Image Difference Heatmap

See exactly where two images differ β€” and by how much

By BlackVortexAIΒ·Created 2 years agoΒ·Updated 11 months agoΒ· 3
πŸŒ€ BV Image Difference Heatmap
  • image1
  • image2
  • heatmap
  • overlay_image1
  • overlay_image2
  • difference_strength
  • mse_value
β—„overlay_strength0.50β–Ί
β—„colormapβ–Ύβ–Ί

"How much did that actually change?" is a question you ask constantly once you start iterating on generations, and eyeballing two images side by side is a terrible way to answer it. BV Image Difference Heatmap gives you the honest version: it compares two images pixel by pixel and paints the differences as a heatmap, plus hands you a couple of hard numbers so you can stop squinting.

The realistic use cases: before/after an upscale or img2img pass, checking how much a low-denoise refiner actually moved, or comparing two generations against a reference. It's the kind of node that's not going to make your images better by itself - it makes your judgments better, which eventually does.

The inputs

  • image1 / image2 (both required) - the pair to compare. Feed them same-size images; a 512Γ—512 against a 2048Γ—2048 comparison is meaningless even if it doesn't error.
  • overlay_strength (default 0.5, range 0–5) - how strongly the heatmap blends over the originals in the overlay outputs. Crank it toward 5 if the difference is subtle and you want it loud.
  • colormap - the palette, straight from matplotlib's set: jet, viridis, plasma, inferno, magma, cividis, turbo, hot, cool, plus the reversed variants of most of them (jet_r, viridis_r, ...). For "where is the difference," jet or turbo are the classic choices; hot reads nicely for magnitude.

The outputs

  • heatmap (IMAGE) - the raw difference map in your chosen colormap.
  • overlay_image1 / overlay_image2 (IMAGE) - the heatmap blended over each original at overlay_strength. These are what you'll actually want to look at.
  • difference_strength (FLOAT) - a scalar summarizing how much the images differ overall. Feed it into a conditional node to gate the rest of the workflow on "did this change enough?"
  • mse_value (INT) - the mean squared error, rounded to an integer. The boring-but-useful number for logging or comparing runs.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/BlackVortexAI/ComfyUI-BVortexNodes.git

or ComfyUI Manager β†’ "BV Nodes", then restart. The colormaps come from matplotlib, which ComfyUI usually has on hand - if the node throws an import error, pip install matplotlib fixes it.

Where people get confused

The mse_value output being an INT rather than a float is a minor quirk - don't expect fractional precision from it. And remember the overlay outputs are where the visual answer lives; the raw heatmap alone is harder to read because the dark pixels of the original aren't there as a reference frame. Same-size images in, comprehensible answer out - that's the whole contract.

CategoryπŸŒ€ BVortex Nodes/Image Processing

Inputs (4)

NameTypeDefaultDescription
image1IMAGEβ€”
image2IMAGEβ€”
overlay_strengthFLOAT0.500–5β€”
colormapCOMBO18 options: jet, viridis, plasma, inferno, magma, cividis, +12

Outputs (5)

NameTypeDescription
heatmapIMAGEβ€”
overlay_image1IMAGEβ€”
overlay_image2IMAGEβ€”
difference_strengthFLOATβ€”
mse_valueINTβ€”