Nodes/AsyncOutput/Batch Text Yield With Batch
ComfyUI Node

Batch Text Yield With Batch

Feed one prompt per generation, paced by a loop, without a scheduler node

By teddy1565·Created 5 months ago·Updated 5 months ago· 0
Batch Text Yield With Batch
  • remove_words
  • text_line
touch
eof_size
text
with_tickfalse
delimiter
skip_emptytrue
tick_index
with_remote_control_collectfalse
multiline_trigger_control_unique_id
after_init_loopfalse

Batch Text Yield With Batch (class AsyncOutputMultiLineTextWithBatch) is this pack's attempt at a generator: paste a big multiline list of prompts, and every time the workflow ticks, it outputs the next line - then waits for the loop to come back around before yielding the line after that. The source's own description is the pitch: "it can output first line, then wait unit prev workflow loop done, trigger next loop."

Where you'd reach for it: you want one prompt per queue run, each run doing a full generation, and the runs chained so run 2 doesn't start until run 1's image is done - a paced queue that a plain batch node can't give you. That's a genuinely useful thing to want. It's also, honestly, the fiddliest node in the pack, and you should expect to spend some time getting the remote-control sync to behave.

How it works

It keeps a per-node index in a global dict (ASYNC_OUTPUT_MULTI_LINE_TEXT_YIELD_ID_DECT) keyed by the node's unique_id. Each execution advances the index, splits text on delimiter (dropping empty lines when skip_empty is on), and returns the current line. When the index reaches eof_size the record is deleted so the next run re-initializes. Two extras complicate it: remove_words (any-input, strips strings out of the yielded line) and the remote-control mode, where with_remote_control_collect plus a shared multiline_trigger_control_unique_id ties this node's pacing to an AsyncOutputRemoteCollection tick group - a loop controller in another part of the graph effectively calls "next" for it.

The inputs that matter

  • touch (BOOLEAN, forced) - the pulse that advances the yield. No touch, no next line.
  • eof_size (INT, forced) - how many ticks the run is expected to last. Get this wrong and the iterator either stops early or runs past your list.
  • text (STRING, multiline) - your prompt list, one per line.
  • with_tick (BOOLEAN, default false) - the tooltip says "Recommend use false, else maybe blocking downstream." It gates output on tick_index having advanced. Leave it off until you need it.
  • skip_empty (BOOLEAN, default true), delimiter (STRING, default \n).
  • Optional: tick_index, remove_words, with_remote_control_collect, multiline_trigger_control_unique_id, after_init_loop.

Output: text_line (STRING) - the yielded line.

Installing it

No dependencies, no models. 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)/WorkFlowTool.

Where people get burned

Expect two failure modes. If with_tick is on and tick_index never advances, the node blocks forever - that's the "maybe blocking downstream" the tooltip warns about. And if you enable with_remote_control_collect without a non-empty multiline_trigger_control_unique_id, it raises an error on purpose, and the unique id must match the one on the Remote Collection node exactly or the sync silently doesn't happen. The author's own stance - the whole family is marked deprecated because ComfyUI doesn't reliably support this kind of cross-pass state - is worth taking seriously here, because this is the node where that limitation bites hardest.

CategoryAsyncOutput/Deprecated(ComfyUI NOT Turing complete)/WorkFlowTool

Inputs (11)

NameTypeDefaultDescription
touchBOOLEAN
eof_sizeINT
textSTRING
with_tickBOOLEANfalseRecommend use false, else maybe blocking downstream
delimiterSTRING
skip_emptyBOOLEANtrue
tick_indexoptINT
remove_wordsopt*
with_remote_control_collectoptBOOLEANfalseIf want control a loop, enable this, it will sync with a remote control collect node
multiline_trigger_control_unique_idoptSTRINGmust use same unique_id with othter multiline trigger and remote control collect node
after_init_loopoptBOOLEANfalseIf enable with_remote_control_collect, must with this singal index

Outputs (1)

NameTypeDescription
text_lineSTRING