🎈LG_ClearAccumulatedValues
The reset button for everything your value receivers collected
- signal_opt
- signal
LG_ValueReceiver accumulates values by default, and that accumulation is class-level state - it doesn't reset just because you ran the graph again. LG_ClearAccumulatedValues is the reset switch: a tiny output node that wipes the accumulated values for one link_id or for all of them, then passes your signal through so you can trigger it as part of a sequence.
It's from Comfyui-LG_GroupExecutor, LAOGOU-666's small utility pack. There isn't much to this node - it exists to solve one specific footgun, and it solves it in about 20 lines. You'll reach for it in any workflow where values accumulate across runs and you need a clean slate at the start of a batch.
How it works
You give it a link_id and it clears LG_ValueReceiver's stored list for that channel. Set link_id to -1 (the default) and it clears every channel's accumulated values, then also tells the frontend to clear its mirror state via a value-clear-accumulate websocket event - so both the Python-side list and whatever the UI is showing get wiped together. The optional signal_opt input passes straight through to the signal output, letting you chain it: clear, then continue execution.
Inputs & outputs
- link_id (INT, default
-1) - a specific channel to clear, or-1for everything. - signal_opt (optional) - pass-through.
Output: signal, which is just your signal_opt echoed back.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui-LG_GroupExecutor
or ComfyUI Manager → "Comfyui-LG_GroupExecutor", then restart.
When you actually need it
- Start-of-batch reset. Put it first in the chain so each batch begins with empty accumulation.
- Per-channel isolation. Passing a specific
link_idonly nukes that channel, leaving other sender/receiver pairs untouched. - Debugging stale values. If a receiver keeps handing you values you didn't send this run, this node is the first thing to try - 9 times out of 10 the old accumulation is the culprit.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| link_id | INT | -1-1–9223372036854776000 | -1 表示清空所有 link_id 的累积值 |
| signal_optopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| signal | * | — |