Switch Any Fallback π²
A switch that doesn't explode when you bypass one of its inputs
- on_true_fb
- on_false
- *
Most switch nodes in ComfyUI have a nasty habit: mute or bypass the node feeding one of their inputs, and the switch errors out or silently passes nothing. This one was written specifically because the author couldn't find a switch that tolerated a None second input. That's its whole reason to exist, and it's a genuinely useful niche.
How it works
Ryuu_FallbackSwitchAny has two data inputs - on_true_fb and on_false - plus a boolean toggle:
boolean= True β outputon_true_fb.boolean= False β tryon_false. Ifon_falseis actually connected and has data, use it.on_falseis None (muted, bypassed, or just not connected) β fall back toon_true_fband print a console message.
Both inputs are typed * (AnyType), so this one node switches models, latents, conditioning, images, strings - whatever you throw at it. That's the "Any" in the name, and it's why you'd reach for this over the typed image/latent variants unless you specifically want the type-safe sockets.
The key thing most switches get wrong: when the second branch is bypassed, ComfyUI hands the switch a None and the switch panics. Here, None is the expected state and the fallback is the design. Mute a whole branch mid-experiment and the workflow keeps running, which is exactly what you want when you're A/B testing two paths without tearing out wires.
When to reach for it
The classic setup is choosing between two candidate images or two model branches. Say you've got a "good" path and an "experiment" path: wire the experiment into on_false, keep the reliable output in on_true_fb, and flip the boolean to compare. Bypass the experiment node entirely and you just get the reliable one - no error, no dead workflow.
It's also useful as a safe primitive inside shared workflows where someone else might bypass things. That's the real pitch: it's a switch that degrades gracefully instead of failing loudly.
The inputs
Only three to think about:
boolean- which input gets priority (default False).on_true_fb- output when True; also the fallback.on_false- output when False if it's actually provided. Optional, which is the whole point.
Output is a single * socket carrying whatever you routed through. The console message on fallback is normal, not an error - if it's cluttering your log, the pack's settings page lets you lower the log level.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/DraconicDragon/ComfyUI-RyuuNoodles
Restart, or grab it via ComfyUI Manager (search "RyuuNoodles"). No models, no heavy deps - the pack's only real requirement is color-matcher, which this node doesn't touch.
Gotchas
Note that the node reports itself as an output node in ComfyUI - harmless, it can still be wired onward. And while AnyType sockets are convenient, the community's anti-anything-anywhere sentiment exists for a reason: it makes graphs harder to debug. If your workflow is shared, consider the typed Switch Image Fallback or Switch Latent Fallback variants when you know the type ahead of time.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | false | True will output on_true_fb, False will try to output on_false. If on_false is not provided (e.g. the connected node is muted or bypassed), it will fall back to on_true_fb. A message will be printed to console if this happens. |
| on_true_fb | * | The input to output if boolean is True. Will be used as fallback if on_false is not provided. | |
| on_falseopt | * | The input to output if boolean is False. If not provided (e.g. the connected node is muted or bypassed), on_true_fb will be used as fallback and a message will be printed to console if this happens. This input is optional. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | β |