Nodes/ComfyUI-Text/CombinationText
ComfyUI Node

CombinationText

Glue two prompt strings together with a separator you control

By MarkoCa1·Created 2 years ago·Updated 2 years ago· 9
CombinationText
    • text
    text1
    text2
    connector,

    CombinationText takes two strings and a connector and joins them with str.join. Two inputs, one output, one knob - it's the "just glue it" node of ComfyUI-Text, a pack whose entire reason for existing is that the author wanted text operations without installing any heavyweight dependency. It's about as simple as a ComfyUI node gets, and it's genuinely useful anyway.

    Why you'd reach for it: prompt fragments. ComfyUI gives you one text box per CLIP Text Encode node, and the moment you want a shared base prompt with a swappable tail - same subject, different style suffix; same character, different scene - you're either duplicating text or building the string from parts. CombinationText is the parts approach in its dumbest form: text1 + connector + text2. Put your base in text1, wire the style or quality tags into text2, and you can batch variants without editing a wall of text every time.

    How it works: mechanically boring, which is the point. The source is texts = [text1, text2] then connector.join(texts) - Python's built-in join, nothing else. The default connector is a comma, and that matters more than it looks. Tag-based models (Pony, Illustrious and their derivatives) expect comma-separated tokens, and a missing comma is a classic silent prompt bug - the model just reads two words as one token. This node makes the separator explicit instead of trusting you to type it right.

    The inputs that matter:

    • text1 / text2 - multiline strings. Type in them or wire strings in from upstream nodes (right-click → Convert to input).
    • connector - the separator, default ",". The only knob you'll actually touch. Leave it as a comma for tag prompts; switch to ", " (comma-space) if you're building human-readable sentences or feeding an LLM-based encoder.
    • Output: text (STRING) - wire it into CLIP Text Encode or anywhere a string is accepted.

    Two honest limits. It joins exactly two strings - no lists, no three-way merge. Stack two CombinationText nodes if you need to chain more fragments. And it's dumb concatenation, not a template: if you want values slotted into fixed surrounding text, its sibling PlaceholderText does that (its default template $1,$2 produces exactly this node's comma-join, so the overlap is deliberate).

    Install is genuinely light:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MarkoCa1/ComfyUI-Text
    # restart ComfyUI
    

    Or use ComfyUI Manager → search ComfyUI-Text → Install, then restart. requirements.txt is empty, so there are no pip packages and no model files to chase. The only thing the pack runs on startup is a tiny script that copies one JS file for its sibling ShowText node into web/extensions/Comfy-MK - automatic, nothing for you to do.

    Troubleshooting is almost a non-topic. Trailing newlines in the multiline boxes can sneak an extra line break into your prompt - worth a glance if your output suddenly has odd line breaks. If a shared workflow says CombinationText is missing, install the pack through Manager and restart ComfyUI to refresh the node search path. The README itself contains no usage docs, just a screenshot and a sentence, so this page is effectively the documentation. The pack has no real community footprint - if you're here you probably found it through the author's other, better-known pack, ComfyUI_Segment_Mask. CombinationText is for the boring, reliable 80% case: join two strings, with a separator you control. If you need randomized wildcards, that's a different tool - this one is the steady, predictable glue.

    CategoryMK/text

    Inputs (3)

    NameTypeDefaultDescription
    text1STRING
    text2STRING
    connectorSTRING,

    Outputs (1)

    NameTypeDescription
    textSTRING