Audio Exists
Know whether there's audio without crashing the graph
- audio
- audio
- exists
Some branches of a workflow produce audio and some don't - the first pass of a video might come back silent, a lip-sync branch might only fire on certain iterations. Wiring "maybe an AUDIO tensor" straight into a muxer is how you get None errors in the middle of a long render. Audio Exists is the pack's guard for exactly this: it takes an optional audio in, tells you whether it was there, and always hands a usable AUDIO out so nothing downstream sees a hole.
It's the audio member of the existence-check family in Mickmumpitz-Nodes (the others are Latent Exists and Mask Exists), all built on the same principle: keep conditional, multi-branch graphs type-safe.
How it works
Two lines of logic. If audio arrives, it passes through unchanged and exists comes back True. If it's None, the node synthesizes a placeholder - one second of silent stereo at 44.1 kHz (torch.zeros(1, 2, 44100) with sample_rate: 44100) - and returns it with exists set to False.
The placeholder is the point. Because the node always returns a real AUDIO, the consumer downstream never crashes on None - and if a non-lazy switch happens to evaluate the unused branch, a second of silence is cheap enough that it won't matter. The exists boolean is your signal: branch on it to pick the real-audio path or the fallback path.
Inputs and outputs
audio(AUDIO, optional) - connect whatever might or might not exist.- Outputs:
audio(AUDIO) - the real audio, or the silent placeholder.exists(BOOLEAN) -Truefor real audio,Falsefor the placeholder.
Where it fits
Iterative video with a soundtrack is the natural home: iteration 0 often has no audio to carry forward, later ones do. Rather than building two separate mux/concatenate setups, one graph with Audio Exists handles both - the boolean routes, the placeholder keeps the unused path valid. It sits alongside the pack's other iteration plumbing (Iteration Switch, Frame Accumulator) as the kind of boring-but-critical node that keeps a long render from dying on a missing edge case.
Installing
ComfyUI Manager → search "Mickmumpitz" → install → restart, or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes
Deps: numpy, Pillow, opencv-python - nothing audio-specific, no downloads. The node is pure plumbing; it doesn't generate or load sound itself.
Gotchas
The placeholder is deliberately silent, not quiet-and-hisssy - if your downstream concatenates audio assuming the placeholder is meaningful, you'll get a second of dead air in the output. That's correct behavior, but worth knowing: branch on exists before doing anything audible with the audio output. And an unconnected audio input reports "no audio" rather than erroring - that's the feature. If you were expecting an error to alert you, the boolean is the alert.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| audioopt | AUDIO | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| exists | BOOLEAN | — |