Nodes/comfyui-sloppyaudio/SloppyAudio Stem Merge
ComfyUI Node

SloppyAudio Stem Merge

The mixer node that puts your stems back together (and fixes clipping)

By forcepusher·Created 4 months ago·Updated 4 months ago· 1
SloppyAudio Stem Merge
  • audio1
  • audio2
  • audio3
  • audio4
  • audio
gain1_dB0.0
gain2_dB0.0
gain3_dB0.0
gain4_dB0.0
normalizetrue

This is the node you reach for the moment your workflow splits audio into pieces and you need to put it back together - and it's the most underrated node in the pack. SloppyAudio Stem Merge mixes up to four AUDIO inputs into one, each with its own gain control in decibels, and it auto-normalizes the result so you don't blow out your speakers the first time you run it.

Its natural home is downstream of SloppyAudio Stem Separate. Separate a track into vocals, drums, bass, and other; drop the bass a few dB; fade the vocals; then Merge them back into a single mixed track before you save or mux it. It's a 4-bus mixer living inside a node graph, and it works identically with any four audio sources, not just stems.

What you set

The inputs that actually matter:

  • audio1 - the only required one. Everything else is optional, and unconnected inputs are simply skipped. Wire in exactly what you have.
  • gain1_dBgain4_dB - per-input gain from -60 dB to +24 dB in 0.5 steps. 0 dB is unity (no change), positive boosts, negative cuts. -60 dB is effectively mute, so you can use gains to "turn off" a stem without rewiring.
  • normalize - on by default. If the sum peaks above 1.0, it scales the whole mix down so nothing clips.

One audio output comes out the other side.

How it works

Here's the thing that sets this node apart from its packmates: it's pure tensor math, no SoX. The other nodes shell out to an embedded binary; Merge just adds numpy/torch arrays in ComfyUI's own AUDIO format. That makes it fast and dependency-light, and it means the behaviors are dead simple and predictable:

  • Sample rate comes from the first connected input; the output matches it.
  • Mismatched lengths are handled by zero-padding the shorter inputs, not by truncating the longer one - so a 10-second drum track and a 4-minute mix sum correctly without you cutting anything.
  • Mono vs stereo: a mono input gets broadcast to both channels when any other input is stereo, so you don't get a lopsided mix.

The one thing to respect: with normalize off, summing loud tracks will clip. The math doesn't care about your speakers. Leave normalize on until you have a reason not to - usually you want the headroom for a downstream effect.

Installing it

Same shared install as the rest of the pack. ComfyUI Manager → search sloppyaudio → Install, or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/forcepusher/comfyui-sloppyaudio

Restart ComfyUI. Dependencies (torch, numpy, soundfile, librosa, einops, safetensors) auto-install via Manager. Since this node is pure tensor math it doesn't even need the bundled SoX binary, but you get it anyway for Fade and Pitch.

Where people get confused

  • "It's ignoring my second input." If you left a socket unconnected, the node treats it as absent - that's the design. If you thought you'd connected it, check the wire.
  • "The mix is quieter than the parts." That's normalize doing its job: when a sum exceeds 1.0, everything scales down to fit. If you want the hotter level and don't care about clipping, flip normalize off.
  • Sample-rate surprises. All inputs share the first input's sample rate, so if your sources disagree (one at 44.1k, one at 48k) you'll get the first one's rate with no resampling. In practice, stem sources from the same pipeline already match.

Merge is the glue of the pack - the part that makes "separate, tweak, recombine" a real workflow instead of a dead end. Tweak one stem, rebalance the bass, and get a finished mix without leaving the graph.

Categoryaudio/SloppyAudio

Inputs (9)

NameTypeDefaultDescription
audio1AUDIO
audio2optAUDIO
audio3optAUDIO
audio4optAUDIO
gain1_dBoptFLOAT0.0-60–24
gain2_dBoptFLOAT0.0-60–24
gain3_dBoptFLOAT0.0-60–24
gain4_dBoptFLOAT0.0-60–24
normalizeoptBOOLEANtrue

Outputs (1)

NameTypeDescription
audioAUDIO