Remote Collect
A counter your other workflow can feed, so a loop knows how far along it is
- passthough_output
Remote Collect (class AsyncOutputRemoteCollection) is the write-side of the pack's remote-control pair. Every time it executes with touch true, it increments a per-key_id counter in process memory, then passes touch straight through. Its partner, AsyncOutputRemoteTrigger, reads that counter and decides whether the loop should continue. Think of it as the odometer of a generation loop, and the node can be placed far from the trigger - "remote" is doing real work in the name.
The use case the author clearly had in mind: a loop that runs across multiple queue items (or is driven by another workflow or a script hitting the API) where some node at the "tick" position keeps count, and the gate that stops the loop reads the count somewhere else in the graph. It's the same counting idea as AsyncOutputEmitter, but split into separate write and read nodes instead of one node that does both, which matters when the thing that advances the loop and the thing that checks the loop live in different branches.
How it works
It increments ASYNC_OUTPUT_REMOTE_CONTROL_DATA[key_id] once per execution (an empty key_id raises an error on purpose). With with_AsyncOutput_multiline_prompt_batch enabled it also maintains a separate tick group in ASYNC_OUTPUT_REMOTE_CONTROL_WITH_MULTI_LINE_TEXT_TICK_ID_DICT, keyed by multiline_trigger_control_unique_id - that's the sync channel used by AsyncOutputMultiLineTextWithBatch to let a remote controller pace which prompt line comes next. Turn that option on without a valid unique id and the node raises.
The inputs that matter
touch(BOOLEAN, forced) - the increment trigger, passed through topassthough_output.key_id(STRING) - the counter's name; must match the Remote Trigger it talks to.with_AsyncOutput_multiline_prompt_batch(BOOLEAN, defaultfalse) - enable only if you're syncing a multiline prompt iterator.- Optional:
multiline_trigger_control_unique_id(required non-empty whenever the sync option is on),multiline_tick_index(shared tick reference, default-1).
Output: passthough_output (BOOLEAN) - echoes touch so you can keep the branch alive.
Installing it
No dependencies, no model files. ComfyUI Manager → search "AsyncOutput" → install and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/teddy1565/ComfyUI-AsyncOutput
It's under AsyncOutput/Deprecated(ComfyUI NOT Turing complete)/RemoteControl.
Where people get burned
The counter is process-global and, like everything here, auto-wiped at the start of each run by default - so if your Remote Trigger keeps returning false, check whether auto-reset is eating the count between the collection tick and the trigger check. Also, a key_id that doesn't match the trigger's is silent: the counter climbs and nobody reads it. And because this state is in Python memory, a ComfyUI restart zeroes every loop - a restart mid-loop means the trigger sees a fresh counter and the loop's completion logic needs to handle that.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| touch | BOOLEAN | — | |
| key_id | STRING | — | |
| with_AsyncOutput_multiline_prompt_batch | BOOLEAN | false | if want sync multiline prompt batch, need enable this. |
| multiline_trigger_control_unique_idopt | STRING | should input a unique_id, AsyncOutput multi text node will reference this id. | |
| multiline_tick_indexopt | INT | -1 | a group shared reference same tick. sync this group tick |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| passthough_output | BOOLEAN | — |