BatchIterator GlobalCache Clear
The BatchIterator 'forget everything' node — and yes, it nags you on purpose
- void
BatchIterator GlobalCache Clear (class BatchIteratorGlobalCacheClear) wipes every piece of state the BatchIterator family holds - the multiline-iterator positions, the string-collection storage, and the emitter counters - all at once. It's the "reset the whole BatchIterator brain" node, and it is the most honest node in this pack about its own danger.
The author's warning is right in the tooltip: if you set silent_mode to true, the node "Never raise Error... but not recommend, because you forget it. will be disaster." Translation: this thing deletes state aggressively, and if you let it do so silently you will forget it's there and wonder why your iterator always starts over or your collection keeps coming up empty. So by default, it does the opposite of silent - with force_clear on, it clears the caches and then raises an exception to force you to acknowledge that it ran. The deliberate error isn't a bug; it's the author's idea of a seatbelt.
How it works
force_clear true → deletes every key from the three BatchIterator dicts (ASYNC_OUTPUT_BATCH_ITERATOR_MULTILINE_TEXT_ITERATOR_DICT, ASYNC_OUTPUT_BATCH_ITERATOR_STORAGE_DATA_DICT, ASYNC_OUTPUT_BATCH_ITERATOR_STORAGE_DATA_COUNTER_DICT), then either raises a warning exception (default) or, with silent_mode, prints the same warning and returns an ExecutionBlocker instead. force_clear false → blocks without clearing, so the node becomes a no-op gate. Output: void (BOOLEAN), and it's marked as an output node.
The inputs that matter
force_clear(BOOLEAN, defaulttrue) - whether the wipe actually happens.silent_mode(BOOLEAN, defaultfalse) -false= raise an error after clearing so you notice;true= clear quietly. The tooltip's stance: keep it false.
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/BatchIterator/SystemTools.
Where people get burned
Two ways to shoot yourself. Leave force_clear on and connected in a workflow you actually run, and every execution raises an error - that's "working as intended," but it's still an error blocking your batch, so the node is really meant for one-shot cleanup or debug passes, not permanent residency. Flip silent_mode on to dodge that, and you've traded a loud annoyance for silent state loss - if a later run depends on iterator position that just got wiped, you'll be debugging a ghost. Treat it as a manual cleanup tool: run it when you want a clean slate, then disconnect it. If you want programmatic, controlled resets per node, the force_reset input on BatchIteratorMultiLine is the less nuclear option.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| silent_mode | BOOLEAN | false | If True, Node Never raise Error, inturrept thread. but not recommend, because you forget it. will be disaster. |
| force_clear | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| void | BOOLEAN | — |