ComfyUI Extension: ComfyUI-Stem-Mixer

Authored by tritant

Created

Updated

3 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Multitrack stem mixer node. Load stems directly into the node, add multi effects per track, mix with faders/mute/solo, preview in real time, and produce a final mix on workflow execution.

Looking for a different extension?

Custom Nodes (1)

README

ComfyUI-Stem-Mixer ๐ŸŽš๏ธ

A professional multitrack stem mixer node for ComfyUI. Load audio stems directly into the node, add multi effects per track, mix them in real time, with a full set of DAW-style controls, and produce a single mixed AUDIO output when the workflow runs.


<img width="1907" height="767" alt="Capture d&#39;รฉcran 2026-06-04 081856" src="https://github.com/user-attachments/assets/195f1e6f-4b2e-4a21-9841-a974216f5cd3" />

Features

Loading & file management

  • No audio inputs โ€” the node has no AUDIO input ports. Files are loaded directly inside the node.
  • ๐Ÿ“‚ Load button per track โ€” opens a file picker (WAV, FLAC, MP3, OGG, M4A, AIFF/AIF).
  • Drag & drop โ€” drag one or more audio files from your file explorer onto the node to add them instantly.
  • Replace a file โ€” click Load on an existing track to swap it with a new file. The track name updates automatically.
  • Files are stored in ComfyUI/input/stem_mixer/ and referenced by the workflow JSON.

Transport

  • โ–ถ Play / โธ Pause โ€” starts or pauses all stems simultaneously.
  • โ–  Stop โ€” stops playback and returns to the current playhead position.
  • โฎ Rewind โ€” returns the playhead to 0:00 without stopping playback.
  • โŸฒ Loop โ€” toggles looping on/off. When active, loops over the full track (if no selection) or over the selected region.
  • Time display โ€” shows current position and total duration: 0:34 / 3:27.
  • Sample-accurate sync โ€” all stems are scheduled on the same AudioContext clock via AudioBufferSourceNode. No drift, regardless of stem count or session length.

Selection & loop region

  • Drag on any waveform โ€” creates a selection (blue overlay shown on all tracks simultaneously).
  • Drag a selection edge (within 6 px of the border) โ€” resizes the selection; cursor changes to ew-resize.
  • Drag inside the selection โ€” moves the whole selection; cursor changes to move.
  • Click โ€” seeks to the clicked position; the selection is preserved.
  • Double-click โ€” clears the selection.
  • Loop + selection โ€” when Loop is active and a selection exists, playback loops natively within [start, end] at sample accuracy via AudioBufferSourceNode.loop.
  • Selection and loop state are saved in the workflow JSON and restored on reopen.

Per-track controls

  • Track name โ€” editable text field, auto-filled from the file name on first load.
  • Gain slider โ€” 0 % to 200 %, controls the track level.
  • Pan slider โ€” from L100 to R100, center = C. Equal-power pan law (same as professional DAWs). Double-click to reset to center.
  • M (Mute) โ€” silences the track.
  • S (Solo) โ€” exclusive solo: only one track can be soloed at a time.
  • EQ button โ€” opens the per-track EQ popup (see below).
  • โœ• Remove โ€” removes the track and frees all resources.
  • 8 FX (reverb, stereo widener and more) โ€” add multi effects per track.

Per-track EQ (popup)

  • Floating, draggable popup โ€” one per track, positioned freely on screen. Multiple popups can be open simultaneously. Position is saved per track in the workflow JSON.
  • 3 bands:
    • LOW โ€” Low-shelf at 100 Hz, ยฑ18 dB
    • MID โ€” Peaking at 1 kHz (Q = 0.7), ยฑ18 dB
    • HIGH โ€” High-shelf at 8 kHz, ยฑ18 dB
  • Vertical sliders โ€” one per band, with live dB readout above.
  • Double-click a slider โ€” resets that band to 0 dB.
  • ON / OFF button per band โ€” individual band bypass.
  • Reset button (in the titlebar) โ€” resets all three bands to 0 dB and turns them all ON in one click.
  • Frequency response graph โ€” real-time curve drawn from 20 Hz to 20 kHz with dB grid. Orange when EQ is active, blue when flat.
  • EQ indicator on track button โ€” the EQ button glows orange when the popup is closed but the EQ is doing something (any band โ‰  0 dB and ON).
  • EQ is applied identically in Python for the final render (RBJ biquad coefficients via torchaudio.functional.biquad).

Per-track stereo VU meters

  • Post-fader, post-EQ level meters shown to the right of each waveform.
  • Two narrow bars: L (left) and R (right).
  • RMS measurement for natural, musical movement.
  • Peak hold โ€” white line that decays slowly (~12 dB/sec) to show transient peaks.
  • Color scale: dark green (โˆ’60 dB) โ†’ bright green โ†’ yellow โ†’ orange โ†’ red (0 dB).
  • Meters reset to zero when playback stops.

Master section (in the header)

  • Master fader โ€” 0 % to 150 %, controls the overall output level of the mix. Double-click to reset to 100 %.
  • Master stereo VU โ€” post-master level meter using the same dB/color scale as the track meters.
  • Master volume is applied to both the live preview and the rendered mix in Python.

Waveform display

  • Waveform drawn from decoded audio peaks โ€” instant rendering, no separate analysis pass.
  • Progress bar (darker blue) advances with playback.
  • Cursor line (white) shows the current playhead.
  • Adaptive height โ€” waveforms scale between 32 and 64 px depending on the node height. Resize the node manually to give more or less space to each track.
  • Resize-responsive โ€” waveforms redraw cleanly when the node is resized in any direction.

Persistent state

All settings are saved in the workflow JSON and restored when the workflow is reopened:

  • Track list: names, file paths, order
  • Gain, pan, mute, solo per track
  • EQ gains, ON/OFF per band, popup position per track
  • Master volume
  • Loop on/off
  • Selection region (start/end in seconds)

The JSON format is backward-compatible with earlier versions of the node.


Final mix (Python)

When the workflow is executed, the AudioStemMixer node:

  1. Parses the JSON state.
  2. Loads each non-muted stem from disk with torchaudio (resamples to a common sample rate if needed, forces stereo).
  3. Applies per-track EQ (RBJ biquad: low-shelf 100 Hz, peaking 1 kHz Q=0.7, high-shelf 8 kHz) using torchaudio.functional.biquad.
  4. Applies per-track gain and equal-power pan (same law as the Web Audio StereoPannerNode).
  5. Respects mute and solo (only soloed tracks contribute if any track is soloed).
  6. Sums all stems, pads shorter ones with silence.
  7. Applies master volume.
  8. Applies soft-clip protection (scales down if the peak exceeds 0 dBFS, without hard clipping).
  9. Returns a standard ComfyUI AUDIO dict ready for PreviewAudio, SaveAudio, or any downstream audio node.

Installation

Clone or copy this repository into ComfyUI/custom_nodes/:

ComfyUI/custom_nodes/ComfyUI-StemMixer/

Restart ComfyUI. The node appears under audio/mixer as Audio Stem Mixer ๐ŸŽš๏ธ.

Requirements

  • ComfyUI (any recent version)
  • torch and torchaudio (already installed by ComfyUI)

No additional Python packages required.


License

MIT

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Learn more