Nodes/Basic data handling/create Data List from STRINGs
ComfyUI Node

create Data List from STRINGs

Build a STRING list from text boxes — prompt batches without the regex gymnastics

By StableLlama·Created about a year ago·Updated 4 days ago· 48
create Data List from STRINGs
    • list
    item_0

    Prompts are text, and sometimes you want to try five of them. create Data List from STRINGs is the node that turns a row of text boxes into a data list of strings - the prompt-batch equivalent of the pack's INT, FLOAT, and BOOLEAN list builders.

    It's part of Basic data handling, StableLlama's zero-dependency utility pack. It's the text entry point into the Data List family, and it saves you from splitting strings or wrestling with wildcard syntax when all you really wanted was "run this batch of prompts."

    How it works

    The familiar dynamic-input pattern: start with item_0 (a STRING), right-click to add item_1, item_2, and so on. Each text box becomes one element of the output, coerced through str(). Output list is a STRING data list - wire it into any text input and ComfyUI runs the downstream node once per prompt.

    That last property is the whole game. A positive-prompt input that accepts a data list will produce one generation per prompt in the list. No splitting, no manual re-runs - five text boxes, five outputs.

    What you set

    • item_0 (STRING, optional) - the first prompt or text value; add more as needed.

    One output: list, the assembled STRING data list.

    A realistic use

    Prompt A/B testing without touching the sampler. Put "a red car," "a blue car," "a green car" in three inputs, connect the list to your CLIP text encoder's prompt input, and get three images from one queue. The same pattern extends to any text-driven input - negative prompts, filename prefixes, wildcard-style variations.

    Installing it

    ComfyUI Manager → search "Basic data handling", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
    

    Restart. No dependencies, no models.

    Common issues

    • "One of my prompts got skipped." If a text box is left blank, it becomes an empty string in the list and the batch still runs it - you'll get an empty-prompt generation. Delete the unused input rather than leaving it blank.
    • "The extra blank entry is producing junk." Same root cause as above - the dynamic container reserves a slot, and a blank widget is still an item. Fill or remove it.
    • "I want one giant multi-line prompt, not a list." Then you don't want this node - a plain STRING input with a multi-line widget does that. This node is specifically for multiple separate strings that should fan out.
    CategoryBasic/Data List

    Inputs (1)

    NameTypeDefaultDescription
    item_0optSTRING

    Outputs (1)

    NameTypeDescription
    listSTRING