Nodes/Kinburg-Nodes/Any Unplug
ComfyUI Node

Any Unplug

Pull the wire without stopping the run

By Kinburg·Created 4 months ago·Updated 21 days ago· 3
Any Unplug
  • input
  • output
◄enabledtrue►
◄when_offnothing►

What you'd actually use it for

You have one input you want to switch off for a run, and nothing else should care. The classic case is the one in the author's own docs: a Context Collector feeding reference material into an LLM node's context input. Some runs you want the model grounded in that material, some runs you want it to just write. What you don't want is to re-wire the graph, or to mute the collector and take half the workflow down with it.

That's the gap this fills. ComfyUI's normal off-switches are all-or-nothing: delete the link to a required input and the downstream node won't run, mute the node that produces the value and everything behind it goes with it. Any Unplug keeps the wire in place and only stops the value travelling down it. The node on the other end runs exactly as it always does - it just finds nothing in that one slot, the way it behaves when you never connected anything there.

How it works

Three things do the work, and all three are engine behaviour rather than magic.

A "*" input in ComfyUI accepts anything - an image, a latent, a model, a string. So output can be dropped into whatever socket you were trying to empty, and the type check won't argue with you.

Then, when you flip enabled to unplugged, the node has to hand something down a link that still exists. That's what when_off decides: nothing sends None, the same value an unconnected optional input holds, and empty text sends "". Get that choice wrong and things break quietly or loudly depending on the target - more on that below.

The second thing is laziness. input is declared lazy and the node only asks for it while enabled is on, so an unplugged branch is never computed. The Context Collector doesn't run, an upstream LLM doesn't generate, a sampler sitting behind it doesn't burn the card. You're not paying for a value you're about to throw away.

Worth knowing that this pack also ships Any Gate, and the two are opposites on purpose. A closed gate returns ComfyUI's silent execution blocker, so every node past it is skipped - no save, no preview, no error, the run just ends short. An unplugged link keeps the run going and withholds the value. Gate to stop a branch, Unplug to neuter one input.

The three inputs and the one output

  • input - anything, and lazy. Whatever you were going to plug into the target goes here instead.
  • enabled - the switch. Widget labels are connected / unplugged, which is clearer than on/off here.
  • when_off - nothing or empty text. This is the one to think about.

Then wire output into the socket you want to be able to empty.

Where people get burned

when_off: nothing sends None, and None is only the same as "not connected" when the receiving parameter defaults to None. An optional input you never wire falls back to the default in the node's own signature, and that default isn't always None - plenty of nodes declare an optional string with "". Hand those a None and you get either a mismatch in behaviour or a straight AttributeError the first time the code calls .strip() or joins the string.

So: images, models, conditioning, config bundles → nothing. Text going into a node that trims or concatenates before it checks → empty text. The same logic applies to non-optional inputs: None arriving at a slot that never expected it is a crash, not a graceful skip. If you want a branch to die cleanly, that's Any Gate's job, not this node's.

Installing it

ComfyUI Manager, search Kinburg-Nodes, or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Kinburg/Kinburg-Nodes

Restart ComfyUI and it's under Kinburg-Nodes → util → Any Unplug. Nothing models-side, nothing extra to download.

One heads-up that applies to the whole pack: install.py runs automatically on Manager installs and tries to install a CUDA build of llama-cpp-python for the Local LLM nodes. It matches the wheel to your torch's CUDA major (cu124 for CUDA 12, cu130 for 13), and a mismatch - the wrong wheel loading cudart64_12.dll that isn't there - is the documented way that step fails. This node doesn't touch llama.cpp at all, and the utility nodes in util/ need nothing beyond the Pillow, numpy and torch that ComfyUI already ships. If that wheel install errors out on your machine, the pack is still fine.

When to reach for it

Use it where a per-run toggle beats a graph edit: cutting the context on an LLM call, dropping a trigger string out of a prompt, testing a workflow with one optional conditioning input absent. It's the plumbing you set up once and click, instead of the plumbing you re-wire every time you change your mind.

CategoryKinburg-Nodes/util

Inputs (3)

NameTypeDefaultDescription
input*Anything — the value this node passes on, or withholds. LAZY: while unplugged it is not evaluated, so the branch feeding it never runs.
enabledBOOLEANtrueConnected: the value passes straight through. Unplugged: the node downstream still runs, it just receives nothing in this slot — as if the link had been pulled out.
when_offCOMBOnothingWhat 'nothing' is while unplugged. 'nothing' = None, what an unconnected optional input holds — right for images, models, conditioning, config bundles and for text read as (value or ''). 'empty text' = "", for a node that would strip or join the string before checking it.

Outputs (1)

NameTypeDescription
output*—