Nodes/comfyui-obvpm/Optional Audio (obvpm)
ComfyUI Node

Optional Audio (obvpm)

Keep a silent workflow from blowing up

By chanon·Created about a month ago·Updated a day ago· 40
Optional Audio (obvpm)
  • input
  • audio
  • present
on_emptymute

Audio in ComfyUI is the newest and thinnest part of the stack. It arrives through node packs rather than core - ACE-Step for music, MMAudio and friends for sound under a video, TTS packs for voices - and each of those adds its own AUDIO sockets to a graph that was designed image-first. Which means you end up with a workflow that can make a soundtrack and often doesn't, and that's a state ComfyUI handles badly by default.

Optional Audio is the typed version of the optional gate: same mechanics as Optional Any, but the socket is declared AUDIO, so the editor will stop you from wiring an image into it.

What it does

Pass audio in, get audio out. Leave the input empty and on_empty decides:

  • mute - an ExecutionBlocker goes out, and everything downstream of the gate is skipped without a word. Good for "no audio, so don't render the mux/save-audio stage at all."
  • bypass - None goes out, and a downstream node with an optional AUDIO input reads it as unconnected and copes on its own.

The second output, present, is a BOOLEAN that's true when audio is wired in. It stays true regardless of mute - the flag survives while the value path is dead - so you can hand it to a Lazy Switch and route a whole muxing branch off the single question "did this run produce audio?"

Inputs and outputs

on_empty (mute by default) and an optional input of type AUDIO - that's the entire input surface. The outputs are audio (the passthrough) and present (the boolean).

Notice that on_empty is required and has a default, so it's a widget you'll see on the node rather than a socket you have to wire. If you want it driven by logic, convert the widget to an input, the usual right-click move described in the plumbing notes.

When you'd actually reach for it

The honest answer is: whenever a workflow has an audio stage that is conditional. A video pipeline where you sometimes generate a sound layer and sometimes render silent. A batch where only some items have reference audio for a voice clone. A music pass you want to leave parked in the graph without deleting and re-adding the nodes every time you change your mind.

Two things to know about how this behaves in practice.

Mute kills the chain; it doesn't stop the work feeding it. The TTS or MMAudio node upstream of the gate has already run and spent its VRAM and seconds. If skipping that compute is the goal, this isn't the node - a Lazy Switch is, because lazy inputs let ComfyUI prune the unselected side before it evaluates anything behind it. Mute is for when the audio exists but a downstream consumer should not be reached.

Bypass is only as graceful as the consumer. None into a required input is still an error, just further from home. Most save/mux nodes treat audio as optional, but check yours before blaming the gate.

And the usual caveat for a node like this: it has no community thread behind it, because this pack has essentially no reddit footprint at all - zero hits for "obvpm" in the corpus. You're reading source-level documentation, not folklore. The good news is that the source here is eleven lines of decision.

Install

Manager, searching comfyui-obvpm, or:

cd ComfyUI/custom_nodes
git clone https://github.com/chanon/comfyui-obvpm

Restart. No Python dependencies to install - this pack declares none on purpose, since everything it imports already comes with ComfyUI - and no model files. Search obvpm in the node menu to find every node in the pack; they all carry that suffix in their display name.

Categoryobvpm/gates

Inputs (2)

NameTypeDefaultDescription
on_emptyCOMBOmuteWhat downstream sees when no input is connected: mute skips every downstream node, bypass outputs None.
inputoptAUDIOThe value to pass through. May be left unconnected.

Outputs (2)

NameTypeDescription
audioAUDIOThe input passed through. When the input is empty: blocked (mute) or None (bypass).
presentBOOLEANTrue when an input is connected. Stays live even in mute mode.