Nodes/comfyui-flower-tools/🌸Flower List of Strings
ComfyUI Node

🌸Flower List of Strings

Ten strings in, one combined string and a real list out

By weichenglin0215·Created 8 months ago·Updated 2 months ago· 0
🌸Flower List of Strings
    • combined_string
    • string_list
    ◄delimiter►
    ◄add_newlinetrue►
    ◄string_1►
    ◄string_2►
    ◄string_3►
    ◄string_4►
    ◄string_5►
    ◄string_6►
    ◄string_7►
    ◄string_8►
    ◄string_9►
    ◄string_10►

    Flower List of Strings is the boring-est node in the comfyui-flower-tools pack, and it's genuinely handy for exactly that reason: it takes up to ten multiline strings and hands you back a single combined string and a Python list, so you stop hand-typing commas and newlines into concatenation chains. In a workflow full of wildcard pickers and template replacers, this is the glue that joins their outputs.

    What it does

    Two required inputs: delimiter (the separator, default empty) and add_newline (default on). Ten optional string_1 … string_10 multiline slots hold your inputs. The logic is minimal and predictable:

    • Empty slots are skipped. Leave string_7 blank and it simply doesn't appear in the output - no dangling separators.
    • Each non-empty string is emitted as value + delimiter, plus a newline if add_newline is on.
    • The delimiter field understands the escape \n, so you can pass a literal newline as the separator by typing \n.

    Outputs are the interesting part. combined_string is the flat join - one STRING you can feed straight into a prompt or a save filename. string_list is an actual LIST type, the kind most ComfyUI nodes never emit; wire it into any node with a LIST input (some batch and iteration utilities take one) to iterate over the individual pieces rather than the merged blob. Most beginners only use combined_string; the list output is there when a downstream node wants the components, not the concatenation.

    Where it fits

    Three patterns come up constantly:

    • Merging prompt fragments from separate selector/LLM outputs into one prompt with a chosen separator (, for tag-style prompts).
    • Assembling file names or path parts for the Flower File Name Combination node's siblings - join a base name, a date, and a suffix without a gnarly STRING_CONCAT tower.
    • Feeding a LIST consumer when you actually want iteration, not concatenation - the one place the string_list output earns its keep.

    Install

    One clone, one restart, same as every other Flower node:

    cd ComfyUI/custom_nodes
    git clone https://github.com/weichenglin0215/comfyui-flower-tools.git
    

    Or ComfyUI Manager → search ComfyUI Flower Tools. No models, no extra dependencies.

    Gotchas

    Two details trip people up. First, when add_newline is on and your delimiter is , , you get foo, \nbar, \n - a trailing comma and a newline after the last item. ComfyUI's CLIP encoder shrugs off trailing whitespace, but if you're comparing strings downstream, the exact bytes matter. Set add_newline off and control line breaks purely via the delimiter if you need byte-exact output.

    Second, the LIST output isn't a ComfyUI-native type most core nodes accept - it's there for pack-internal or LIST-aware utilities. If you try to plug it into a node that wants STRING, you'll get a type mismatch and wonder why. The combined_string output is the safe, universal one.

    Categoryflower-tools

    Inputs (12)

    NameTypeDefaultDescription
    delimiterSTRING—
    add_newlineBOOLEANtrue—
    string_1optSTRING—
    string_2optSTRING—
    string_3optSTRING—
    string_4optSTRING—
    string_5optSTRING—
    string_6optSTRING—
    string_7optSTRING—
    string_8optSTRING—
    string_9optSTRING—
    string_10optSTRING—

    Outputs (2)

    NameTypeDescription
    combined_stringSTRING—
    string_listLIST—