ComfyUI Node

String List

Six prompt fragments, one index

By shockz0rz·Created 3 years ago·Updated 2 years ago· 28
String List
    • current value
    • list
    index1
    string1
    string2
    string3
    string4
    string5
    string6

    String List is the text member of the Easy Grids list family: six string slots, an index, and the node outputs whichever string the index points to. Where the float and int versions feed numbers into samplers and seeds, this one feeds words - prompt fragments, styles, subject descriptors - into your text encoder, letting a grid sweep through different phrasing without you hand-editing a prompt between runs.

    How it works

    Type something into each of string1 through string6 (default empty), set index (1-based, min 1), and get two outputs:

    • current value - the selected string (STRING)
    • list - all six as a STRING_LIST

    No text-formatting output here, no decimal knob - strings are already text. Indexes past six clamp to the last value rather than erroring, same as the numeric nodes.

    How you'd actually use it

    The natural partner is a Text Concatenator from this same pack. Build a prompt like "portrait of a knight, " + String List's current value, and each cell of a Create Image Grid loop gets a different descriptor - "in a forest", "on a mountain", "at dusk" - with the rest of the prompt untouched. That's prompt engineering on a grid: same seed, same base, one variable swapped, and a Save Image Grid collects the labeled comparison. It's the manual, deliberate version of what wildcard randomizers do by chance - you see exactly which phrasing earned its place.

    It's also handy when a downstream node wants a STRING_LIST (like Save Image Grid's row_labels or column_labels) and you have exactly six labels to hand. The pack's String List from Text Field node does the same job with a text box if you need more than six or prefer typing.

    Installing it

    Part of comfy-easy-grids - one install for the pack, shared by all eleven nodes. ComfyUI Manager: search "comfy-easy-grids". Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/shockz0rz/comfy-easy-grids
    

    Restart ComfyUI. No dependencies beyond stock ComfyUI, no model files. It's under "EasyGrids" in the Add Node menu.

    Troubleshooting

    The empty-slot trap is the one to know: default strings are empty, so if index lands on a slot you never filled, current value is an empty string and your prompt silently goes from "a knight" to "a knight, " with nothing after the comma. Also, unlike the numeric list nodes, this one does not split on delimiters - what you type into a slot is exactly what you get, commas included. If you want to paste a multi-line list instead, use the from-Text-Field variant.

    CategoryEasyGrids

    Inputs (7)

    NameTypeDefaultDescription
    indexINT1
    string1STRING
    string2STRING
    string3STRING
    string4STRING
    string5STRING
    string6STRING

    Outputs (2)

    NameTypeDescription
    current valueSTRING
    listSTRING_LIST