Switch Image Fallback π²
The fallback switch, now with image-colored sockets
- on_true_fb
- on_false
- IMAGE
If you've read the Switch Any Fallback writeup, you already know the superpower: it doesn't panic when one of its inputs is bypassed or muted, it just falls back. This is that same node, but it only accepts images - and honestly, that's the whole difference. The author admits the typed variants exist mostly so your graph has the right-colored sockets. There are worse reasons for a node to exist.
What it does
Two image inputs plus a boolean:
boolean= True β outputon_true_fb.boolean= False β tryon_false; if it'sNone(not connected, muted, bypassed), fall back toon_true_fband print a console message.
The inputs are IMAGE-typed, so you can't accidentally wire a latent or a model into it - the type check does the thinking for you. That's the real advantage over the Any variant in a shared workflow: the socket shape keeps mistakes from hiding until runtime.
When to use it
A/B testing two image branches is the textbook case. Wire your reliable image into on_true_fb, the experimental one into on_false, flip the boolean to compare, and bypass the experimental branch entirely when you want to ship. The image-specific version is also the one you'd wire into image-level downstream nodes (preview, save, a mask source) where you know the type and don't want any-type ambiguity.
Inputs and output
boolean- which input has priority (default False).on_true_fb- the image output when True; also the fallback image.on_false- the image output when False, if it's provided. Optional by design.- Output: a single
IMAGE.
The console note on fallback is normal behavior, not a warning. It's there so you notice when the fallback fired. If it clutters your logs, the RyuuNoodles settings page has a log-level control.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/DraconicDragon/ComfyUI-RyuuNoodles
Restart ComfyUI, or install via Manager (search "RyuuNoodles"). No models, no extra dependencies.
Gotchas
The fallback path means on_true_fb is never truly optional - it's your safety net, so it should always be connected to something real. And remember: when the boolean is True, on_false is ignored entirely even if it's connected; the node never validates the unused branch, so a broken branch that would error if executed can sit there quietly. If you need the same behavior without the boolean (just "use this if provided, else that"), the Passthrough node is your one-stop version.
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 | IMAGE | The input to output if boolean is True. Will be used as fallback if on_false is not provided. | |
| on_falseopt | IMAGE | 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 |
|---|---|---|
| IMAGE | IMAGE | β |