Nodes/Comfyui_PDuse/PD Join String Multi Line
ComfyUI Node

PD Join String Multi Line

Glue two text boxes together with a newline — the plumbing you'll actually use

By 7BEII·Created 2 years ago·Updated 15 days ago· 53
PD Join String Multi Line
    • combined_string
    string_1
    string_2

    A node that concatenates two strings with a newline between them is not exciting. But "not exciting" is exactly the right energy for most of a ComfyUI workflow - the KB's plumbing doc makes the point that 70% of a graph is these invisible connectors. PD_JoinStringMultiLine is one of them: two multiline text inputs, one combined string out, nothing else. It lives in the 7BEII/Comfyui_PDuse pack, which is a grab-bag of exactly this kind of utility, and for once the display name ("PD Join String Multi Line") is accurate.

    How it works

    It joins string_1 and string_2 with a \n in the middle. The one bit of thoughtfulness: if either input is empty, it returns the other one alone, so you never get a leading or trailing blank line polluting your prompt. That's the difference between this and a dumb s1 + "\n" + s2 concat - a blank line in a prompt can actually matter when you're feeding captions or Lora-trigger-word blocks into a tokenizer.

    Both inputs are declared with forceInput, which means they're always sockets rather than widgets - you wire the parts in from other nodes, and the values flow rather than being typed. That makes it a natural building block for composing prompts from fragments: positive prompt in one port, a LoRA trigger word or quality block in the other, out pops the combined text that feeds your CLIP Text Encode.

    The inputs and output

    • string_1 - STRING, multiline, wired input.
    • string_2 - STRING, multiline, wired input.
    • combined_string - STRING out, string_1 + "\n" + string_2.

    That's the whole schema. Two in, one out, one newline. If you need to join more than two things, you chain two of these, or better, look at a purpose-built text-join node - this one is deliberately minimal.

    Installing

    Via ComfyUI Manager (search Comfyui_PDuse), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/7BEII/Comfyui_PDuse
    cd Comfyui_PDuse
    pip install -r requirements.txt
    

    Restart after. No models, no heavy deps beyond what ComfyUI already ships.

    Gotchas

    Honestly, not much to trip on. The node is so small that the only real complaint is the pack's Chinese README and its naming inconsistency - you'll find it under "PD Nodes" in the node menu. One thing to note: because it's a newline joiner, it's meant for multiline prompts and caption blocks, not for building a single-line tag string. If you want tag1, tag2, tag3 on one line, you'd join with a comma, which this node can't do - it's hardcoded to the newline. For that you'd reach for a different text-combine node. But for stacking a multi-line positive prompt or merging two caption files, this is a perfectly good, zero-drama little connector.

    CategoryPD Nodes

    Inputs (2)

    NameTypeDefaultDescription
    string_1STRING
    string_2STRING

    Outputs (1)

    NameTypeDescription
    combined_stringSTRING