Depth Colormap
Your eyes are bad at reading grayscale depth — let viridis do the reading
- depth_map
- colored_depth
A depth map is a scalar per pixel, and humans are famously bad at reading 16,000 shades of gray. Depth Colormap exists so you can actually see what your depth estimator did. It's the "show me the result" node of the ComfyUI-Depth-Visualization toolkit - the one you slap on when you want a diagnostic that reads like a heat map instead of a fog. Same author, same pack as Depth Normalize and friends (gokayfem, the Decartunizer person).
How it works
Most colorization tools pull in matplotlib and its ~20 MB of baggage. This one deliberately doesn't: the color ramps are baked into the node as 256-entry lookup tables built from control points, so you get perceptual colormaps with zero extra dependencies and zero network access. Your depth values get quantized to a table index and looked up to RGB. That's it - deterministic, instant, CPU-only.
Five maps, from viridis (the classic, colorblind-safe default) through magma, turbo (the rainbow one that reads fastest for parallax work), plasma, and plain grayscale. invert flips the ramp if your depth is white-far instead of white-near.
The quietly brilliant option is show_invalid_magenta, on by default: any NaN or infinity in your depth map renders as pure magenta. If you see a magenta hole where the sky should be, that's your estimator telling you it gave up - and you now know exactly where to point a cleanup node or an inpaint pass.
Inputs and outputs
Only four inputs, and colormap is the one you'll touch. Outputs are a single colored_depth (IMAGE) - preview it, save it, or feed it into a compositing stack. One honest caveat: this is a visualization output, not a conditioning tensor. If you want depth driving a ControlNet, you feed the grayscale depth map to the ControlNet preprocessor input, not this node's colorful output.
Install
Same as every node in this pack: ComfyUI Manager, search ComfyUI-Depth-Visualization, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI-Depth-Visualization.git
python -m pip install -r ComfyUI-Depth-Visualization/requirements.txt
Restart, then look under depth/toolkit. Requirements are just numpy and Pillow - no models, no downloads, nothing to miss.
Where people get burned
- Magenta is not a bug. First time you see it you'll think the node is broken. It's showing you non-finite values; that's the feature.
- It colors, it doesn't fix. A garbage input map gives you a beautiful garbage output. Colorize after Depth Normalize and Depth Cleanup, not before, or you're just decorating the problem.
- Grayscale is the honest one. If you're going to ship the map somewhere that cares about values (a 3D package reading it as a height field), render with
grayscaleandinvertoff, not with turbo.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| depth_map | IMAGE | — | |
| colormap | COMBO | 5 options: viridis, magma, turbo, plasma, grayscale | |
| invert | BOOLEAN | false | — |
| show_invalid_magenta | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| colored_depth | IMAGE | — |