ComfyUI Node Runs on cloud

ToStringList

Gather your prompts and text into a list

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
ToStringList
    • STRING
    inputs_len2

    ToStringList is the string member of the bmad "make a list" family: it takes several individual STRING inputs and bundles them into a single Python list. Strings are the cheapest things in a ComfyUI graph, and they're also the most common thing you want to iterate over - prompts, seeds as text, filenames, wildcard chunks. This node is how you gather them onto one list wire for a loop or a list-consuming node.

    The input that matters

    inputs_len - the number of input sockets (default 2, up to 32). Set it to 3 and you get string_0, string_1, string_2. Output: a single STRING list. Match the count to what you feed; empty slots become empty strings in the list.

    Why you'd reach for it

    Prompt variation is the classic use. Collect a set of prompt strings, run them through the list, and iterate - whether that's pairing with the pack's list splitters (FromListGetStrings / FromListGet1String) or feeding a node that accepts a STRING list directly. It's also handy when several text-producing nodes (a "String" primitive, a wildcard expander, a filename builder) all feed one consumer that wants them collected.

    The distinction matters here more than anywhere: a list of strings is a real Python list, and some nodes genuinely need that rather than individual text widgets or a batch. ToStringList makes the conversion trivial - set the count, plug in, done.

    Installing

    Ships in comfyui_bmad_nodes, bmad4ever's grab-bag of API, CV, and utility nodes. ComfyUI Manager - search "comfyui_bmad_nodes" (or "Bmad Nodes") - install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bmad4ever/comfyui_bmad_nodes
    cd comfyui_bmad_nodes
    pip install -r requirements.txt
    

    Restart after. No model downloads; pure Python, zero extra dependencies.

    The whole "make a list" family is boring by design, and ToStringList is its most useful member precisely because text is what you shuffle around most. If you only install one of these, make it this one.

    CategoryBmad/Lists/Make or Intercalate

    Inputs (1)

    NameTypeDefaultDescription
    inputs_lenINT20–32

    Outputs (1)

    NameTypeDescription
    STRINGSTRING