String List Builder
The honest way to keep a prompt list inside your graph
- string_list
Most text-switch nodes make you type every prompt into a wall of tiny widgets, and then you've got a node the size of a skyscraper. String List Builder takes the opposite route: keep your strings as a list of values, and switch on them somewhere else. It builds a proper typed AUN_STRING_LIST from up to 20 multiline strings - and because the inputs are real widgets saved with the workflow, your list of prompts travels with the graph and survives reloads.
What it does
You give it a num_inputs (how many of the 20 possible strings to include) and fill in string_1 through string_N. It compiles them, in order, into a single AUN_STRING_LIST output. That output is meant to feed String List Index, which picks one string by a 1-based index - so the Builder is the data, and the Index node is the switch. Two-node split, but each half is tiny and readable.
The strings are multiline and support dynamic prompts, which matters more than it sounds: you can put multi-line text blocks or wildcard-style expressions into a slot and have them expand when they're finally used as a prompt.
Inputs and outputs
num_inputs- how many strings to include, 1–20. It's the closest thing this node has to a "show/hide" control: raise it to expose more slots, lower it to shrink the node.string_1…string_20- the content, multiline. Anything beyondnum_inputsis ignored.- Output:
string_list(typeAUN_STRING_LIST) - wire into a String List Index node.
How it works
Simple and predictable: it clamps num_inputs to 1–20, collects exactly that many strings, and returns them as a Python list wrapped in the AUN list type. No dedup, no filtering, no surprises - the order you type them is the order they come out, and index 1 in the downstream node is string_1. That predictability is the whole appeal: it's a container, not a cleverness machine.
Why you'd want it
Two reasons. First, separation of concerns: the list lives in one compact node, and the selection logic lives in another - so you can drive the selection from a random/select node, a counter, or even another workflow without touching the data. Second, it pairs with the pack's convention of index-driven switching. If you already use AUNRandomIndexSwitch or Text Index Switch 4 for prompts, this gives you the same "index selects from a list" pattern for arbitrary strings - filenames, prefixes, tags, negative-prompt variants.
The honest alternative: if your strings are short one-liners and you want the switch built in, Text Index Switch 4 collapses everything into one node. The Builder+Index split is better when your strings are long (multi-line prompts), when you want the list reusable, or when you like seeing data and logic as separate boxes on the canvas.
Installing
It's part of the AUN ComfyUI Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
Restart ComfyUI, or install via ComfyUI Manager (search "AUN"). No models, no heavy deps beyond the pack standard, auto-installed by Manager or with pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt for manual clones.
One tip: remember the downstream String List Index is 1-based - index 1 selects the first string, which is easy to forget if you've been living in zero-based programming. Get that wrong once and the fix is a one-number edit.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| num_inputs | INT | 11–20 | Number of string inputs to include in the list (1-20). |
| string_1 | STRING | String 1. Supports multiline text and dynamic prompts. | |
| string_2 | STRING | String 2. Supports multiline text and dynamic prompts. | |
| string_3 | STRING | String 3. Supports multiline text and dynamic prompts. | |
| string_4 | STRING | String 4. Supports multiline text and dynamic prompts. | |
| string_5 | STRING | String 5. Supports multiline text and dynamic prompts. | |
| string_6 | STRING | String 6. Supports multiline text and dynamic prompts. | |
| string_7 | STRING | String 7. Supports multiline text and dynamic prompts. | |
| string_8 | STRING | String 8. Supports multiline text and dynamic prompts. | |
| string_9 | STRING | String 9. Supports multiline text and dynamic prompts. | |
| string_10 | STRING | String 10. Supports multiline text and dynamic prompts. | |
| string_11 | STRING | String 11. Supports multiline text and dynamic prompts. | |
| string_12 | STRING | String 12. Supports multiline text and dynamic prompts. | |
| string_13 | STRING | String 13. Supports multiline text and dynamic prompts. | |
| string_14 | STRING | String 14. Supports multiline text and dynamic prompts. | |
| string_15 | STRING | String 15. Supports multiline text and dynamic prompts. | |
| string_16 | STRING | String 16. Supports multiline text and dynamic prompts. | |
| string_17 | STRING | String 17. Supports multiline text and dynamic prompts. | |
| string_18 | STRING | String 18. Supports multiline text and dynamic prompts. | |
| string_19 | STRING | String 19. Supports multiline text and dynamic prompts. | |
| string_20 | STRING | String 20. Supports multiline text and dynamic prompts. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string_list | AUN_STRING_LIST | — |