DD Latent Switcher
Stop rewiring the graph to A/B test latents
- 潜空间1
- 潜空间2
- 潜空间3
- 潜空间4
- 潜空间
DD Latent Switcher is one of those nodes that sounds too simple to be worth a page, and then you find yourself with two latent branches feeding the same sampler and you're dragging wires around like an idiot. It takes up to four latent inputs and passes exactly one of them through, chosen by an integer dropdown. That's the whole job, and it's a good job.
When it earns its keep
The classic case is A/B testing. Say you've got a base latent from a VAE encode and an alternative from a second pipeline - a reference-latent branch, an upscaled latent, a different seed's empty latent - and you want to flip between them to see which one the sampler behaves better with. Without a switcher you rewire the graph every run. With it, you set one 选择输出 (Select Output) number and hit queue.
It's also the natural meeting point when you're assembling one workflow from two saved fragments: both halves produce a latent, and you want a single switch to pick the source rather than permanently deleting one branch. And if you're experimenting with img2img denoise behavior, switching between an empty latent and an image-encoded latent in one queue is exactly the sort of comparison this enables.
How it works
The mechanism is barely a mechanism - it's a list and an index. Latents 1 and 2 are required inputs, Latents 3 and 4 are optional, and 选择输出 (Select Output) selects which one comes out the single 潜空间 (Latent) output. One honest detail from the source: if you select input 3 or 4 and nothing is actually connected there, it logs a warning and silently falls back to latent 1 rather than erroring. That's friendlier than crashing, but it's also easy to misread - you pick "3" and get input 1's content because you never wired it. If your results suddenly look wrong after a switch, check that the slot you selected is actually populated.
Installation
Same as every node in the pack - DD-Nodes ships as one install:
cd ComfyUI/custom_nodes
git clone https://github.com/Dontdrunk/ComfyUI-DD-Nodes
cd ComfyUI-DD-Nodes && pip install -r requirements.txt
Restart ComfyUI, or search "ComfyUI-DD-Nodes" in ComfyUI Manager and let it handle it. No extra models, no downloads beyond the pack's pip dependencies.
The honest take
This is a genuinely thin utility node - don't expect more from it than a wire picker. If you need conditional routing (switch based on a boolean or a value from elsewhere), this isn't that; it's a manual selector. And there are smarter selector nodes out there in the ecosystem, including ones that index a list, but if you're already running the DD pack, this one is already installed, zero-config, and does exactly what it says. For a manual 4-way latent switch it's hard to beat the price. Just remember the UI labels are Chinese by default, and mind that silent fallback to input 1.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| 潜空间1 | LATENT | — | |
| 潜空间2 | LATENT | — | |
| 选择输出 | INT | 11–4 | — |
| 潜空间3opt | LATENT | — | |
| 潜空间4opt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 潜空间 | LATENT | — |