Sonder Gate
Skip the branch, don't just mute the wire
- when_A
- value_A
- when_B
- value_B
- when_C
- value_C
- when_D
- value_D
- when_E
- value_E
- when_F
- value_F
- when_G
- value_G
- when_H
- value_H
- when_I
- value_I
- when_J
- value_J
- when_K
- value_K
- when_L
- value_L
- when_M
- value_M
- when_N
- value_N
- when_O
- value_O
- when_P
- value_P
- A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
Most "off switch" nodes in ComfyUI are cosmetic: the graph still does the work, it just throws the result away. Sonder Gate actually stops execution - close a lane and everything feeding that lane's value never runs.
Why you'd reach for it
Sonder Editor is a timeline video editor living inside one ComfyUI node, and it ships bridges that feed guides, drivers, masks and References into whatever graph you wired underneath. Those bridges have a slot problem: a Reference lane may or may not be live for this render window, so the Reference Selector exposes a has_reference flag (0 or 1) to decide at runtime.
The easy answer is the Bridge default unused_slots = placeholder - a black scene-size image or a second of silence, trusting the consumer to ignore it. That breaks the moment anything sits between the Bridge and the consumer: a resize, a preprocessor, an encode. A dead slot now costs you the whole chain, and a required input will eat a black frame as real content.
The plumbing layer's version of this is the first-non-null switch, like rgthree's Any Switch: an unwired optional input arrives as None. A gate inverts it - instead of choosing among live branches, it kills one. Wire it right in front of the input you're guarding.
How the laziness works
ComfyUI has a real lazy-evaluation hook: mark an input lazy=True and the node, in a status check, names only the sockets it needs this run. Sonder Gate is 16 of those lanes in one node. Each lane is a pair - when_A is the condition, an any-type socket that is not lazy, so it's already resolved when the gate decides; value_A is the payload, typed to match, marked lazy. The gate asks for a value only while its lane is open, so a closed lane's whole upstream chain is skipped.
The open/closed rule is deliberately not truthiness. Unwired, None, False and any zero number - including numpy and torch scalars - close the lane. Everything else opens it: an empty string, an empty list and a multi-element tensor are all presence tests, and casting a tensor to bool() would raise. Hence the tooltip's "anything else, including any string or image, opens it" - a lane carrying "" is open. If your condition is a text field, empty is not off.
Two wiring rules matter most. Wire the source of the condition - a Bridge slot set to nothing, or has_reference - into when, never the thing feeding value, or you've built the chain you were trying to skip. And put the gate directly in front of the optional input: nodes after it still run and fail if they truly need a value.
The inputs and outputs you'll touch
Start with lane A and ignore the rest; lanes grow as you connect them, up to 16 (A–P).
when_A- the lane condition:has_reference, or a Bridge slot set tonothing.value_A- the expensive thing. Evaluated only while the lane is open.- Output
A- wired straight into the optional input you're guarding.
Outputs are type-matched to the lane's payload: IMAGE in, IMAGE out. One caveat from the node's own description: the lanes share a single node, so a list-valued or otherwise awkward lane can affect the others. Use one gate per consumer when your lanes come from unrelated sources.
Installing it
The gate is part of the Sonder Editor pack, so there's nothing separate to install. In ComfyUI Manager, search Sonder Editor and restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SonderSaid/ComfyUI-Sonder-Editor.git
cd ComfyUI-Sonder-Editor
pip install -r requirements.txt
Requirements are light (numpy, Pillow, opencv-python-headless, scipy, imageio-ffmpeg, aiohttp) and torch is deliberately absent so nothing clobbers your GPU build. The one heavy dependency is FFmpeg 7.0+ on your PATH, which outranks the bundled binary - an old install gets refused by name. Refresh the browser after a Manager restart or the frontend extensions may not initialize.
Where people get burned
The node isn't in the menu. Sonder Gate is written against ComfyUI's V3 node API, and unlike the pack's Metadata Collector it has no V1 fallback - on an older build the lazy nodes simply aren't registered, and __init__.py logs Sonder lazy nodes unavailable instead of failing loudly. Update ComfyUI.
A lane you left unwired reads as closed - silent nothing, not an error, until something required downstream needs a value. The canvas marks a lane with no condition, or one feeding a proven-required input, so check the badges before you queue.
You wanted a fallback. The gate never substitutes a value. "Use the driver clip, else the still" is a switch, not a gate.
This is a 0.7.0 node, brand new in late September 2026, from a one-person pack that only hit Reddit in July. The laziness itself is engine behaviour and solid; V3 registration is where I'd expect the surprises.
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| when_Aopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Aopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Bopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Bopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Copt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Copt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Dopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Dopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Eopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Eopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Fopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Fopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Gopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Gopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Hopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Hopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Iopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Iopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Jopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Jopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Kopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Kopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Lopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Lopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Mopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Mopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Nopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Nopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Oopt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Oopt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. | |
| when_Popt | * | Lane condition. Unwired, None, false or a zero number closes the lane; anything else, including any string or image, opens it. Wire the source (a Reference Bridge slot set to 'nothing', or has_reference), never the chain feeding 'value' — that would run the chain first. | |
| value_Popt | COMFY_MATCHTYPE_V3 | Evaluated only while this lane is open. Everything feeding it is skipped when closed. |
Outputs (16)
| Name | Type | Description |
|---|---|---|
| A | COMFY_MATCHTYPE_V3 | — |
| B | COMFY_MATCHTYPE_V3 | — |
| C | COMFY_MATCHTYPE_V3 | — |
| D | COMFY_MATCHTYPE_V3 | — |
| E | COMFY_MATCHTYPE_V3 | — |
| F | COMFY_MATCHTYPE_V3 | — |
| G | COMFY_MATCHTYPE_V3 | — |
| H | COMFY_MATCHTYPE_V3 | — |
| I | COMFY_MATCHTYPE_V3 | — |
| J | COMFY_MATCHTYPE_V3 | — |
| K | COMFY_MATCHTYPE_V3 | — |
| L | COMFY_MATCHTYPE_V3 | — |
| M | COMFY_MATCHTYPE_V3 | — |
| N | COMFY_MATCHTYPE_V3 | — |
| O | COMFY_MATCHTYPE_V3 | — |
| P | COMFY_MATCHTYPE_V3 | — |