π CR Latent Input Switch
Pick between two latent branches with one number
- latent1
- latent2
- LATENT
- show_help
A two-way router for latents: plug in two LATENT sources, flip one integer between 1 and 2, and whichever one you picked passes straight through. It's the kind of node you reach for when you want to A/B two branches of a workflow - two different upscale paths, two samplers, two experiment variants - without unplugging and replugging wires every time you want to compare them.
How it works
latent1 and latent2 are both optional inputs - leave either unconnected if you're not using that branch yet. The Input value (1 or 2) decides which one gets forwarded to the output. Nothing else happens to the data; it's a pure passthrough switch, not a blend or a merge. Whichever latent you didn't select simply isn't used for that run.
This is genuinely simple, and that's the point - it sits at a junction in your graph where you want one toggle to decide which upstream path feeds downstream, instead of physically rewiring.
Inputs and outputs that matter
Input- integer, 1 or 2. The switch itself.latent1,latent2- the two optional latent sources to choose between.- Output is a single LATENT (whichever one you selected) plus
show_help.
How to install it
ComfyUI Manager: search "Comfyroll Studio", install, restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. No model downloads needed - this is graph logic, not a model-consuming node.
Common issues
The obvious trap: leave Input on 1, forget you meant to test branch 2, and wonder why your change upstream isn't showing up in the output. Nothing's broken - you're just still routed to the other branch. Get in the habit of checking the switch value first when a change "doesn't do anything."
If you only wired one of the two latent inputs and left Input pointed at the empty one, you'll get an error rather than a silent pass - both slots are optional at the node level, but you still need something connected to whichever one is actually selected.
And the standing Comfyroll caveat: this is one node out of roughly 200 the pack registers from a shared set of files at startup. If it's missing from the node search entirely, check your ComfyUI console log for an import failure - a single broken dependency elsewhere in the pack can silently take unrelated nodes down with it, and reinstalling with a clean git clone fixes it faster than chasing the actual pip error.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Input | INT | 11β2 | β |
| latent1opt | LATENT | β | |
| latent2opt | LATENT | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |
| show_help | STRING | β |