Music - Audio Repair
Fix the Clicks, Pops and DC Offset Before Anything Else
- audio
- AUDIO
- REPAIR_REPORT
Every audio pipeline has a "clean up the garbage first" step, and in ComfyUI Music Tools that's Music - Audio Repair. It's designed to sit at the very front of the chain and fix the four things that make generated or badly digitized audio sound broken: invalid samples (NaN/Inf), DC offset, isolated clicks/pops, and short hard-clipping plateaus.
The key insight from the pack's own docs: place repair before denoise or mastering, because spectral processing spreads impulsive defects. A single click through a spectral-subtraction denoiser becomes a smeared artifact. Fix it here, in the time domain, while it's still a single event. The recommended chain is:
Load Audio -> Audio Repair -> Noise Remove -> Music Fix -> Save Audio
The one thing to know about it: it's conservative
This node is built to not make things worse. Long flat regions are deliberately skipped because they may be intentional synthesis or distortion - a square-wave synth bass is not clipping, and the repair leaves it alone. That's the difference between a repair tool you trust on a music master and one you don't. Clipping repair is bounded by clip_threshold_dbfs (default −1 dBFS) and never infers clipping below what you asked for; clicks are interpolated rather than aggressively chopped.
Inputs that matter
mode-Auto (All)does everything: invalid samples, meaningful DC offset, short clipping plateaus, isolated clicks. ThenDe-click Only,De-clip Only,DC Offset Onlyfor surgical cases, andOfffor a bit-exact bypass after format conversion. Auto (All) is a fine default; the single-purpose modes exist because generated vocals often have clicks but no clipping, and you don't want the declipper guessing.sensitivity(0–1, default 0.5) - how aggressively events get detected.clip_threshold_dbfs(default −1) - the level above which the declipper starts looking. The further below 0 it is, the more "clipping" it finds - most true clipping sits right at 0, so −1 is a sane start.max_click_ms(default 0.5) andmax_clip_ms(default 10) - the size limits for what counts as a click vs. a clipping plateau. Events longer than these are treated as real audio and left alone.output_ceiling_dbfs(default −1) - safety headroom on the output after repair.
The output you'll forget is there
Besides AUDIO, this is one of the few nodes in the pack with a second output: REPAIR_REPORT, a STRING that tells you what was found and fixed (per-channel event counts, DC estimates, how many clipping plateaus were skipped). Wire it into a text display node when you're debugging why a track still sounds off - it's genuinely useful for diagnosing a noisy source, and it's the honest counterpart to the "did it do anything?" question every conservative repair tool raises.
Install
Same pack install as everything else here:
cd ComfyUI/custom_nodes
git clone https://github.com/jeankassio/ComfyUI_MusicTools.git
cd ComfyUI_MusicTools
python -m pip install -r requirements.txt
Restart, look under music, and drop it at the head of your chain. No models, no GPU. If your source is clean studio audio, this node will do nothing - and it'll tell you so in the report.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| mode | COMBO | Auto (All) | 5 options: Auto (All), De-click Only, De-clip Only, DC Offset Only, Off |
| sensitivity | FLOAT | 0.500–1 | — |
| clip_threshold_dbfs | FLOAT | -1.0-18–-0.01 | — |
| max_click_ms | FLOAT | 0.500.05–3 | — |
| max_clip_ms | FLOAT | 10.00.2–30 | — |
| output_ceiling_dbfs | FLOAT | -1.0-12–-0.01 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |
| REPAIR_REPORT | STRING | — |