Audio Dither β‘π ‘π π £π
The trick that keeps bit-depth reduction from sounding grainy
- audio
- AUDIO
Dithering is old audio-engineering wisdom that still applies inside a ComfyUI graph: when you reduce a signal's bit depth (say, from the 32-bit float your pipeline generates down to 16-bit for export), you're rounding every sample to a coarser grid, and that rounding error shows up as distortion that correlates with the signal - which your ear hears as harshness or graininess, especially on quiet passages. Adding a tiny, carefully-shaped amount of noise before quantizing breaks that correlation and turns the error into something closer to plain hiss, which is far less objectionable. That's dithering, and that's exactly what this node does.
How it works
You give it audio and a target bit_depth, and it quantizes down to that depth with optional noise shaping applied first. This isn't unique to RyanOnTheInside's pack or to ComfyUI - it's the same technique mastering engineers apply before bouncing a mix to a lower bit depth in any DAW.
The inputs and outputs that matter
audio(AUDIO, required) - your input clip, presumably at higher precision than your target.bit_depth(default 16, range 8β32) - the depth you're quantizing down to. 16-bit is the CD/standard-export target; going below that (8-bit) is a deliberate lo-fi/degraded effect rather than something you'd normally want for clean output.noise_shaping-noneortriangular. Triangular is the standard, well-understood dithering noise shape (TPDF - triangular probability density function) that most audio tools default to;nonejust truncates/rounds without adding anything, which is the option that actually risks the audible quantization artifacts dithering exists to prevent.- Output - a single
AUDIO, at the reduced bit depth.
How to install it
Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
then restart ComfyUI. No models involved - this is signal processing, not a learned model.
Common issues & troubleshooting
You can't hear any difference with dithering on vs off. That's actually expected on louder, busier material - dithering's benefit is most audible on quiet passages and fades, where quantization distortion without dithering becomes a "birdies" or graininess artifact as the signal approaches silence. Test on a fade-out or a quiet section, not a loud chorus.
Why bother if you're not exporting to 16-bit? You probably don't need this node at all if your whole pipeline and final output stay at high bit depth/float precision throughout - dithering only matters at the point you're reducing bit depth, typically right before final export. Slot it in there, not earlier in the chain.
Using none for noise shaping "to keep it clean." That instinct is backwards - none skips the dithering entirely and quantizes raw, which is the option most likely to introduce audible artifacts on quiet content. triangular is the one doing the actual work this node exists for.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Input audio to apply dithering | |
| bit_depth | INT | 168β32 | Target bit depth (8 to 32) |
| noise_shaping | COMBO | Type of noise shaping to apply ('none' or 'triangular') |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | β |