Nodes/MKRShift_Nodes/Audio Limiter
ComfyUI Node

Audio Limiter

Tame those hot peaks so your AI audio stops blowing out speakers

By criskb·Created 7 months ago·Updated 5 months ago· 0
Audio Limiter
  • audio
  • audio
  • output_path
  • duration_sec
  • summary
threshold_db-1.0
ceiling_db-0.5
release_ms50.0
makeup_db0.0
soft_clipfalse
normalize_peakfalse
output_formatauto
filename_prefixMKR_audio_limiter
subfolder
overwritefalse
filename_label

Generated audio runs hot. Music models and TTS output routinely peak at full scale, and the moment you add any gain or EQ the result distorts on every playback system you own. A limiter is the safety net that catches those peaks before they flatten - it's the reason professional mixes sound "loud but clean" instead of "loud and crunchy." MKRAudioLimiter brings that to ComfyUI as the finishing step of an audio chain: it's the last thing before export, and it's usually the difference between audio that embarrasses you and audio that doesn't.

It belongs to the FX branch of the MKRShift_Nodes audio set, and it's the natural partner for MKRAudioEQ3Band and MKRAudioBitcrush - both of those add gain and distortion, which is exactly what a limiter cleans up afterwards.

How it works

This is a sample-by-sample peak limiter with an envelope follower. It tracks a peak envelope with a release_ms-governed decay (an exponential coefficient derived from the release time - shorter release = snappier recovery, longer = smoother/less pumping). Whenever the envelope exceeds threshold_db, it applies the ratio threshold / envelope to pull the signal back down; below threshold it passes through untouched. After limiting, makeup_db re-boosts the overall level (the classic "limit then make up gain" loudness move), and the result is bounded by ceiling_db - the hard max level.

The soft_clip toggle swaps the final hard clamp for a tanh-style soft clip at the ceiling, which rounds off peaks instead of slicing them - slightly warmer, slightly more distortion. It's the difference between a polite limiter and a "character" limiter.

Inputs that matter

  • audio - MKR_AUDIO payload, waveform tensor, or file path (* type).
  • threshold_db - default −1 dB. Where limiting kicks in. Lower = more aggressive.
  • ceiling_db - default −0.5 dB. The absolute ceiling; keep it below 0.
  • release_ms - default 50 ms. How fast the limiter recovers after a peak.
  • makeup_db - default 0. Boost after limiting to restore loudness.
  • soft_clip / normalize_peak - character and safety toggles.
  • Standard save block: output_format, filename_prefix, subfolder, overwrite, optional filename_label.

Outputs: audio (MKR_AUDIO), output_path, duration_sec, summary.

Install

ComfyUI Manager (search "MKRShift Nodes"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart. The limiting math is pure numpy - ffmpeg only matters for mp3/flac/ogg output. No models, no downloads.

Common issues

The biggest beginner mistake is cranking threshold_db way down (−24 dB) and wondering why everything sounds squashed: that's not a limiter anymore, that's a compressor at max ratio. For speech, keep the threshold near −1 to −3 dB. Second, if you hear pumping on sustained tones, raise release_ms. And no limiter fixes clipping that's already baked into the source at zero level - if threshold_db at 0 dB still shows clipped output, the damage happened upstream; run MKRAudioClippingDetector to confirm where.

CategoryMKRShift Nodes/Media/Audio/FX

Inputs (12)

NameTypeDefaultDescription
audio*
threshold_dbFLOAT-1.0-24–0
ceiling_dbFLOAT-0.5-24–0
release_msFLOAT50.01–1000
makeup_dbFLOAT0.0-24–24
soft_clipBOOLEANfalse
normalize_peakBOOLEANfalse
output_formatCOMBOauto5 options: auto, wav, mp3, flac, ogg
filename_prefixSTRINGMKR_audio_limiter
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (4)

NameTypeDescription
audioMKR_AUDIO
output_pathSTRING
duration_secFLOAT
summarySTRING