Nodes/Bit Depth Enhancer/Bit Depth Enhancement (Classical)
ComfyUI Node

Bit Depth Enhancement (Classical)

The sensible way to kill banding

By subraoul·Created 10 months ago·Updated 10 months ago· 3
Bit Depth Enhancement (Classical)
  • image
  • enhanced_image
method
strength0.7
preserve_edgestrue

Banding happens because 8-bit images only have 256 levels per channel, and in a smooth gradient that's not enough - the eye happily locks onto the steps between level 147 and 148 in a dusk sky. The classical node in the Bit Depth Enhancer pack is the "no magic required" answer: it re-expresses your 8-bit image in 16-bit space and uses filter math to fill in the in-between tonal values. No model files, no GPU requirement, no Google Drive detour. If you've ever wanted "less banding in my gradients, please" without adopting a neural network, this is the node you'll actually reach for.

This is the node I'd recommend everyone in this pack start with, by the way. It's deterministic, fast, works on CPU, and it teaches you the problem before you spend an afternoon downloading checkpoints for the ABCD node.

How it works

Read the source and the approach is classic image processing, four ways:

  • Bilateral+Dither - edge-preserving bilateral smoothing followed by Floyd-Steinberg error diffusion. It's the default-suggested general-purpose pick, and it's the right one for most shots: smooths the flats, keeps the edges, then breaks up any remaining steps with dithering.
  • Gradient Domain - computes Sobel gradients, builds an edge mask, and smooths only the non-edge regions. Best for skies and long, smooth transitions where you want nothing else touched.
  • Multi-scale Fusion - a 5-level Laplacian pyramid: fine-detail levels stay put, coarse levels (where banding hides) get smoothed. Highest quality, slowest - a few seconds per 4K frame.
  • Fast Edge-Aware - a guided filter built from box filters. Fastest of the lot (~0.1s for 1080p), good quality, the one to use when you're batch-processing frames.

Under the hood it's honest about the limits: the input is scaled to 8-bit, expanded to uint16, processed, then handed back as a float32 tensor in [0, 1]. Which is exactly the point - the output carries fractional tonal values, the ones an 8-bit image physically cannot hold. The README's known-limitations section says it plainly: classical methods can't recover dynamic range that isn't in the source. This makes smooth gradients smoother; it does not invent shadow detail that was crushed away.

The inputs that matter

  • method - the four-algorithm dropdown above. Start at Bilateral+Dither, switch to Gradient Domain for skies, Multi-scale Fusion when quality beats speed.
  • strength (0.0–1.0, default 0.7) - how hard it pushes. 0.7 is a sensible default; drop it for subtle work, raise it for visibly posterized input.
  • preserve_edges (default true) - keep this on unless the image is uniformly soft. It's the difference between "smooth flats, sharp edges" and "everything looks gently vaselined."

That's the whole interface: image in, enhanced_image out.

Installing it

It's part of the Bit Depth Enhancer pack - via ComfyUI Manager (search "Bit Depth Enhancer") or:

cd ComfyUI/custom_nodes
git clone https://github.com/subraoul/ComfyUI_Bit-Depth-Enhancer.git
cd ComfyUI_Bit-Depth-Enhancer
pip install -e .

Restart ComfyUI. Dependencies are numpy, opencv-python, scipy and torch - nothing exotic, and because this node uses no ML it needs zero model downloads. That's the whole charm.

Wiring it into a workflow

The natural chain is Load Image → Bit Depth Enhancement (Classical) → Save 16-bit TIFF. The important part: the 16-bit-ness only matters if it reaches a 16-bit container. Save the output with ComfyUI's default Save Image node and the extra tonal steps get rounded right back into 8-bit banding. The pack's Save16BitTIFF node writes actual uint16 TIFFs, which is where this whole exercise pays off - print, color grading in Resolve, anything that respects a wide container.

A few honest caveats. The dithering is doing real work, so at high strength you may see a faint texture in what were flat regions - that's the noise that's replacing the bands, and it's the standard trade. And if your source is a heavily compressed JPEG, the benefit shrinks fast; the banding is baked in. Start with decent 8-bit output and this node will make it look like it always had more precision.

Categorybitdepth_enhancement

Inputs (4)

NameTypeDefaultDescription
imageIMAGEInput 8-bit image from previous ComfyUI nodes. Converts to 16-bit with reduced banding artifacts for professional color grading workflows.
methodCOMBOEnhancement algorithm: Bilateral+Dither (edge-preserving smoothing + error diffusion for balanced quality) | Gradient Domain (processes gradients, best for skies and smooth transitions) | Multi-scale Fusion (Laplacian pyramid, highest quality, preserves fine detail) | Fast Edge-Aware (guided filter, fast processing, good quality)
strengthFLOAT0.70–1Enhancement intensity (0.0-1.0). Higher values = more aggressive banding reduction. Start at 0.7 for most footage; reduce for subtle enhancement or increase for severe banding.
preserve_edgesBOOLEANtrueEdge-aware filtering to maintain sharp details (faces, text, fine textures) while smoothing flat areas. Disable only for uniformly soft/blurry content.

Outputs (1)

NameTypeDescription
enhanced_imageIMAGE