Pyobjects/Global Var Remove
Clear a stashed value so the next run starts clean
- *
The cleanup node for LogicUtils' global-variable subsystem. If you've been using GlobalVarSetIfNotExistsNode to initialize a counter or a cached value once and keep it alive across runs, eventually you want a way to reset it without restarting ComfyUI entirely (which would also nuke every other global variable your workflow might depend on). That's this node's whole job: delete one specific key from the shared in-memory store.
Think of it as the explicit reset button. Without it, the only way to clear a value set with the "if not exists" pattern is to restart the server - which is heavy-handed if you've got a dozen different global keys serving different parts of a complex workflow and only want to reset one. Wire this into a branch that fires on some condition (end of a batch, a manual trigger, whatever your logic gates decide), point it at the right key, and that slot goes back to empty, ready for the next SetIfNotExists to seed it fresh.
How it works
Give it a key; it deletes that entry from the shared dictionary the whole GlobalVar* family reads and writes. It returns something on the wildcard * output afterward - going by the pattern the rest of the family follows, treat that as a courtesy pass-through rather than something you build logic around, since the README doesn't spell out exactly what comes back for a key that's already gone.
Inputs and outputs
- key (default
my_key) - the exact name to remove. No wildcard matching, no "clear everything" option - one key per node.
Output is on the wildcard * slot.
Installing ComfyUI-LogicUtils
ComfyUI Manager: Install Custom Nodes → search "ComfyUI-LogicUtils" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI. No dependencies.
Worth knowing
This only touches the in-memory store - the one GlobalVarGetNode and GlobalVarSetIfNotExistsNode read and write. It has nothing to do with the disk-persisted values from GlobalVarSaveNode/GlobalVarLoadNode; removing a key here doesn't delete anything from a saved JSON file, and vice versa. Keep that split straight or you'll go looking for a value that got cleared from the wrong store. This is part of aria1th's (AngelBottomless's) mostly-undocumented LogicUtils pack - public commits stopped in January 2026 - so there's no official confirmation of exactly what happens if you remove a key that was never set; assume it's a quiet no-op rather than an error, and verify with JsonDumpAnyStructureNode if you need to be sure.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | my_key | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |