Nodes/ComfyUI-GROUT/GROUT Heatmap Colorize
ComfyUI Node

GROUT Heatmap Colorize

Make the GROUT heatmap legible with one colormap dropdown

By advancedtech-sk·Created 8 months ago·Updated 5 months ago· 0
GROUT Heatmap Colorize
  • probability_heatmap
  • colored_heatmap
colormap

This is the "pretty picture" node, and it's genuinely the best first thing to look at when you're new to this pack, because it shows you what the model actually thinks. GROUT Segmentation's probability heatmap is a grayscale image where brightness equals confidence. That works, but the human eye reads a color gradient far better than shades of gray, and colorizing is all this node does: take the grayscale heatmap and map it through a matplotlib colormap.

Mechanically it's nearly nothing. The node grabs channel 0 of the heatmap - it's grayscale repeated across the RGB channels, so any channel will do - runs it through matplotlib.pyplot.get_cmap, drops the alpha, and returns a colored IMAGE. No model, no inference, no settings beyond a dropdown.

The dropdown is the whole UI: magma, viridis, plasma, inferno, hot, jet. These are matplotlib's standard colormaps, and the choice matters more than people expect:

  • inferno / magma - dark backgrounds with hot yellow/white highs. The de-facto choice for "show me confidence"; red-on-black reads instantly.
  • viridis / plasma - the perceptually-uniform crowd favorites. viridis in particular is designed so the gradient reads the same to colorblind viewers.
  • hot - the classic heat ramp from black through red/orange to white. Dramatic, and a perfectly fine fallback.
  • jet - the infamous rainbow. Everyone reaches for it first because it's familiar, and it's also the one that paints fake contour bands into smooth data. Fine for a quick look, lousy for judging fine confidence differences.

One output, colored_heatmap, an IMAGE you typically wire into a Preview Image or Save Image node. There's deliberately no mask output here - colorization is a visual dead end in the graph on purpose; the actual mask work happens in GROUT Threshold.

The honest use for this node is inspection. When you're tuning the threshold, this is your "what is the model confident about" side-by-side. The yellow-white blobs in inferno are where the model is sure it sees grout, and that tells you whether your threshold is slicing in the right place before you even look at the mask.

It's also the only reason the pack depends on matplotlib at all. The import happens lazily inside the node's colorize function, so you only pay for it when you actually use the node. Installation is just the pack install - ComfyUI Manager search "GROUT", or the git clone plus pip install -r requirements.txt - there's nothing extra to grab for this node specifically.

Failure modes are limited to one, shared with GROUTThreshold: it reads channel 0 of whatever IMAGE you hand it, so it assumes you're passing the heatmap from GROUT Segmentation. Feed it a color photo and "colorize" just means "false-color my red channel." Keep it wired to the heatmap and you'll never hit it. Also note it expects a float image in the 0–1 range, which is exactly what the segmentation node produces - so don't route through a save/load round-trip that clamps your values, or the colormap stops telling the truth.

CategoryGROUT

Inputs (2)

NameTypeDefaultDescription
probability_heatmapIMAGE
colormapCOMBO6 options: magma, viridis, plasma, inferno, hot, jet

Outputs (1)

NameTypeDescription
colored_heatmapIMAGE