Nodes/ComfyUI_StarNodes/⭐ Star Multi Inputs To One
ComfyUI Node

⭐ Star Multi Inputs To One

The tiny 'first thing that's connected wins' switch

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Multi Inputs To One
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • output

Some nodes don't need a paragraph - they need three sentences. Star Multi Inputs To One gives you five any-type inputs (input_1 through input_5) and one any-type output, and it outputs the first one that's actually connected. That's it. The whole mechanism is a loop that walks the inputs in order and returns the first non-None value.

Which is more useful than it sounds. The classic use is a fallback chain: you're building a workflow where a node's output might not exist yet - an optional refiner, a conditional branch, a settings override - and instead of building a giant switch node or tolerating broken wires, you wire your five candidates into this and let it pick whichever is live. It's also handy as a "passthrough only when something's there" guard, because a connected-but-empty input still counts as present, and only truly unconnected sockets get skipped.

The tradeoff, and it's a real one: because the input type is *, ComfyUI can't type-check what flows through. The output is * too. You're responsible for making sure everything you feed it is the same kind of thing - mixing a MODEL into an input chain whose output feeds a text socket is on you, not the node.

How it works

Walk inputs in order (input_1input_5), return the first non-None. No fancy routing, no conditionals, no weights. It's a priority switch you build by which sockets you wire.

Inputs and outputs

  • input_1 … input_5 - all optional, all *. Wire from first-choice to last-choice priority.
  • output - the first connected input, or None if nothing is connected.

Install

Part of the Starnodes2024/ComfyUI_StarNodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes
pip install -r requirements.txt

Restart, search star. Zero dependencies, zero model files.

Where people get burned

Honestly, there's only one real trap: forgetting that "first connected wins" means the order you wire into, not the order you think should win. If input_1 has a stale wire from an old run, it beats the input_2 value you meant to use. Clean your sockets. And remember the output is untyped, so if a downstream node starts erroring with type mismatches, that's this node's one weakness biting you - keep the inputs homogeneous.

Category⭐StarNodes/Helpers And Tools

Inputs (5)

NameTypeDefaultDescription
input_1opt*
input_2opt*
input_3opt*
input_4opt*
input_5opt*

Outputs (1)

NameTypeDescription
output*