Nodes/ComfyUI-Interactive/String Append (for Interactive)
ComfyUI Node

String Append (for Interactive)

Join two strings without the retrigger bug interactive workflows hit

By lquesada·Created 2 years ago·Updated about a year ago· 52
String Append (for Interactive)
    • output
    join_prompt_usingcomma and space
    input1
    input2

    This node has a specific origin story, and the README says it outright: Custom-Scripts' popular "String Function" node has a display issue that shows up specifically in interactive workflows - it needs some nodes retriggered to show the concatenated text correctly, which slows down exactly the kind of click-and-wait workflow this whole pack is built for. InteractiveStringAppend is the author's fix - a plain, purpose-built string-joiner that plays nicely with InteractiveSelector/InteractiveSwitch style graphs instead of fighting them.

    Functionally it's simple: two string inputs, a chosen separator, one joined output. The reason to reach for it specifically inside an interactive workflow isn't that it does anything cleverer than the alternative - it's that it doesn't have the alternative's bug.

    How it works

    Feed it up to two strings. It joins them using whatever separator you picked, and outputs the result. Typical use in this pack's world: build a prompt out of a base string (maybe held in an InteractiveString or InteractiveStringMultiline) plus something branch-specific - a style tag that differs per candidate in a multi-way InteractiveSelector setup - so the final combined prompt travels along with whichever branch gets picked.

    The inputs and outputs that matter

    • input1 and input2 (both optional, STRING, multiline, default "") - the two strings to join. Either can be left empty; you're not required to fill both.
    • join_prompt_using (required, choice of three: "comma and space", "space", "enter" - comma and space is the default) - the separator dropped between input1 and input2. Pick "enter" if you want the two strings on separate lines rather than run together on one.
    • output (STRING, output) - the joined result. Wire it into a CLIPTextEncode, a parameter_string on an InteractiveSelectorWithParameters, or anywhere else a combined string is useful.

    How to install it

    Ships as part of the full pack, no separate install. Via ComfyUI Manager: search "ComfyUI-Interactive". Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lquesada/ComfyUI-Interactive
    

    Restart afterward. No requirements.txt, no models to fetch.

    Common issues & troubleshooting

    I was using Custom-Scripts' "String Function" node and switched to this one - why? Exactly the reason the README gives: String Function has a known issue in interactive workflows where the concatenated text doesn't display correctly without retriggering nodes, which adds friction to a workflow that's already pausing for clicks. If you've noticed that slowdown, this node is the pack's own answer to it.

    The separator isn't giving me what I expected. Double-check join_prompt_using - "comma and space" is the default and will surprise you if you were expecting a bare concatenation. Use "space" for a plain join, or "enter" if you actually want a line break between the two strings.

    One of my inputs is empty and the output looks odd. Both input1 and input2 are optional, so an empty one still gets joined with the separator - meaning you can end up with a leading or trailing separator if one side is blank. If that matters for your prompt, feed both sides something, even if one is just a space.

    Can I chain more than two strings together? Not in a single node - it only takes two inputs. Chain a second InteractiveStringAppend off the output of the first if you need to join three or more pieces.

    Categoryinteractive

    Inputs (3)

    NameTypeDefaultDescription
    join_prompt_usingCOMBOcomma and space3 options: comma and space, space, enter
    input1optSTRING
    input2optSTRING

    Outputs (1)

    NameTypeDescription
    outputSTRING