Nodes/Vantage-Nodes/Conditional Pass Through
ComfyUI Node

Conditional Pass Through

Conditional Pass Through

By vantagewithai·Created 8 months ago·Updated 26 days ago· 25
Conditional Pass Through
  • value
  • output
enabledtrue

Conditional Pass Through is the simplest useful node in Vantage Nodes, and that's not a knock. It takes one value and one boolean, and either passes the value through or replaces it with None. That's the whole trick - an on/off gate you can toggle from anywhere, without deleting a single connection.

The name undersells what it's for. ComfyUI has no built-in "disable this branch" button per connection; you either bypass nodes manually or rip out wires. This node gives you a switch. When enabled is true you get your value back unchanged. When it's false, the output is None, and the branch downstream effectively stops receiving data.

How it works

The implementation is two lines under the hood:

return (value,) if enabled else (None,)

No state, no caching, nothing clever. The graph re-runs it every execution, so toggling enabled and re-queueing behaves exactly as you'd hope.

Inputs:

  • value (ANY) - whatever you want to gate.
  • enabled (BOOLEAN, default true) - the switch. Flip it in the UI, or wire it from any node that produces a boolean: a comparison, a stepper's wrap output, another pack's logic node.

Output: output (ANY).

Where you'd reach for it

  • Toggle an optional processing path - an extra upscale pass, a face-detail branch - without deleting it when you don't want it.
  • Gate a LoRA or conditioning so it only reaches the sampler under a condition you compute elsewhere in the graph.
  • Cleanly "turn off" an input to a node that accepts optional values.

Since value is ANY, this works on MODELs, IMAGEs, CONDITIONING, strings, numbers - anything a wire can carry.

The trap to know about

Disabled means None, not "the alternate value." If whatever you're feeding downstream can't handle a None input, the graph will throw at the next node rather than gracefully skipping. Two ways around it:

  • Use the pack's Switch Any instead when you want a real fallback: wire your value into v1 and the fallback into v2 - it returns the first non-None, so a disabled-style None never reaches the output.
  • Only gate into nodes with optional inputs.

If you find yourself chaining several of these, pause - it's usually a sign the workflow logic belongs in a router (like the pack's Prompt Scene Router) rather than a pile of gates.

Installation

Same pack for all of this: search "Vantage Nodes" in ComfyUI Manager, or:

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

Restart ComfyUI. The heavy requirements.txt is mostly for the pack's GGUF and Qwen TTS nodes - this one just needs a working install.

Troubleshooting

  • "Value passed but graph broke": check the node below the gate, not the gate. It's receiving None on purpose.
  • Nothing happens when you toggle: make sure you re-queue. ComfyUI doesn't re-run a node on widget change alone in every frontend version.
CategoryVantage/Control

Inputs (2)

NameTypeDefaultDescription
valueANY
enabledBOOLEANtrue

Outputs (1)

NameTypeDescription
outputANY