Nodes/MD Nodes/MD: LUFS Normalizer
ComfyUI Node

MD: LUFS Normalizer

Get your audio to Spotify loudness in one node — and know the number you hit

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: LUFS Normalizer
  • audio
  • audio
  • report
target_lufs-14.0
true_peak_limit_db-1.0
debug_mode0 - Silent

If you generate music with ACE-Step or any ComfyUI audio model, you'll eventually hit the streaming-platform loudness question: Spotify and YouTube normalize to roughly -14 LUFS, and if your track lands way off that, it either comes out quieter than everything around it or gets clamped down and sounds flat. MD_LUFS_Normalizer measures your audio's integrated loudness and applies the exact gain to hit whatever target you ask for - then reports what it did.

This is the node you put at the end of an audio workflow, right before saving. It's loudness normalization done properly: it measures loudness (LUFS, the perception-weighted average), not just peak level, so a quiet-but-peaky track gets boosted intelligently and a loud one gets pulled back.

How it works

The node measures the integrated LUFS of the incoming audio with its own meter core, computes the gain delta as target - measured, and applies it as a linear gain on the waveform - the code comments even note they bypass any measurement drift in the library's own normalize function by measuring, computing, and applying directly. Then a true-peak safety pass runs: if the result's true peak (oversampled, dBTP) exceeds your limit, it scales down just enough to stay under. Output is the corrected audio plus a human-readable report.

The inputs that matter

  • target_lufs - the loudness you're aiming for. Default -14, which is the Spotify/YouTube standard. -23 is EBU R128 broadcast. If you're making a loudness-war track on purpose, this is where you'd push up.
  • true_peak_limit_db - the ceiling in dBTP. Default -1, which is the safe streaming choice; 0 would technically allow inter-sample peaks that some players clip.
  • debug_mode - logging verbosity; leave it silent for production.

Outputs: the normalized audio (into a save/preview node) and a report string telling you the measured loudness, the gain applied, and the result.

Installing

Part of the MD Nodes pack - and this one pulls the audio dependency chain with it:

cd path/to/ComfyUI/custom_nodes
git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
cd ComfyUI_MD_Nodes
pip install -r requirements.txt

Or via ComfyUI Manager (search MD Nodes), then restart. The loudness meter core ships in the repo, but the pack's requirements include pyloudnorm (used by the sibling auto-mastering node) and soundfile/librosa for audio file handling - install the whole requirements file rather than cherry-picking, or these nodes will warn and pass audio through unchanged.

Common issues

The one that trips people up is the report output, which is also the answer to most "it's not working" complaints: the node's pass-through when its core isn't loaded is silent unless you watch debug output. Check the report string - if it says Core Missing. No change applied., the requirements aren't fully installed. Otherwise the usual mastering caveats apply: LUFS normalization fixes loudness, not dynamics - if your track is crushed before it gets here, normalization won't un-crush it, and if the source is way under -14, the boost will also bring up its noise floor. Do loudness last, after EQ and compression.

CategoryMD_Nodes/Audio Processing

Inputs (4)

NameTypeDefaultDescription
audioAUDIOAUDIO INPUT • Signal to be normalized.
target_lufsFLOAT-14.0-30–0TARGET LUFS • Purpose: Integrated loudness target level. • Standards: -14.0 (Spotify/YouTube), -23.0 (EBU R128 Broadcast). ⭐ Recommended: -14.0 for music distribution.
true_peak_limit_dbFLOAT-1.0-10–0TRUE PEAK LIMIT • Purpose: Maximum allowed peak level (dBTP) to prevent clipping. ⭐ Recommended: -1.0 for safe streaming.
debug_modeoptCOMBO0 - SilentLOGGING VERBOSITY

Outputs (2)

NameTypeDescription
audioAUDIO
reportSTRING