Nodes/comfyui_LLM_party/String Combine
ComfyUI Node

String Combine

Merge up to three text inputs into one string

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
String Combine
    • files
    is_enabletrue
    file1
    file2
    file3

    Every LLM workflow eventually needs to glue a few pieces of text into one blob before it hits the model - a loaded file plus a user question, a search result plus a system instruction, three snippets that need to become one prompt. String Combine is the plain, no-nonsense node in comfyui_LLM_party for exactly that: up to three text inputs go in, one string comes out.

    How it works

    There's essentially no logic here beyond concatenation. Connect what you have, leave the rest disconnected, and the node stitches the connected ones together into a single output string.

    The inputs and outputs that matter

    • file1, file2, file3 - all optional STRING inputs, despite the "file" naming (a holdover from the node being built for combining loaded file contents - it works on any string, not just file output). Connect one, two, or all three; there's no requirement to fill every slot.
    • is_enable - the pack's standard on/off toggle for bypassing the node.

    Output: files (STRING) - the combined result, ready to feed into an LLM node's prompt, a knowledge-base writer, or any other text input in the graph.

    If you find yourself needing more than three pieces, the pack ships a bigger sibling - Large String Combine - with ten slots instead of three.

    How to install it

    Search comfyui_LLM_party in ComfyUI Manager and install, or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/heshengtao/comfyui_LLM_party.git
    

    From inside the pack's folder, run pip install -r requirements.txt with ComfyUI's own Python interpreter (not your system one), then restart. This particular node has zero dependencies of its own - it's pure string logic - but it ships bundled with the rest of a large pack that pulls in LLM client libraries, embeddings, OCR, and TTS packages all in one requirements.txt. If that install collides with something else in your environment, the README's requirements_fixed.txt has pinned versions as a fallback, and the pack's own config.ini handles API keys separately from this node entirely - you won't need to touch either just to use String Combine.

    Common issues & troubleshooting

    Output looks jammed together with no separator. Concatenation nodes like this one typically don't insert anything between inputs on their own - if you need a space, newline, or label between pieces, build that into the text going into file1/file2/file3 yourself (a trailing space or \n at the end of one string), rather than expecting the node to add formatting for you.

    Nothing happens, output is empty. Double-check at least one of the three inputs is actually connected - with all three left as optional and unwired, there's nothing for the node to combine.

    You need dynamic formatting, not just concatenation. If what you actually want is placeholder substitution - dropping a value into the middle of a template string rather than appending pieces end to end - reach for the pack's Custom String Format node instead; this one only appends.

    Category大模型派对(llm_party)/组合(combine)

    Inputs (4)

    NameTypeDefaultDescription
    is_enableBOOLEANtrue
    file1optSTRING
    file2optSTRING
    file3optSTRING

    Outputs (1)

    NameTypeDescription
    filesSTRING