Nodes/ComfyCollectorNodes/Property Clear (CCN)
ComfyUI Node

Property Clear (CCN)

Wipe named variables by scope or key, on schedule

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
Property Clear (CCN)
  • trigger
  • trigger_out
scope
key*
debugfalse

The Property node holds named values in two scopes - workflow (cleared each run) and session (persists until ComfyUI restarts). That's fine until one of those session-scoped values is stale and you need it gone now, from the middle of a workflow, on a schedule. Property Clear is the broom: three settings and it wipes whatever you aim it at.

  • scope - workflow, session, or all. Pick which pool to clean.
  • key - a specific property name, or * for everything in that scope.
  • trigger - ANY input you can wire in to force execution ordering.

The single output is trigger_out, so you can chain it into whatever should run after the cleanup. Like its sibling, it always re-executes (NaN IS_CHANGED) - a clear that only runs when ComfyUI thinks its inputs changed would defeat the whole point, so it fires every time it's reached.

When you'd actually use it

Session scope is the dangerous one. It's meant for values that outlive a single run, but "until restart" is a long time, and a stale session value feeding a getter two workflows later is exactly the kind of silent bug that eats an hour. Drop a Property Clear scoped to session at the top of a workflow that should start clean, and you get deterministic behavior instead of haunted state. The key-specific variant (key: "my_var") is for surgical resets - clear one variable while leaving the rest of your session variables alone.

Install

Part of ComfyCollectorNodes, one install:

cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes

then restart, or install via ComfyUI Manager ("ComfyCollectorNodes"). No models, no extra dependencies.

Where people get burned

The * key is a sledgehammer - it wipes all properties in the selected scope, including ones another part of your session is relying on. Scope + key is your precision dial; don't reach for all casually. Also, ordering still applies: a clear that executes after your setter just erased the value the rest of the workflow was about to read. Wire the trigger so the clear runs before the nodes that consume the property. And debug (default off) prints what it removed to the console - turn it on the first few times so you actually see what you're clearing.

CategoryCCN/utils

Inputs (4)

NameTypeDefaultDescription
scopeCOMBO3 options: workflow, session, all
keySTRING*Specific key to clear, or * for all keys in scope.
debugBOOLEANfalse
triggeropt*Wire any input to force execution ordering.

Outputs (1)

NameTypeDescription
trigger_out*