πΈ Smart Latent Switch
The switch with no switch β wiring is the selector
- latent_primary
- latent_override
- latent
Frog Smart Latent Switch is a fallback switch with the selector removed. It takes two LATENT inputs - a required latent_primary and an optional latent_override - and outputs whichever is active: the override if it's connected, the primary otherwise. There's no dropdown, no boolean, no widget. The wiring is the switch. Connect the override and it wins; unplug it and you're back to the primary. That's the entire node, and it's the cleanest example in the pack of the "first non-null" pattern from ComfyUI's plumbing layer.
Why would you want a switch with no way to flip it? Because sometimes you want the graph itself to decide. The intended use, per the README, is pairing it with πΈ LLM Latent Selector: wire the LLM's chosen latent into latent_override, and your manual πΈ Empty Latent into latent_primary. When the LLM node is connected and working, its resolution wins; disconnect it (or let its fallback fire) and you silently drop back to your hand-picked manual resolution. No rewiring, no remembering to flip a toggle - the availability of the wire is the state.
That design has a real advantage over a selector widget in automation: it can't get out of sync. A classic switch has a dropdown that says "B" while you're mentally expecting A, and the mismatch is invisible until the wrong latent reaches the sampler. Here, the state is visible in the graph itself - you can see at a glance which input is connected. There's no hidden state to drift.
The inputs
- latent_primary - the default latent, used when no override is connected. This is your manual, always-there fallback.
- latent_override - optional; when connected, this latent is used instead of the primary. The tooltip names its expected source: "Wire your LLM Latent Selector here."
What comes out
A single latent output - the active latent, override if connected, primary otherwise. Wire it straight into your sampler.
Installing it
Pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/RabbitThatIsPink/FrogNodePack
or ComfyUI Manager β "Frog Node Pack". No extra dependencies.
Where people trip
The trap is the same one that bites every fallback switch: an override that is connected but not working is still an override. If the LLM Latent Selector is wired in but Ollama is down, the selector returns its own fallback resolution (per its configurable fallback preset) - it doesn't disconnect itself. So the Smart Switch will happily use the LLM's fallback rather than your manual primary. That's usually fine - the LLM's fallback defaults to 1536Γ1536 anyway - but if you expected a specific manual resolution to take over during an outage, you'll be surprised. And don't confuse this with an A/B switch: there's no "force B" mode. If you need a selector you can flip by hand, this isn't it - this is the node for "let the graph decide."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_primary | LATENT | Default latent β used when no override is connected. | |
| latent_overrideopt | LATENT | When connected, this latent is used instead of the primary. Wire your LLM Latent Selector here. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | The active latent β override if connected, primary otherwise. |