ComfyUI Node

AudioCombine

Mix two audio tracks by add, subtract, mean, multiply, or divide

By christian-byrne·Created 2 years ago·Updated 4 months ago· 591
AudioCombine
  • audio_1
  • audio_2
  • AUDIO
methodadd

AudioCombine takes two audio tracks and overlays their waveforms, with your choice of arithmetic doing the combining: add, mean, subtract, multiply, or divide. It's the simplest node in the audio-separation-nodes-comfyui pack and, once you've used AudioSeparation, one of the ones you'll reach for most - separation gives you stems, and stems only become useful again once you recombine them into something.

Why you'd reach for it

The obvious case is mixing: layer a new music bed under a voiceover, or put a separated vocal stem back over a different instrumental. But the more interesting trick is buried in this pack's own documentation on stem separation. Demucs (the model behind AudioSeparation) only gives you four stems - bass, drums, other, vocals - and "other" is a dumping ground for everything that isn't one of the first three: guitars, synths, keys, strings, all mixed together. If you specifically want, say, isolated guitar, there's no dedicated stem for that. The workaround is to separate first, then use AudioCombine's subtract method to pull unwanted content out of the "Other" stem. It's not surgical - it's a workaround, not a real per-instrument separator - but it's the tool the pack gives you for going one step further than the four default stems.

How it works

This is sample-by-sample waveform arithmetic, not a mixing console with gain staging or EQ. Each method behaves differently: add sums the two waveforms directly (simple mixing, but can clip if both tracks are already hot); mean averages them instead, which is gentler and less likely to clip; subtract removes what's common between the two signals - the basis of the guitar-isolation trick above; multiply and divide are more niche signal-processing operations, and divide in particular can behave unpredictably wherever the second signal gets close to silence (dividing by near-zero). For straightforward mixing, add or mean are where you'll spend most of your time; subtract is the specialty move.

The inputs and outputs that matter

Two required AUDIO inputs - audio_1 and audio_2 - plus one optional setting:

  • method - an enum, default "add", with the five choices above (add, mean, subtract, multiply, divide).

Output is a single AUDIO - the combined result, ready to save or pipe into another audio node.

Installing it

Search audio-separation-nodes-comfyui in ComfyUI Manager, or install manually: cd ComfyUI/custom_nodes && git clone https://github.com/christian-byrne/audio-separation-nodes-comfyui, cd in, pip install -r requirements.txt, then restart ComfyUI. Dependencies (librosa, torchaudio>=2.3.0, numpy, moviepy) are shared across the whole pack - AudioCombine itself is lightweight and doesn't need a model download.

Common issues

There's no Demucs model involved here, so the checkpoint-corruption issue documented for AudioSeparation doesn't apply to this node. The practical gotcha is more about expectations than errors: this node combines waveforms directly, so if your two inputs are wildly different lengths or loudness levels, the result can sound lopsided or get cut short at whichever track is shorter - worth trimming both to a matching length with AudioCrop first if the mix sounds off. And if you're using subtract for the guitar-isolation trick, don't expect a pristine result - you're subtracting a whole waveform, not a specific frequency band, so some bleed from other instruments in "Other" is normal.

Categoryaudio

Inputs (3)

NameTypeDefaultDescription
audio_1AUDIO
audio_2AUDIO
methodoptCOMBOaddThe method used to combine the audio waveforms.

Outputs (1)

NameTypeDescription
AUDIOAUDIO