🔶 Auto None Switch
Fall back to a default when an optional input is empty
- recovery_input
- switch_input
- SOURCE_X
This is the "use this, unless it's empty" node. You give it a required fallback and an optional main source; if the optional one is actually connected and carrying something, it passes that through, and if it's left unplugged it falls back to the required one instead. It's a tiny node, but it solves a real annoyance: building a reusable sub-graph where a slot is sometimes fed by something upstream and needs a sane default the rest of the time, without wiring in a full switch and manually flipping it.
Think of it as the wildcard-type equivalent of a default parameter in code. You wouldn't reach for this in a one-off workflow - you'd just plug the thing in - but in a template you share, or a graph you reuse across projects with different optional stages, it saves you from breaking the whole run every time a stage isn't wired up.
Inputs and outputs
recovery_input- required, wildcard*type. This is what comes out ifswitch_inputisn't providing anything.switch_input- optional, same wildcard type. When it's connected and has something coming through, it wins.SOURCE_X- the single output:switch_inputif it's live,recovery_inputotherwise.
Both slots are wildcard-typed, so ComfyUI itself won't force them to match - that's on you to keep consistent, since downstream nodes will only be happy with one specific type.
Installing it
Via ComfyUI Manager: Install via Git URL → https://github.com/chaosaiart/Chaosaiart-Nodes, which is the exact method the README walks through. Searching the Manager for "Chaosaiart" by title should also work.
Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/chaosaiart/Chaosaiart-Nodes
On Linux (activate your venv first, if you're using one):
pip install opencv-python
pip install tqdm
On Windows, the folder ships an Install_windows script that does the same. Restart ComfyUI after installing. No models needed - this pack is pure logic/routing, it doesn't touch checkpoints, LoRAs, or ControlNet files directly.
Common issues
"Optional" in the graph, not "None" in Python. An input counts as unconnected if there's literally no wire into switch_input - if you've got something upstream that could output an empty string, a zero, or a blank image, that's still a connected, non-None value as far as this node's concerned, and it'll pass that through rather than falling back. This node reacts to whether a wire exists, not to whether the value is meaningfully empty.
Type mismatches surface downstream, not here. Since both inputs are wildcard, feeding it two unrelated types (say, an image on one and a string on the other) won't error at this node - you'll see the failure wherever the output actually gets used.
Whole-pack import failures. All Chaosaiart nodes share one Python module, so if opencv-python or tqdm didn't install correctly, the entire pack - not just this node - disappears from ComfyUI's node list. Check the startup console for an import error before assuming something else is wrong.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| recovery_input | * | — | |
| switch_inputopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SOURCE_X | * | — |