XAnyGate10
XAnyGate10 is the mute button your workflow needs
- 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
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_outputwire 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.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| enable_1 | BOOLEAN | true | Enable channel 1 output |
| enable_2 | BOOLEAN | true | Enable channel 2 output |
| enable_3 | BOOLEAN | true | Enable channel 3 output |
| enable_4 | BOOLEAN | true | Enable channel 4 output |
| enable_5 | BOOLEAN | true | Enable channel 5 output |
| enable_6 | BOOLEAN | true | Enable channel 6 output |
| enable_7 | BOOLEAN | true | Enable channel 7 output |
| enable_8 | BOOLEAN | true | Enable channel 8 output |
| enable_9 | BOOLEAN | true | Enable channel 9 output |
| enable_10 | BOOLEAN | true | Enable channel 10 output |
| enable_recursive | BOOLEAN | true | Enable recursive output lookup using recursive_order |
| recursive_order | STRING | 1-2-3-4-5-6-7-8-9-10 | Recursive channel order list using '-' separator (example: 1-3-5-7-9 or 5-9-3-7-1) |
| input_1opt | COMFY_MATCHTYPE_V3 | Channel 1 input (optional, accepts any data) | |
| input_2opt | COMFY_MATCHTYPE_V3 | Channel 2 input (optional, accepts any data) | |
| input_3opt | COMFY_MATCHTYPE_V3 | Channel 3 input (optional, accepts any data) | |
| input_4opt | COMFY_MATCHTYPE_V3 | Channel 4 input (optional, accepts any data) | |
| input_5opt | COMFY_MATCHTYPE_V3 | Channel 5 input (optional, accepts any data) | |
| input_6opt | COMFY_MATCHTYPE_V3 | Channel 6 input (optional, accepts any data) | |
| input_7opt | COMFY_MATCHTYPE_V3 | Channel 7 input (optional, accepts any data) | |
| input_8opt | COMFY_MATCHTYPE_V3 | Channel 8 input (optional, accepts any data) | |
| input_9opt | COMFY_MATCHTYPE_V3 | Channel 9 input (optional, accepts any data) | |
| input_10opt | COMFY_MATCHTYPE_V3 | Channel 10 input (optional, accepts any data) |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| output_1 | COMFY_MATCHTYPE_V3 | Channel 1 output (None when disabled or empty) |
| output_2 | COMFY_MATCHTYPE_V3 | Channel 2 output (None when disabled or empty) |
| output_3 | COMFY_MATCHTYPE_V3 | Channel 3 output (None when disabled or empty) |
| output_4 | COMFY_MATCHTYPE_V3 | Channel 4 output (None when disabled or empty) |
| output_5 | COMFY_MATCHTYPE_V3 | Channel 5 output (None when disabled or empty) |
| output_6 | COMFY_MATCHTYPE_V3 | Channel 6 output (None when disabled or empty) |
| output_7 | COMFY_MATCHTYPE_V3 | Channel 7 output (None when disabled or empty) |
| output_8 | COMFY_MATCHTYPE_V3 | Channel 8 output (None when disabled or empty) |
| output_9 | COMFY_MATCHTYPE_V3 | Channel 9 output (None when disabled or empty) |
| output_10 | COMFY_MATCHTYPE_V3 | Channel 10 output (None when disabled or empty) |
| recursive_output | COMFY_MATCHTYPE_V3 | First non-None output found by recursive order when recursive mode is enabled |