ANDRO Audio Switch
The audio branch toggle that doesn't make you mute, delete and re-wire everything
- generated_audio
- external_audio
- latent
- mode
LTX is the model that made this node necessary. LTXVConcatAVLatent demands an audio latent - it's a mandatory input - so any LTX workflow that wants audio has to produce one. The problem is choosing where it comes from. Want the model to write its own audio sometimes, and use a file of yours other times? With a plain boolean switch you'd still have both branches wired, ComfyUI validates every node in a prompt before anything runs, and before you know it you're muting whole chains, deleting nodes and re-wiring just to flip between "generated" and "external" audio.
Audio Latent Switch is that toggle, done properly. One boolean, two optional, lazy latent inputs, and the whole mechanic is a single switch.
Inputs
audio_source- the only required input, a BOOLEAN labelledexternal | generated. That's it. The tooltip says it plainly: switching is enough, there is no need to mute anything. If only one branch is connected, that one is used whatever the toggle says.generated_audio- the latent the model makes on its own, typically an empty audio latent for LTX. Optional.external_audio- your own audio, encoded to a latent (e.g.LoadAudioOptional→LTXVAudioEncode). Optional - mute or delete its chain and this input simply disappears.
Both inputs are optional and lazy. Optional matters because an earlier version of the pack required generated, which made disabling that side fail with ComfyUI's "missing a required input" - an error that reads like a broken node rather than a muted branch. Lazy matters because the branch you don't pick is never executed: with audio_source on generated, the wav isn't even decoded. It's the "don't compute what you won't use" guarantee that makes the switch actually safe in a real graph.
Outputs
latent- the winning branch's LATENT, wired intoLTXVConcatAVLatentor wherever the audio latent is consumed.mode- a STRING saying which branch won and why, e.g.generated,external, orexternal (generated not connected). Handy for a report readout when you're auditing a run.
The edge cases, which are the point
- Both connected: the toggle decides, and only that branch is computed.
- One branch muted, bypassed or deleted: the survivor is used, whatever the toggle says.
- Neither connected: you get a plain sentence naming both inputs, not a cryptic "missing a required input".
That last one is more than politeness - it's the difference between "I understand the graph and left both sides off" and "the node looks broken". The author deliberately made both sides optional so that disabling either one is legal and readable.
Where it fits
This was written for LTX's audio branch, where LTXVConcatAVLatent demands an audio latent, and it pairs with LoadAudioOptional from the same pack: that node makes a missing wav a silence instead of a validation error, and this one makes choosing between model audio and your audio a one-click decision instead of a graph surgery session. But it works anywhere an input is mandatory and you want it skippable - the pattern generalises past audio to any "generated vs external" latent choice.
Install
ComfyUI Manager (search "comfyui-vae-float32"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/AndreiOrehov/comfyui-vae-float32
Restart. Zero dependencies beyond stock ComfyUI. In the pack's LTX-2.5 example workflow, this is the promoted knob on the subgraph's face - audio_source in generated or external, one toggle, nothing muted either way. That's the whole sales pitch, and it holds.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_source | BOOLEAN | true | Which branch wins when both are connected. Switching is enough — there is no need to mute anything. If only one branch is connected, that one is used whatever this says. |
| generated_audioopt | LATENT | The latent the model composes on its own - for LTX that is an empty audio latent. Lazy: while the switch points at the other branch, this one is never computed at all, so it costs nothing to leave wired up. | |
| external_audioopt | LATENT | Your own audio, encoded to a latent. Mute or delete its chain and this input simply disappears. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Whichever branch won. |
| mode | STRING | Which branch that was, and whether it was the one the switch asked for - so a fallback is visible in the log instead of silent. |