Nodes/ComfyUI-RyuuNoodles/Switch Image Fallback 🐲
ComfyUI Node

Switch Image Fallback 🐲

The fallback switch, now with image-colored sockets

By DraconicDragonΒ·Created about a year agoΒ·Updated 2 months agoΒ· 12
Switch Image Fallback 🐲
  • on_true_fb
  • on_false
  • IMAGE
β—„booleanfalseβ–Ί

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 β†’ output on_true_fb.
  • boolean = False β†’ try on_false; if it's None (not connected, muted, bypassed), fall back to on_true_fb and 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.

CategoryRyuuNoodles 🐲/Switches

Inputs (3)

NameTypeDefaultDescription
booleanBOOLEANfalseTrue 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_fbIMAGEThe input to output if boolean is True. Will be used as fallback if on_false is not provided.
on_falseoptIMAGEThe 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)

NameTypeDescription
IMAGEIMAGEβ€”