State Reset Node ππ ‘π £π
The 'Start Over' Button for Every Stateful Node in Your Workflow
- BOOLEAN
Half the nodes in this pack are stateful on purpose - Float Control holds a phase, sequences hold an index, Motion Controllers hold a previous frame. That's how they animate across executions. But it also means they remember everything, and sometimes you want them to forget. State Reset Node is the reset button: flip its trigger to true and it wipes the shared state of every control node in the workflow in one shot.
This is a bigger deal than it sounds, because there's no other built-in way to do it. ComfyUI clearing its state (a reload, a queue reset, a fresh server) resets everything, but that's the sledgehammer - it takes down all state and you can't trigger it from within a workflow. State Reset Node is surgical and schedulable: you can wire its trigger from another control node, a boolean switch, or even a manual toggle in the UI, and the moment it fires, Float Controls snap back to their starting_value, sequences rewind to their first item, motion controllers drop their cached previous frame. It's the difference between a hard reboot and hitting play again.
Mechanically it's almost insultingly simple: it calls clear_all_states() on the pack's shared state manager, which empties the per-node state dictionary. The node is marked as an output node (so it runs and can be a terminal point), and it outputs a BOOLEAN - True when it actually reset something, False otherwise. So you can also use it as a one-shot signal: trigger it, and downstream can react to "the world just reset."
The inputs
- trigger - set to
Trueto reset all states. Default false; it's a momentary action, so wire it to something that goes true briefly. - always_execute - on by default; keep it that way so the node is ready to catch the trigger.
Output: BOOLEAN (True after a reset).
Install & when you'll reach for it
In ryanontheinside/ComfyUI_RealtimeNodes - ComfyUI Manager (search "Control Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RealtimeNodes
cd ComfyUI_RealtimeNodes
pip install -r requirements.txt
The classic use: a performance or demo workflow where you want the animation to restart on demand - "start the show again" without reloading the page. Or a state machine where you want to return to a known position. Two things to know: it resets every control node's state in the workflow, not just one, so it's a global reset by design - there's no per-node targeting here. And the reset happens on the execution where trigger is true, so if you hold the trigger on, every frame keeps wiping state and your control nodes never advance. Flip it true once, let it go false. Marked (BETA) in the pack, but for a two-line state wipe it's solid.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| always_execute | BOOLEAN | true | When enabled, the node updates every execution |
| trigger | BOOLEAN | false | Set to True to reset all states |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | β |