Nodes/Node_Fun_ComfyUI/Indexed String Selector
ComfyUI Node

Indexed String Selector

Pick a string by number — the tiny node that unblocks batch loops

By nofunstudio·Created 2 years ago·Updated about a month ago· 9
Indexed String Selector
    • STRING
    index0
    namesFluffy, Pastel, Paint, Option4, Option5, Option6, Option7, Option8, Option9, Option10, Option11, Option12, Option13, Option14, Option15, Option16, Option17, Option18, Option19, Option20

    Indexed String Selector does one boring thing: you give it a comma-separated list of strings and an index, and it returns the string at that position. That's it. One input list, one index, one string out. It reads like the most pointless node imaginable until you're three hours into building a batch workflow and realize you need exactly this.

    The inputs are literally: names (a multiline, comma-separated list - the default ships with 20 placeholder options like "Fluffy, Pastel, Paint…") and index (0–20). It splits on commas, strips whitespace, and returns the entry at index. The one output is the selected STRING.

    Where it earns its keep is iteration. Wire the index from a counter - this pack's own Dynamic Queue Counter is the obvious partner - and the selector becomes a style/prompt chooser that steps through your list on every queue run. Batch workflows in ComfyUI have a persistent pain: driving a text value from an integer. This node is the glue. Put a list of style names in names, connect a counter to index, and each run pulls the next style. Same trick works for character names, negative-prompt presets, or anything else that's a list of strings.

    The honest take: it's a thin utility, the kind every pack ships one of, and the category is crowded - ComfyUI has a dozen string-selector variants with fancier frontends. This one's distinguishing feature is that it's just an index into a list, zero magic, which is precisely why it composes well. The default 20-item list is there to demo the indexing, not because you should keep it - replace it with your real options.

    Real limits to know. The index is capped at 20, which is a hard ceiling on how long your list can be - if you need 25 styles, this node won't do it without a tweak to the source. And there's no bounds checking you'd want to lean on: an out-of-range index throws, rather than wrapping, so keep your counter within the list length or it'll error mid-batch. The default index of 0 is fine for a first run.

    Install is the pack standard: Manager search "Node Fun", or clone https://github.com/nofunstudio/Node_Fun_ComfyUI into custom_nodes, pip install -r requirements.txt, restart. No models, no keys, nothing to download. It's a string utility, and the only reason it lives in a "No Fun"-flavored pack rather than the many string packs out there is that the author threw every little thing into one repo. If you're already running this pack for the FAL or Replicate nodes, this is a free bonus; if you came here just for a string picker, there are fancier options elsewhere, but none meaningfully more reliable.

    Categorysd

    Inputs (2)

    NameTypeDefaultDescription
    indexINT00–20
    namesSTRINGFluffy, Pastel, Paint, Option4, Option5, Option6, Option7, Option8, Option9, Option10, Option11, Option12, Option13, Option14, Option15, Option16, Option17, Option18, Option19, Option20

    Outputs (1)

    NameTypeDescription
    STRINGSTRING