Does Exist
Telling your workflow when something silently vanished
- variable
- BOOLEAN
ComfyUI has a silent failure mode that bites everyone eventually: you bypass a node, and whatever consumed its output now receives nothing - no error, no warning, just a wire that stops carrying water. DoesExist exists to make that visible and, better, to let your graph act on it. Feed it any wire, and it answers one question: did this actually produce a value?
What it's for
The author's own framing is the best summary: "useful for adding some logic if a node is bypassed in a workflow." Say a Detailer stage sits in the middle of your graph and you bypass it for a fast test run. Everything downstream that expects its output gets None, and most nodes just error or quietly produce garbage. DoesExist takes that fragile wire and turns it into a clean BOOLEAN - true if a value exists, false if the upstream node was bypassed and handed you nothing.
From there you can do something about it. Feed the boolean into a BooleanSwitch to reroute around the missing stage, or into a conditional to skip a step. It's the connective tissue for workflows that are supposed to run in two configurations without you hand-editing them between runs.
How it works
Mechanically it's about as simple as ComfyUI logic gets. The single optional input is typed * (AnyType), the same wildcard trick this pack uses elsewhere, so it accepts anything from any node. On execution it checks whether that value is None - a bypassed upstream node delivers exactly that - and returns (variable is not None,). That's the whole implementation, and it's honest: it tests existence, not validity. A node that ran and produced an empty tensor still counts as "exists."
The inputs and output
- variable (any, optional) - the wire you're interrogating. Leave it unconnected and the node returns
false. - BOOLEAN -
trueif the input is notNone,falseotherwise. This is a plain boolean, so it plugs straight into switches, conditionals, and anything that takes aBOOLEAN.
Installing it
Same pack as everything here, comfyui-lopi999-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/LaVie024/comfyui-lopi999-nodes
Then restart. Or use ComfyUI Manager and search "comfyui-lopi999-nodes." No models, no extra dependencies for this one.
Common issues
The main trap is conceptual rather than technical: DoesExist only catches the bypass failure mode, not a node that errors loudly (ComfyUI stops the queue there) and not a node that runs but returns an empty result. Empty-but-real is still true. If your workflow "silently" produces nothing and DoesExist keeps saying true, check whether the upstream node is actually running or whether it's the next node in line that's bypassed - the input is only as honest as the wire you attach to it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| variableopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |