Colorize Depthmap
Turn a flat grayscale depth map into a readable heatmap
- image
- image
A raw depth map is grayscale, and grayscale is genuinely hard for a human eye to read precisely - you can tell "brighter is closer" at a glance, but picking out fine gradations of distance in a sea of similar grays takes real effort. This little utility node solves exactly that: feed it a depth image, pick a color palette, get back the same information mapped through actual color instead of a single brightness channel. It's a visualization tool, not a generation node - nothing here changes what the depth map means, only how easy it is to look at.
Where it fits in the workflow
You'd drop this in right after MarigoldDepthEstimation (or any of the pack's depth nodes) and before a PreviewImage, specifically to sanity-check the output before you commit it to a ControlNet or export it. Color palettes make subtle depth transitions - a gently sloped floor, a slightly-nearer object in a crowded scene - visible in a way a grayscale ramp just doesn't manage. This is purely for your eyes; you'd typically feed the original grayscale (or the OpenEXR-saved float) map into ControlNet or downstream tools, not the colorized version, since colorizing throws away the linear brightness-equals-distance relationship those tools expect.
The inputs and outputs that matter
There are only two things to set, which is the whole point of a node like this:
image(IMAGE) - the depth map you want to colorize.colorize_method(defaultSpectral) - the palette. The pack ships nineteen options pulled from the standard scientific-visualization colormap set:Spectral,terrain,viridis,plasma,inferno,magma,cividis,twilight,rainbow,gist_rainbow,gist_ncar,gist_earth, and seven more beyond those. If you've used matplotlib or any data-viz tool, these names will be familiar - they're the same perceptually-tuned gradients, chosen because they make small value differences visually distinct rather than blurring together the way a plain grayscale ramp does.
One output: image (IMAGE) - the colorized version, same dimensions as the input, ready for PreviewImage or SaveImage.
Picking a palette
You don't need to overthink this. viridis and plasma are the safe, high-contrast defaults if you just want to see the depth clearly - they're designed to be readable even by someone who's colorblind, which most of the scientific-viz palettes are built around. Spectral (the default here) and rainbow-style options give you more visual pop for a screenshot or presentation but can be a little harder to read precisely since they wrap through more hues. If you're comparing two depth maps side by side, pick one palette and stick with it across both - switching palettes mid-comparison will make differences that aren't real jump out at you.
How to install it
Same pack as every other Marigold node - no separate install. ComfyUI Manager: search "marigold", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-Marigold
pip install -r ComfyUI-Marigold/requirements.txt
No model downloads for this node specifically - it's pure image processing, no diffusion pipeline involved, so it's instant compared to the depth-estimation nodes upstream of it.
Common issues & troubleshooting
The colorized output looks flat or low-contrast even after switching palettes. That usually means the input depth map itself has low contrast - check the map coming out of MarigoldDepthEstimation or _v2 before blaming this node. RemapDepth upstream, stretching the value range before colorizing, will often fix exactly this.
You fed the colorized image into a ControlNet and results are wrong. This is the one real trap with this node - depth ControlNets expect the linear grayscale relationship where pixel brightness maps directly to distance. A colorized map breaks that assumption entirely. Keep the colorized version for previewing only, and feed the original grayscale (or unmodified) depth map into anything downstream that actually reads distance from pixel values.
Colors don't match what you expected from the palette name. Double-check you picked the palette you think you did - several names in the nineteen-option list are visually similar (the gist_* family especially), and it's an easy misclick in a long dropdown.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| colorize_method | COMBO | Spectral | 19 options: Spectral, terrain, viridis, plasma, inferno, magma, +13 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |