Mie Loop Finalize Text List ๐
Pull the collected strings out of the loop
- loop_ctx
- text_list_json
The delivery end of a text loop. After MieLoopCollectText has gathered a string on each pass, MieLoopFinalizeTextList reads the accumulated list out of the loop context and emits it - every collected string, in order.
Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under the ๐ Loop submenu.
How it works
Finalize is Collect's counterpart. Strings pile up inside the loop_ctx as the loop runs; Finalize waits until the loop is done - signalled by MieLoopEnd's done output - and only then hands over the whole set. The done gate keeps it from emitting a half-finished list mid-loop.
The inputs and outputs that matter
loop_ctx(MIE_LOOP_CTX) - the loop context carrying the collected strings.done(BOOLEAN) - the completion signal from MieLoopEnd. The trigger; without it, Finalize doesn't know the loop is over.- Output
text_list_json(STRING) - the collected strings serialized as a JSON array (e.g.["first", "second", "third"]).
The output being a JSON array string is the detail to notice. It's not a native ComfyUI list of separate strings - it's one STRING containing the array. That's convenient for saving, logging, or passing to something that expects JSON, but if a downstream node wants the items one at a time, you'll parse the array yourself.
Installing it
ComfyUI Manager โ search ComfyUI-MieNodes โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model downloads or heavy dependencies. Under ๐ MieNodes โ ๐ Loop.
Common issues
Empty output. The usual suspect is a missing done wire - Finalize fires on MieLoopEnd's done and not before. The other is a broken loop_ctx chain from MieLoopCollectText to here.
I expected separate strings, got one blob. By design - the output is a single STRING holding a JSON array. If you need the entries individually, run it through a JSON parse / split downstream.
Blank entries in the array. Those came from passes that collected an empty text. Fix it at the collect step by making sure every iteration feeds a real string in.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| loop_ctx | MIE_LOOP_CTX | โ | |
| done | BOOLEAN | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text_list_json | STRING | โ |