ComfyUI Node

XAnyGate10

XAnyGate10 is the mute button your workflow needs

By Xz3r0-M·Created 8 months ago·Updated about 6 hours ago· 13
XAnyGate10
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • input_10
  • output_1
  • output_2
  • output_3
  • output_4
  • output_5
  • output_6
  • output_7
  • output_8
  • output_9
  • output_10
  • recursive_output
enable_1true
enable_2true
enable_3true
enable_4true
enable_5true
enable_6true
enable_7true
enable_8true
enable_9true
enable_10true
enable_recursivetrue
recursive_order1-2-3-4-5-6-7-8-9-10

ComfyUI gives you plenty of ways to feed a graph options: reroutes, switches, boolean inputs. What it doesn't give you is a clean way to keep ten candidate images, models, or prompts wired in and flip between them without re-plugging cables. XAnyGate10 is that switchboard. It's a 10-channel gate where each channel has its own enable toggle, and anything that doesn't have its switch on simply doesn't come through. If you've ever rebuilt the same workflow three times to test three models, this is the node that stops you doing that.

How it works

Every channel is built on a MatchType template, which is the pack's way of saying "this input accepts whatever type you connect, and the matching output is that same type." Channel 1's input and output are locked to each other, channel 2's to each other, and so on. So you can have an IMAGE on channel 3 and a MODEL on channel 7 in the same node - each port pair independently conforms to its own data type. That's the part that makes this more than a ten-way switch: it's ten independent type-preserving gates in one box.

When a channel is disabled (or its input is empty), its output is None rather than the data. The tooltip says it plainly: "Channel output (None when disabled or empty)." Wire that into nodes that panic on None and you'll get a clear error - which is fine, because the intended pattern is to only feed what's switched on.

Then there's the party trick: recursive_output. Turn on enable_recursive and this output scans the channels in the order you give it and returns the first non-None value. The order is a simple dash-separated list in recursive_order, defaulting to 1-2-3-4-5-6-7-8-9-10. Want "use image 5 if it's there, otherwise 3, otherwise 1"? Type 5-3-1. That single wire becomes a priority fallback chain you'd otherwise build with several nodes.

The inputs that matter

You mostly live in the widgets, not the ports:

  • enable_1 … enable_10 - one boolean per channel. All default to on; flip the ones you don't want.
  • enable_recursive - turns the recursive_output wire on.
  • recursive_order - the channel priority list, - separated (e.g. 1-3-5-7-9).
  • input_1 … input_10 - the any-type inputs. All optional.

Outputs are output_1 through output_10 plus recursive_output, all MatchType.

Installing it

This is part of the ComfyUI-Xz3r0-Nodes pack, so install the pack once and every node in it shows up. Easiest is ComfyUI Manager: search ComfyUI-Xz3r0-Nodes and hit install. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/Xz3r0-M/ComfyUI-Xz3r0-Nodes.git
cd ComfyUI-Xz3r0-Nodes
pip install -r requirements.txt

Then restart ComfyUI. The only real dependency is ffmpeg-python plus system FFmpeg on your PATH - that matters for the audio/video save nodes, not for this one, so if you're only here for the gate you can skip the FFmpeg install for now (you'll want it eventually).

Gotchas

The one that trips people up: None on a disabled channel is not "the previous value." If you disable a channel that's feeding a KSampler, the sampler gets nothing, and that's by design - you're supposed to wire disabled channels out of the path, or read them through recursive_output. Also keep the pack's general filename rule in mind when you get to its save nodes: the author hard-screens path inputs, so no .., no separators, text only. And don't expect this pack on the big subreddits - it's a small, registry-first project with a bilingual (Chinese/English) UI, and XAnyGate10 is one of its more quietly useful pieces.

Category♾️ Xz3r0/Workflow-Processing

Inputs (22)

NameTypeDefaultDescription
enable_1BOOLEANtrueEnable channel 1 output
enable_2BOOLEANtrueEnable channel 2 output
enable_3BOOLEANtrueEnable channel 3 output
enable_4BOOLEANtrueEnable channel 4 output
enable_5BOOLEANtrueEnable channel 5 output
enable_6BOOLEANtrueEnable channel 6 output
enable_7BOOLEANtrueEnable channel 7 output
enable_8BOOLEANtrueEnable channel 8 output
enable_9BOOLEANtrueEnable channel 9 output
enable_10BOOLEANtrueEnable channel 10 output
enable_recursiveBOOLEANtrueEnable recursive output lookup using recursive_order
recursive_orderSTRING1-2-3-4-5-6-7-8-9-10Recursive channel order list using '-' separator (example: 1-3-5-7-9 or 5-9-3-7-1)
input_1optCOMFY_MATCHTYPE_V3Channel 1 input (optional, accepts any data)
input_2optCOMFY_MATCHTYPE_V3Channel 2 input (optional, accepts any data)
input_3optCOMFY_MATCHTYPE_V3Channel 3 input (optional, accepts any data)
input_4optCOMFY_MATCHTYPE_V3Channel 4 input (optional, accepts any data)
input_5optCOMFY_MATCHTYPE_V3Channel 5 input (optional, accepts any data)
input_6optCOMFY_MATCHTYPE_V3Channel 6 input (optional, accepts any data)
input_7optCOMFY_MATCHTYPE_V3Channel 7 input (optional, accepts any data)
input_8optCOMFY_MATCHTYPE_V3Channel 8 input (optional, accepts any data)
input_9optCOMFY_MATCHTYPE_V3Channel 9 input (optional, accepts any data)
input_10optCOMFY_MATCHTYPE_V3Channel 10 input (optional, accepts any data)

Outputs (11)

NameTypeDescription
output_1COMFY_MATCHTYPE_V3Channel 1 output (None when disabled or empty)
output_2COMFY_MATCHTYPE_V3Channel 2 output (None when disabled or empty)
output_3COMFY_MATCHTYPE_V3Channel 3 output (None when disabled or empty)
output_4COMFY_MATCHTYPE_V3Channel 4 output (None when disabled or empty)
output_5COMFY_MATCHTYPE_V3Channel 5 output (None when disabled or empty)
output_6COMFY_MATCHTYPE_V3Channel 6 output (None when disabled or empty)
output_7COMFY_MATCHTYPE_V3Channel 7 output (None when disabled or empty)
output_8COMFY_MATCHTYPE_V3Channel 8 output (None when disabled or empty)
output_9COMFY_MATCHTYPE_V3Channel 9 output (None when disabled or empty)
output_10COMFY_MATCHTYPE_V3Channel 10 output (None when disabled or empty)
recursive_outputCOMFY_MATCHTYPE_V3First non-None output found by recursive order when recursive mode is enabled