ComfyUI Node

RecourseAny

The 'send anything' failsafe that doesn't swallow your graph

By exdysa·Created 2 years ago·Updated about a year ago· 6
RecourseAny
  • input_signal
  • fallback_signal
  • OUTPUT
  • BOOL

RecourseAny is the pack's "plug anything in here" node, and the name undersells the trick: it takes two inputs of any type - MODEL, IMAGE, LATENT, CONDITIONING, whatever - and passes through whichever one has a live signal, in port order. Output one is the winner; output two is a BOOLEAN saying which branch you ended up on. That's the whole thing, and it's genuinely useful.

The type flexibility works because of a trick that goes back to ltdrdata (the ComfyUI Manager and Impact Pack author, who gets a shoutout in this pack's source): an "any type" that matches every port. ComfyUI normally refuses to connect a MODEL to a FLOAT input. With RecourseAny, both its inputs accept anything, so you can build a failsafe without knowing in advance what kind of signal will survive.

Why the community is wary of this pattern - and why this version is OK

There's a standing debate in the ComfyUI ecosystem about "anything anywhere" style nodes. The honest criticism, which the community has made repeatedly, is that they make workflows impossible to read: a wire that accepts anything tells you nothing about what's flowing through it. That argument mostly targets the big anything-hub nodes that route every output to every input. RecourseAny is disciplined by comparison - just two ports, both deliberately named (input_signal, fallback_signal), with a BOOL output so you know which one fired. Use it as a fallback, not as a wiring philosophy, and it's the opposite of spaghetti.

How it works

It's a two-line decision, and there's real value in that simplicity. If input_signal is connected, you get it out plus BOOL = true. If it's not, you get fallback_signal plus BOOL = false. "Connected" means actually carrying a value - so if the thing upstream of input_signal failed or was bypassed, the node quietly falls back to the secondary path instead of breaking the graph.

The README frames the whole pack as "safety first": in an accident, automatically use the active input, connect many of the same type. That's this node. A typical use: feed it the output of a Lora loader you sometimes bypass, or an image you sometimes forget to load, and let the workflow keep running rather than dying on a missing wire.

Inputs & outputs that matter

  • input_signal (*) - the preferred signal, whatever type it is.
  • fallback_signal (*) - the rescue signal, used only when input_signal is dead.
  • OUTPUT (*) - the winner.
  • BOOL (BOOLEAN) - true if the primary fired, false if you're running on the fallback. Wire this into a Save Image filename, a text display, or a "did this run" check.

Installing it

Same routine as every node in this pack. ComfyUI Manager → search comfyui-selector → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/exdysa/comfyui-selector

Restart and it's under Selector_Recourse/Recourse. Zero dependencies, zero model downloads, no network access - the README is emphatic that these nodes never touch anything outside ComfyUI, and the code backs that up (there's no requirements.txt at all).

Gotchas

  • Because both ports accept anything, ComfyUI won't stop you from wiring a FLOAT into a port meant to feed an image node. That type-checking is your job now - the BOOL output exists partly so you can verify what actually went through.
  • The fallback only triggers when the primary is absent, not when it's wrong. If input_signal carries a valid-but-garbage value, RecourseAny will cheerfully pass the garbage through and report success. It's a connection failsafe, not a validation node.
CategorySelector_Recourse/Recourse

Inputs (2)

NameTypeDefaultDescription
input_signalopt*The lowest number port with an active signal is used.
fallback_signalopt*The lowest number port with an active signal is used.

Outputs (2)

NameTypeDescription
OUTPUT*
BOOLBOOLEAN