ND ON / OFF
A wire that stops existing when you flip it
- value
- out
Every ComfyUI user has bypassed a node and watched the wrong thing happen. Bypass passes an input through by matching types, which works great for a resize and disastrously for anything that changes meaning. What you often actually want is "this wire isn't here right now" - so the downstream node treats its optional input as unconnected, the way it would if you'd never wired it.
That's the whole product, and it's one toggle.
What it is
ND ON / OFF has one input, one output, and a condition boolean. On: the value goes through. Off: nothing comes out - and critically, not "a None comes out". In the browser's prompt, the switch is removed and the wire is simply gone, so a downstream optional input counts as not connected rather than missing data. That distinction is the reason this node exists at all.
If you've built anything with optional inputs, you know the difference it makes. A node with an optional image input behaves one way when the input is absent (ignore the field) and another when it's present but empty (compute on nothing, often loudly). Most packs handle the first and not the second. This gives you a way to be in the first state on purpose, from a toggle, without deleting wires.
Same family as the null-output placeholders that the plumbing world uses to mute a branch from inside the data - but with a friendlier face, and it also stops the input from being evaluated. With the toggle off, the whole upstream chain feeding value doesn't run. That's a real saving when the thing behind the gate is a heavy loader or a second sampler.
Inputs and outputs
condition(BOOLEAN, default true) - "true: the value passes. false: nothing comes out." Convert it to an input if you want a Primitive Boolean as a labelled switch; the node reads it either way.value(*, optional) - whatever you're gating. Any type; the first wire connected, tovalueor toout, sets both pins' type and name, so you can tell a MODEL gate from a LATENT gate by looking.
Output is out, same type as whatever you connected.
One caveat straight from the source: the clean "wire disappears" behaviour is what happens when the toggle is set on the node itself (or driven by a Primitive Boolean), because the browser rewrites the prompt before sending it. If condition comes from some computed value, the node stays in the prompt and outputs None for "off" - and a required input downstream will then be reported by ComfyUI as missing, same as any unconnected wire. Export via the API gives you the same resolved prompt either way, so what you see in the UI is what actually ran.
Install
Part of Neural Dreamer Nodes (v1.1.0, MIT, dependency-free - empty dependencies = [] in pyproject.toml, no models).
cd ComfyUI/custom_nodes
git clone https://github.com/neural-dreamer/ComfyUI-NeuralDreamer-Nodes.git
Restart and refresh the tab. Manager users: search "Neural Dreamer Nodes".
Common issues
"Required input is missing" after I turned it off. That's the node doing what it says. Off means the wire isn't there, and if the consumer treats that input as required rather than optional, the run is invalid. Gate something that's genuinely optional, or gate the whole branch with a switch that has both sides wired.
My node behind the gate is greyed out / nothing on the wire. With the toggle off, upstream isn't evaluated - so there's no preview and no cached image for it. Flip on, queue once, and the preview returns.
It behaves differently when driven by a Primitive. It shouldn't - a Primitive Boolean is in the "set in the node" camp and gets the prompt rewrite. A computed boolean is the other camp. If your gate suddenly starts complaining about missing inputs, check what's driving condition.
I want to switch between two values, not remove one. Wrong node: use ND Any Switch (pick by index) or ND Multi Switch (pick by boolean across pairs). This one is single-input, pass-or-nothing.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| condition | BOOLEAN | true | true: the value passes. false: nothing comes out. |
| valueopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| out | * | — |