Nodes/ComfyUI-LogicUtils/Yieldable Iterator String
ComfyUI Node

Yieldable Iterator String

Step through a list instead of picking randomly

By aria1th·Created 3 years ago·Updated 7 months ago· 122
Yieldable Iterator String
    • STRING
    input_stringa$b$c
    separator$
    resetfalse

    Same shape as this pack's Uniform Random Choice - a string with a few options packed into it, split by a separator - but a different job entirely. Instead of picking randomly, this one steps through the list in order, one entry per queue: first run gets the first item, second run gets the second, and so on. The name is a giveaway - "yieldable" strongly suggests it's built as a Python generator internally, handing back the next value each time it's called rather than recomputing from scratch.

    It's one of the "Logic Gates" nodes in aria1th's ComfyUI-LogicUtils pack, a small collection of logic, random, and string utilities. Same GitHub account that trained the Illustrious XL checkpoints under the AngelBottomless handle, though this is a separate, quieter project - last touched 2026-01-21.

    Inputs and outputs

    • input_string - your list, joined by the separator. Default a$b$c.
    • separator - the delimiter. Default $. As with the random-choice version, pick something that won't collide with characters inside your actual entries.
    • reset - a boolean, default false. Flip it to true to restart the iterator from the first item; leave it false to keep advancing from wherever it left off.
    • Output - a single STRING, the current entry.

    Where you'd actually use it

    Anywhere you want to cycle through a fixed set of values across a batch of runs, deterministically, instead of drawing at random - running the same generation once per style word in a list, or stepping through a set of test prompts one queue at a time without manually retyping each one. Pair it with reset to restart the cycle whenever you change input_string to a new list, or wire something to it that flips true at the start of a batch run.

    Installing it

    ComfyUI Manager → search ComfyUI-LogicUtils → install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aria1th/ComfyUI-LogicUtils
    

    No models, and by community account, no real dependencies to fight - a r/StableDiffusion thread on lightweight ComfyUI logic options recommended this exact pack over WAS Node Suite and Impact Pack specifically for having none. The README's own install hook is opt-in only (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, force-off with COMFYUI_LOGICUTILS_SKIP_INSTALL=1).

    Common issues

    This node holds internal state - it has to remember which item it's on between queues - which is worth knowing because ComfyUI normally caches a node's output and skips re-running it if none of its declared inputs changed. A stateful node like this has to explicitly tell ComfyUI "run me again anyway" every time, or it'll just serve the same cached string forever instead of advancing. I can't confirm from the outside whether it does this correctly in every ComfyUI version, but if you queue this node repeatedly and the output isn't moving, that mismatch - caching versus internal state - is the first thing to suspect, not a broken separator.

    Same separator-collision caveat as Uniform Random Choice: if the delimiter shows up inside one of your actual entries, that entry gets split in two. And as with the rest of this pack, expect stability rather than active development - the last push was January 2026.

    CategoryLogic Gates

    Inputs (3)

    NameTypeDefaultDescription
    input_stringSTRINGa$b$c
    separatorSTRING$
    resetBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    STRINGSTRING