ComfyUI Node

Normalize Audio

Stop your ComfyUI exports from clipping or vanishing into silence

By drmbt·Created 2 years ago·Updated 7 months ago· 6
Normalize Audio
  • audio
  • AUDIO
target_lufs-14.0
true_peak_limit-1.0
normalize_type

Generated audio has a loudness problem, and it's not the one you think. The clip doesn't need to be "louder" - it needs to be consistent: the same perceived loudness as the rest of your soundtrack, peaking below clipping, matching whatever platform you're posting to. That's exactly what this node does, and it's the audio equivalent of a no-brainer utility: one node, four inputs, no model downloads, no waiting. You drop it between your audio source and your save/preview node and it handles the rest.

It ships in the drmbt/comfyui-dreambait-nodes pack, which is worth knowing because that pack's MusicGen node produces exactly the kind of un-normalized audio this fixes - generated music tends to come out either too hot or too quiet depending on the model and prompt.

How it works

Two modes, both grounded in broadcast engineering:

  • LUFS mode (lufs) measures perceived loudness using the BS.1770-4 standard via the pyloudnorm library, then applies whatever gain gets you to your target. This is the "loudness the human ear hears" number, not the raw peak - which is why two clips that look equally loud on a waveform can sound wildly different.
  • Peak mode (peak) is the old-school approach: find the highest sample, scale so that peak hits your target. Simpler, and right for sample libraries and technical work where peak level matters more than perceived loudness.

Both modes then run a true-peak limit at your true_peak_limit, clipping anything that would cross it. Worth being honest about the mechanism: it's a hard clip in the shipped code, not a fancy look-ahead limiter - the author even says so in a comment. For typical generated-audio loudness matching that's plenty; it's not a mastering chain.

It also handles silence and near-silence gracefully - if the input measures as absolute quiet, it leaves the gain alone instead of boosting noise into audibility.

The inputs that matter

Only four, and the defaults are already correct for the most common case:

  • audio - any AUDIO input (from MusicGen, LoadAudioPlus, core loaders, etc.).
  • target_lufs - integrated loudness target, default -14 (the streaming standard: Spotify, YouTube, Apple Music). Broadcast goes to -23, per the README.
  • true_peak_limit - maximum true peak in dBTP, default -1. The -1 leaves headroom so lossy encoding doesn't clip.
  • normalize_type - lufs or peak. Default is LUFS, and for anything going to a platform that's the right call.

The README gives you three ready-made presets: streaming (-14 LUFS, -1 dBTP), broadcast (-23 LUFS, -2 dBTP), and sample libraries (peak mode, -0.3 dBTP).

Installing

This is one node inside the drmbt/comfyui-dreambait-nodes pack - install the pack. ComfyUI Manager: search comfyui-dreambait-nodes. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes
# restart ComfyUI

The node itself needs pyloudnorm, which the pack's requirements.txt installs automatically via Manager. If you cloned manually and skipped pip, you'll see a ModuleNotFoundError on first run - pip install pyloudnorm in ComfyUI's Python environment fixes it.

Where people get burned

The classic trap is treating LUFS as "make it louder." If your target is -14 and your clip sits at -20, it will get louder - but if your clip is already at -10, this node will turn it down to hit the target. That's the point, but it surprises people the first time. Second trap: default -1 dBTP is fine for streaming, but if you're mastering something destined for a service that applies its own loudness normalization, you don't need to pre-normalize at all. And if you chain this after a node that already limited the audio, you're just measuring and re-applying gain - harmless, but pointless. The output is an AUDIO type, so it feeds the same save/preview nodes as any other audio.

Categoryaudio/processing

Inputs (4)

NameTypeDefaultDescription
audioAUDIO
target_lufsFLOAT-14.0-70–0
true_peak_limitFLOAT-1.0-20–0
normalize_typeCOMBO2 options: lufs, peak

Outputs (1)

NameTypeDescription
AUDIOAUDIO