Simple Audio Latent Switch (6 Inputs)
The guard rail before LTXV Audio VAE Decode
- input01
- input02
- input03
- input04
- input05
- input06
- output
LTX-2's killer feature is synchronized audio and video, and in ComfyUI that means audio latents are a separate species from video latents - even though both ride the same LATENT socket. The audio path wants a 4D audio latent (or a nested AV latent the decoder unwraps), the video path wants a plain 5D latent, and if you hand the wrong one to LTXV Audio VAE Decode you get a decode-time error after your whole run. SimpleAudioLatentSwitch exists to make that failure impossible to sneak past.
It's the most opinionated node in the pack. Six optional LATENT inputs, one LATENT output, and it walks them in order, forwarding only the first candidate it considers audio-decodable: a latent whose samples are 4D and tagged type='audio' (or carrying a sample_rate), or a nested AV latent, which the audio decoder can unwrap and pull the audio branch out of. Anything else is rejected with a running list of why.
That rejection list is where it earns its keep. If no input qualifies, it raises No compatible audio latent found and spells out each rejected candidate - type, nested flag, ndim, shape - instead of dumping you at a cryptic VAE error at the end of a long generation. In a workflow with several audio branches, or an audio-only branch sitting next to a video+audio branch, you just wire them in priority order and let whichever real audio latent exists win.
How it works
From the source, each candidate must be a latent dict with samples. Nested tensor? Pass. Otherwise it must be 4D and either marked type='audio' or carry a sample_rate - a plain 4D latent with no audio marker is still rejected. That's a deliberately strict check, because "is a latent" is not the same as "is audio the decoder can handle." The strictness is the whole point: it fails fast, before the VAE, with a message that names the problem.
The inputs and outputs that matter:
input01–input06- optional LATENT. Wire your audio-capable branches in priority order.output- the first audio-decodable latent, straight intoLTXV Audio VAE Decode.
Installing it
Identical to the rest of the pack: no dependencies, no model downloads, just clone and restart. ComfyUI Manager search "ComfyUI-SimpleSwitch", or:
cd ComfyUI/custom_nodes
git clone https://github.com/boobkake22/ComfyUI-SimpleSwitch.git
When it refuses
If it throws "No compatible audio latent found," your branches probably produced video-only or unmarked latents. To build a proper AV latent to feed it, look at LTXVConcatAVLatent and SeparateAVLatent from Lightricks' official ComfyUI-LTXVideo pack - those are the tools for merging and splitting the audio and video streams. Slap this node right before LTXV Audio VAE Decode and the fail-fast check replaces the usual late-stage decode headache.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input01opt | LATENT | — | |
| input02opt | LATENT | — | |
| input03opt | LATENT | — | |
| input04opt | LATENT | — | |
| input05opt | LATENT | — | |
| input06opt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | LATENT | — |