Nodes/Basic data handling/create LIST from STRINGs
ComfyUI Node

create LIST from STRINGs

Create LIST from STRINGs — the list type that swallows everything

By StableLlama·Created about a year ago·Updated about 15 hours ago· 48
create LIST from STRINGs
    • LIST
    item_0

    Text is where most ComfyUI bookkeeping actually happens - prompt fragments, filenames, tag lists, saved strings. create LIST from STRINGs is the typed create-node for that: a growing set of item_N text slots that all get coerced to strings and packed into one LIST. It's the list type that swallows everything, because almost anything can be stringified.

    How it works

    Every item goes through str():

    values = [str(value) for value in list(kwargs.values())[:-1]]
    

    That means you can throw numbers, booleans, even floats into a slot and they'll come out as their string forms - 42 becomes "42", True becomes "True". Unlike the int and float versions, nothing here errors; strings are the forgiving type. The trade-off is that if you expected a number on the other end, you'll be doing a cast later. The trailing empty slot is dropped, same as every create-node in the family - and that quirk matters here more than anywhere: if you've got an empty-string element that must survive, this node will eat it. Append it afterwards instead.

    Output is a single LIST of strings.

    Where you'd use it

    • Prompt variation lists. Assemble a set of prompt fragments or whole prompts to swap in per generation.
    • Filenames and tags. Build a list of names for a batch, then check membership with contains or find positions with index.
    • Data for the string nodes. A LIST of strings feeds cleanly into sorting, reversing, or length checks.

    Installing

    It's in the "Basic data handling" pack by StableLlama. ComfyUI Manager: search "Basic data handling", install, restart. Or:

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

    Restart ComfyUI. No dependencies, no models - pure Python wrappers, and about the safest custom-node install there is.

    Gotchas worth knowing

    • Everything stringifies, including things you might not expect (True"True"). If you're mixing types, the generic create LIST preserves them instead.
    • The trailing empty slot is dropped - you cannot end a created list with "" using this node alone.
    • It builds a LIST (single Python list variable), not a native data list. Different collection type, different downstream behavior.
    CategoryBasic/LIST

    Inputs (1)

    NameTypeDefaultDescription
    item_0optSTRING

    Outputs (1)

    NameTypeDescription
    LISTLIST