β Big Latent Switch
Route latents between ten sources without dropping a sample
- input_0
- input_1
- input_2
- input_3
- input_4
- input_5
- input_6
- input_7
- input_8
- input_9
- selected
Of all the Big switches in this pack, the latent one is the one that earns its keep. Big Latent Switch [Dream] routes between up to ten LATENT inputs, outputting the one you select - and unlike string and number switches, latents are heavy tensors that you genuinely don't want to build twice if you can help it. It's the node for "feed this frame's latent to the sampler, or that branch's latent, depending on where I am."
How it works
The standard pack switch skeleton: input_0 through input_9 carry the latents, select (INT 0β9) chooses which one is output as selected, and on_missing (previous/next) handles the case where the chosen slot is empty by walking to the nearest connected input. Latent slots have no sentinel value - an empty slot is simply None - so the fallback just skips it.
The inputs that matter
- select - INT, 0β9.
- on_missing -
previousornext. - input_0 β¦ input_9 - the candidate latents.
Where it fits
The classic use is a two-branch animation pipeline: a "first frame" path that starts from an Empty Latent, and a "continue" path that takes the previous frame's latent - with the switch choosing per frame. It's also handy for A/B routing between samplers. The honest caveat is the one that applies to all the eager switches: because every input is evaluated, a heavy sampler upstream of the unselected branch still runs. For latents that matters more than for floats - if your branches are expensive, the switch won't save you the compute, only the rewiring.
Installing it
Ships with Dream Project Animation Nodes - ComfyUI Manager (search Dream Project Animation) or clone https://github.com/alt-key-project/comfyui-dream-project into custom_nodes, pip install -r requirements.txt, restart. No model downloads.
Common issues
Same family gotchas - 0-indexed slots, on_missing quietly papering over wrong indices. The one latent-specific thing to know: the output carries whatever latent tensors you fed it, so keep batch shapes consistent between inputs; switching between a latent of batch size 1 and one of batch size 4 mid-graph will surprise your sampler. Match your branches' shapes and this node is boring in the best way.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 00β9 | β |
| on_missing | COMBO | 2 options: previous, next | |
| input_0opt | LATENT | β | |
| input_1opt | LATENT | β | |
| input_2opt | LATENT | β | |
| input_3opt | LATENT | β | |
| input_4opt | LATENT | β | |
| input_5opt | LATENT | β | |
| input_6opt | LATENT | β | |
| input_7opt | LATENT | β | |
| input_8opt | LATENT | β | |
| input_9opt | LATENT | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| selected | LATENT | β |