Image Dequantise
Kill the banding in a sky before you grade it
- images
- images
Every 8-bit gradient eventually betrays itself. A smooth sunset sky, a soft shadow, a vignette - they all get stored as 256 discrete levels, and where the ramp is gentle the steps show as ugly horizontal bands. You can blur it, but blurring a banded sky just smears the steps into a mush. Image Dequantise does the smarter thing: it rebuilds the levels the file threw away, turning a flat band back into the ramp it was cut from - and it promises no pixel moves more than half a code level to do it.
It's from WAS Node Suite (WASasquatch's MIT pack, v3 ships 457 nodes), filed under the suite's Image/HDR group. The placement is the clue to when you want it: before grading, tone mapping, or any HDR-ish pass, because those operations stretch tonal range and stretch banding right along with it. Deband first, then grade, or you're just making the bands more visible.
The three knobs
levels- how many codes the source was stored with, minus one. 255 means 8-bit (the default and the usual suspect), 1023 is 10-bit, 4095 is 12-bit. Setting it above what the source actually had leaves some banding in place, so match it to your file's real bit depth.radius- how far the smoothing reaches in pixels, 1 to 24. 2.0 gives fine dither-like noise, 8.0 handles an ordinary banded sky, 24.0 goes after the widest bands. The tooltip's advice is the practical one: raise it until the steps stop showing.rounds- how many passes of smoothing to run, 1 to 16. One is a quick pass that leaves the widest bands; 6 is a smooth ramp; 16 is the most it recovers. Each pass costs another blur, so there's a real speed trade.
How it works, briefly
Think of it as controlled noise plus smoothing, tuned so nothing moves far. The node examines each flat region and distributes a tiny reconstruction across it - "no sample moves further than half a code" - which is the property that keeps it from looking like you just added static. The result is a picture that still contains the original data but no longer shows the quantization steps. It reads best as the input to a bigger pipeline: dequantise a JPEG-sourced background, then run your color grade or tone map on a ramp that won't break apart.
When it's the right tool
Reach for it when banding is the actual complaint: a sky, a soft shadow, a gradient backdrop, a vignette. And it's worth doing prophylactically before heavy tonal work on anything that came out of an 8-bit PNG or JPEG - a contrast lift or a tone map is exactly what turns invisible 8-bit steps into visible ones. If your source is already a well-exposed 16-bit EXR, skip it; there are no levels to rebuild.
Install and notes
WAS Node Suite installs via ComfyUI Manager (search "WAS Node Suite v3") or git clone https://github.com/WASasquatch/was-node-suite-comfyui into ComfyUI/custom_nodes, then restart. Needs ComfyUI 0.14.0+ and Python 3.10+. v3 installs no extra Python packages - the reconstruction runs on torch, so no OpenCV/scipy ceremony. That's a genuine v2→v3 improvement; the old suite's heavy dependencies caused real import headaches.
Where people get burned: they crank rounds to 16 expecting magic and instead blur fine detail, because every pass smooths texture too. Keep rounds moderate (6 is the sane default) and use radius to chase the width of the actual bands. And remember this node changes luminance structure slightly - if you're dequantising a batch for a comparison render, do it to both sides so the difference you see isn't the deband itself.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The picture to rebuild; IMAGE. A batch is read as frames and each one is rebuilt on its own. | |
| levels | INT | 2551–65535 | Codes the source was stored with, less one; INT. 255 = 8-bit, 1023 = 10-bit, 4095 = 12-bit. A figure above the source's own leaves some of the banding in place. |
| radius | FLOAT | 8.01–24 | Pixels the smoothing spans; FLOAT, 1.0 to 24.0. 2.0 = fine dither noise; 8.0 = an ordinary banded sky; 24.0 = the widest bands. Raise it until the steps stop showing. |
| rounds | INT | 61–16 | Passes of smoothing; INT, 1 to 16. 1 = a quick pass that leaves the widest bands; 6 = a smooth ramp; 16 = the most it recovers. Each pass costs another blur. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | The rebuilt picture; IMAGE, the same size, length and channel count as it went in, on the same 0 to 1 scale. |