Audio Subtract β‘π ‘π π £π
Cancel one waveform out of another in ComfyUI
- audio1
- audio2
- AUDIO
This one's about as literal as node names get: it takes two audio clips and subtracts one waveform from the other, sample by sample. No AI model, no source separation, no Demucs stems - just arithmetic on two AUDIO tensors. Don't confuse it with a "remove the vocals" magic button; it's the raw phase-cancellation math that trick is built on, not the trick itself.
Why you'd reach for it
Phase cancellation is a genuinely old audio technique: if you have a mix and an instrumental (or a near-identical second take), subtracting one from the other leaves you with roughly whatever was different between them - often the vocal, or the noise floor, or whatever got added between two recordings. It only works cleanly when the two clips are sample-aligned and share the same underlying material; feed it two unrelated songs and you'll get noise, not a clean isolation. In a ComfyUI graph it's mostly useful as a building block: comparing a processed clip against its original to isolate what a filter or effect actually changed, or doing quick-and-dirty difference checks between two audio generations.
Inputs and outputs
There are exactly two required inputs and no knobs:
audio1- the first clip.audio2- the second clip, subtracted from the first.
The output is a single AUDIO - the difference. That's the entire interface. There's no gain compensation, no normalization option, no mode switch; if the result clips or comes out near-silent because the two inputs didn't line up, that's a signal the source pair wasn't a good candidate for subtraction, not something a hidden setting would have fixed.
Installing it
Install through ComfyUI Manager (search RyanOnTheInside) or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
Run pip install -r requirements.txt in the cloned folder, then restart ComfyUI. This particular node has no special dependency of its own - it's plain tensor math - but it ships in the same package as the pack's librosa-based audio-analysis nodes, so the install step still matters for the pack to import cleanly as a whole.
Common issues
The main trap is expecting this to behave like a source-separation model. It isn't one - there's no ML doing the isolating, so results are only as good as how well-aligned and how similar the two inputs are. Two clips with even a small time offset, a different sample rate, or a pitch/tempo mismatch will subtract into mush rather than a clean difference.
If the output audio comes back silent or near-silent when you expected a difference, check that audio1 and audio2 actually differ - feeding a node the same clip twice, directly or through a lossless pass-through, will zero everything out, which is correct behavior even though it looks like the node "did nothing." And as with the rest of the pack, if the node itself won't load at all, that's the requirements install, not this node's logic - verify pip install -r requirements.txt actually ran inside custom_nodes/ComfyUI_RyanOnTheInside before digging further.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio1 | AUDIO | First input audio | |
| audio2 | AUDIO | Second input audio |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | β |