Nodes/Post Processing PRO/Bayer Dithering PRO
ComfyUI Node

Bayer Dithering PRO

Kill color banding with a pattern your monitor won't even see

By Guillaume-127·Created 5 months ago·Updated 5 months ago· 2
Bayer Dithering PRO
  • image
  • IMAGE
strength0.020
pattern_size1

You know those ugly concentric rings in a sunset or sky gradient, the ones that make a perfectly good image look like a 90s web banner? That's banding - 8-bit color quantization leaving visible steps where the tone should slide smoothly. It's one of the most common things that makes AI renders read as "digital" before you even get to anatomy. Bayer Dithering PRO is the pack's quiet answer to it: it lays down a Bayer matrix pattern so fine your eye never registers it as texture, but the noise it adds is enough to break up the flat steps into something smooth.

This is a genuinely old trick from printing and displays - Bayer ordered dithering predates digital photography - and it's the same principle your monitor uses to fake more colors than it physically has. Reintroducing it in post is an elegant way to de-quantize a render.

How it works

The node builds the classic 2×2 Bayer matrix - the four-value threshold pattern that looks like a little 0 2 / 3 1 grid - normalizes it so values sit between -0.5 and +0.5, tiles it across the whole frame, and adds that pattern to the image at a tiny strength. The result: every pixel gets a sub-perceptual nudge that varies with the pattern, so identical neighboring pixels (which are what create a band) all get slightly different values, and the gradient reads as continuous instead of stepped.

Two controls shape it:

  • strength (default 0.02, max 0.2) - how much of the dither pattern gets mixed in. The range is deliberately small because the whole point is that you don't see it; at 0.02 it's doing its job and 0.1+ starts looking like deliberate texture.
  • pattern_size (default 1, 1–4) - scales the Bayer matrix up using nearest-neighbor, making the dither coarser. Physically, a real color filter array's dither is 1 pixel, which is why the default is 1 and why most people never touch this.

The inputs that matter

  • image - the IMAGE tensor to de-band.
  • strength (default 0.02) - the amount of dither. Leave it near default; it's the whole trick.
  • pattern_size (default 1) - pattern coarseness. Bump only if you want an overt CFA texture.

Output is an IMAGE of the same size.

Installing it

One of 14 nodes in the Post Processing PRO pack. ComfyUI Manager → search "Post Processing PRO", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Guillaume-127/ConfyUI_Post_Processing_PRO

Restart after. No requirements file, no models - pure numpy tiling plus OpenCV.

Where people get tripped up

The trap with this node is expectation management: you turn it on, you look at the output, you see... nothing. That's the point. The banding is gone, but the dither itself is below perception by design. Don't crank strength looking for visible effect - if you want to see the CFA grid, that's pattern_size at 3–4 with a higher strength, which is more of a stylistic glitch look than a fix. The other note: it works best applied before final export to an 8-bit format (PNG/JPEG), because the dither is what survives the quantization. Applying it after you've already saved at 8-bit is too late - the steps are already baked in.

CategoryPost_Processing_PRO/Effects

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
strengthFLOAT0.0200–0.2
pattern_sizeINT11–4

Outputs (1)

NameTypeDescription
IMAGEIMAGE