Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon String Combine
ComfyUI Node

πŸ€– Leon String Combine

The two-string node hiding in an API pack

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon String Combine
    • combined_string
    β—„string_1β–Ί
    β—„string_2β–Ί
    β—„linking_elementβ–Ί

    In a pack that's mostly "send money to a cloud API," this node does the opposite: no network, no key, no cost - just two strings and a gluestick. Leon_String_Combine_Node takes string_1, string_2, and a linking_element, and returns string_1 + linking_element + string_2 as a single combined_string output. That's the entire job. It's a plain utility node, the ComfyUI equivalent of a + operator, and it's here because the author clearly kept hitting the same need while wiring up their own workflows.

    Why would you reach for it? Because ComfyUI workflows get string-shaped fast, and one of the most common patterns is assembling a prompt or a path from parts. It sits naturally before an API generation node in this same pack: a Leon_String_Combine_Node concatenating a base prompt with a dynamic subject, feeding its combined_string into the prompt input of, say, Leon_Nano_Banana_API_Node. Or building a file path to feed a save node. Or gluing a filename prefix to a batch counter. The linking_element is the sneaky MVP - leave it empty for plain concatenation, set it to ", " for comma-joined prompt fragments, or "/" when you're assembling paths.

    The inputs

    All three are plain STRING fields, and they're all required by the schema:

    • string_1 - the left part.
    • linking_element - what goes between (can be empty, or ", ", " ", "-", "/"…).
    • string_2 - the right part.

    One combined_string output, which wires into any STRING input downstream.

    Installing

    Same pack as everything else here - ComfyUI Manager (search Leon) or:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/l3ony2k/comfyui-leon-nodes comfyui-leon-nodes
    pip install -r requirements.txt
    

    Restart, done. No key, no models, no nothing - this node runs entirely in Python with zero dependencies beyond what ComfyUI already ships.

    Notes

    There's not much to troubleshoot on a concatenation node. The one thing to remember is the type discipline: the inputs are STRING, so if you're feeding a number from a counter node, you'll need a node that converts to string first (or use ComfyUI's built-in text utilities). And note it only joins two strings - if you're chaining three or four fragments, you'll stack two of these nodes. It's unglamorous, but it's free and local, and in a pack full of metered API calls that's quietly its best feature.

    CategoryLeon_Utils

    Inputs (3)

    NameTypeDefaultDescription
    string_1STRINGβ€”
    string_2STRINGβ€”
    linking_elementSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    combined_stringSTRINGβ€”