Nodes/Audio Batch/Audio Force Channels
ComfyUI Node

Audio Force Channels

Audio Force Channels — when a number is easier than a dropdown

By set-soft·Created about a year ago·Updated about a year ago· 8
Audio Force Channels
  • audio
  • audio
channels0
downmix_methodstandard_gain
n_fft2048
hop_length512

Audio Force Channels (SET_AudioForceChannels) is the integer-flavored sibling of Audio Channel Converter. Where the Converter gives you a dropdown of named strategies, this node asks for one number: channels. And because it's an integer, it slots straight into anything that computes a value - a fixed 2 for your video pipeline, a 1 for a voice-only branch, whatever logic upstream decides.

The mapping is the entire node, and it's clean:

  • 0 → keep as-is (the Converter's keep).
  • 1 → force mono.
  • 2 → force stereo.

That's the full range (min 0, max 2). There's no 3 or 8 - the node is deliberately a mono/stereo gate, and it says so in the tooltip: "Forces the number of channels. 0 means keep same."

Everything else is shared with its sibling. The downmix_method dropdown (average, standard_gain default, spectral) governs how multi-channel audio collapses to mono, and the optional n_fft / hop_length inputs tune the spectral method when you pick it. If you've read the Channel Converter article, none of this is new - it's the same machinery behind a numeric interface.

Why the numeric version exists

Honestly? Convenience and automation. In a hand-built workflow, the dropdown is nicer to read. But the moment your channel count is driven - a preset switcher, a batch of workflow variants, a value you want to expose as a widget on the front of the graph - a number beats a dropdown because you can compute it. Also worth noting: with channels = 0, this is a harmless passthrough that just logs a warning on exotic channel counts, which makes it a decent place to stash an audio branch you might convert later.

Output

audio_out - the converted audio, sample rate and batch size untouched. It changes channels and only channels, just like the Converter.

Install & gotchas

Part of the Audio Batch pack. ComfyUI Manager search "Audio Batch", or:

cd ComfyUI/custom_nodes/
git clone https://github.com/set-soft/ComfyUI-AudioBatch
pip install seconohe

Restart ComfyUI. No model downloads.

The one trap is forgetting what 0 means. Because 0 is "keep," the default state does nothing - a workflow that passes audio through this node with channels left at 0 will look like it's converting when it isn't. If you're debugging why a downstream node still sees mono, check this first. And remember the same fake-stereo caveat as its sibling: forcing to 2 channels duplicates the mono channel; it does not invent stereo width.

Categoryaudio/conversion

Inputs (5)

NameTypeDefaultDescription
audioAUDIO
channelsINT00–2
downmix_methodCOMBOstandard_gainMethod for stereo/multi-channel to mono conversion: - average: Simple average ((L+R)/2). Can reduce volume. - standard_gain: Sums channels with -3 dB gain (0.707). Better preserves perceived loudness.- spectral: Averages frequency magnitudes to prevent phase cancellation.
n_fftoptINT2048256–8192FFT size for spectral downmixing. Higher values give better frequency resolution but worse time resolution.
hop_lengthoptINT51264–4096Hop length for STFT. Typically n_fft / 4. Controls time resolution.

Outputs (1)

NameTypeDescription
audioAUDIO