🎈LG_ValueReceiver
Collect values from across the graph into one list, in one place
- values
- count
LG_ValueReceiver is where values sent by LG_ValueSender land. It matches on link_id, collects everything that arrives, optionally casts it to a concrete type, and hands you the pile as a list plus a count. The killer feature is that it accumulates by default - send a seed or a prompt from multiple runs across your graph, and this node gathers them all into one growing list that something downstream can consume. That turns a messy "values exist in five different places" problem into "one node has all of them."
It's part of Comfyui-LG_GroupExecutor, LAOGOU-666's small dependency-free utility pack. There's no English community chatter about this pack to lean on, so the source is the best doc - and it's refreshingly direct.
How it works
The receiver's value field is a multiline string that the frontend auto-fills whenever a ValueSender with the same link_id fires (the websocket event is value-send-accumulate). On execution, Python splits that text on newlines, and:
- accumulate = true (default): each value is added to a per-
link_idlist stored on the class - and deduplicated. Send the same value twice and it's stored once. The list persists across runs until cleared. - accumulate = false: the accumulation for that link_id is wiped and only the current values are used.
Then the values are cast according to typ: INT and FLOAT try numeric conversion (falling back to the raw string on failure), BOOLEAN treats true/1/yes as true, STRING and ANY pass through.
Inputs
- typ - STRING / INT / FLOAT / BOOLEAN / ANY. Decides the casting.
- value - auto-filled by the frontend; you can also paste a multiline list yourself.
- link_id - the channel to listen on.
- accumulate - whether to keep collecting (true) or take only the latest (false).
Outputs
- values - a list (cast per
typ). - count - an INT, the number of values.
Wire values into anything that takes a list or batch - prompt lists, seed arrays, a batch of numbers for a loop.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui-LG_GroupExecutor
or via ComfyUI Manager → "Comfyui-LG_GroupExecutor", then restart.
Where people get tripped up
- Deduplication is built in. If your use case needs repeats to survive, this node isn't it - it quietly collapses duplicates.
- State sticks around. The accumulated list is class-level, so it survives between graph executions. Stale values from an earlier run can pollute the next one. Reset with LG_ClearAccumulatedValues, or run with accumulate off.
IS_CHANGEDalways returns NaN in accumulate mode, so the node re-executes every time - expected, but it means this node will never cache-skip.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| typ | COMBO | STRING | 5 options: STRING, INT, FLOAT, BOOLEAN, ANY |
| value | STRING | 接收到的值,由前端自动填充 | |
| link_id | INT | 00–9223372036854776000 | — |
| accumulate | BOOLEAN | true | 开启后累积所有收到的值 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| values | * | — |
| count | INT | — |