Nodes/comfyui-vae-float32/ANDRO Audio Switch
ComfyUI Node

ANDRO Audio Switch

Switch generated audio for external with one toggle — nothing to mute

By AndreiOrehov·Created 28 days ago·Updated about 18 hours ago· 4
ANDRO Audio Switch
  • generated_audio
  • external_audio
  • latent
  • mode
audio_sourcetrue

ANDRO Audio Switch is a two-input, one-toggle latent switch written for a very specific ComfyUI pain: LTX's audio branch demands an audio latent, and going back and forth between "let the model write the audio" and "use my own file" used to mean muting or deleting half a chain every time you changed your mind. This node replaces the ritual with a single boolean. generated_audio in one side, external_audio in the other, one audio_source toggle reading generated | external, and whichever branch wins comes out the latent socket.

Why it's built the way it is

The two inputs are both optional and lazy, and that pairing is the whole point. Optional, so disabling either side is legal - disabling the generated side used to fail with ComfyUI's "missing a required input," which reads like a broken node rather than a muted branch. Lazy, so the branch you didn't pick is never computed: with audio_source on generated, the wav isn't even decoded. That lazy part matters more than it sounds - a naive switch still validates both branches, and stock ComfyUI validates every node in a prompt before running, so a missing external file would fail the run even with the switch pointing at generated. This node's lazy inputs sidestep that entirely.

The mode logic is forgiving in a way you'll appreciate the first time it saves you:

| state | result | |---|---| | both connected | audio_source decides, and only that branch is computed | | one branch muted, bypassed or deleted | the survivor is used, whatever the toggle says | | neither connected | a plain sentence naming both inputs, not missing a required input |

The mode string output says which branch won and whether it was the one the switch asked for - so a fallback is visible in the log instead of silent. If you muted your external chain and forgot, the mode output tells you exactly that.

Where it fits

The author wrote it for LTX's audio branch, where LTXVConcatAVLatent demands an audio latent and the natural pairing is: ANDRO Load Audio feeding external_audio, and whatever the model composes on its own (an empty audio latent for LTX) feeding generated_audio. But the tooltip is honest that it generalises: it works anywhere an input is mandatory and you want it to be skippable. Both inputs are LATENT, so this is specifically for latent-level switching - audio that's already been encoded. If you're switching at the raw-audio level before encoding, that's a different node's job.

Install

ANDRO Audio Switch is part of the comfyui-vae-float32 pack. ComfyUI-Manager → search comfyui-vae-float32 → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/AndreiOrehov/comfyui-vae-float32

Restart, find it under the ANDRO category. It's a plumbing node, so it won't win any demos on its own - but the first time you flip a workflow between model-generated audio and a real voiceover without touching a single mute button, you'll understand why it exists.

CategoryANDRO

Inputs (3)

NameTypeDefaultDescription
audio_sourceBOOLEANtrueWhich 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_audiooptLATENTThe 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_audiooptLATENTYour own audio, encoded to a latent. Mute or delete its chain and this input simply disappears.

Outputs (2)

NameTypeDescription
latentLATENTWhichever branch won.
modeSTRINGWhich branch that was, and whether it was the one the switch asked for - so a fallback is visible in the log instead of silent.