Nodes/ComfyUI Easy Use/easy promptConcat
ComfyUI Node Runs on cloud

easy promptConcat

Glue two prompt fragments together with a separator

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
easy promptConcat
    • prompt
    prompt1
    prompt2
    separator

    Two bits of text in, one joined string out, with a separator of your choosing in between. easy promptConcat is the node for building a prompt out of parts instead of writing it as one fixed block - a base description here, a style suffix there, stitched together at run time.

    It's a Prompt-category utility in ComfyUI-Easy-Use, and it's the "combine" counterpart to easy textSwitch's "choose." Where the switch picks one of two, this one merges both.

    Why you'd reach for it

    Because prompts are often modular and you don't want to duplicate the shared part. Keep a constant quality-boilerplate string ("masterpiece, best quality, detailed") and concat it onto whatever subject prompt is varying. Combine the output of a wildcard node with a fixed style tag. Assemble a caption from a subject fragment and a lighting fragment that each come from different sources. Anywhere you'd otherwise paste the same text into two prompts and then have to keep them in sync, route it through a concat and edit it once.

    How it works

    It takes prompt1, prompt2 and a separator, and outputs prompt1 + separator + prompt2. The separator is whatever you put there - a comma-space ", " is the usual choice for tag-style prompts, but it can be a newline, the word BREAK, or nothing at all. Both prompt inputs are optional, so an unconnected one just contributes an empty string, which means you can safely leave one side off. For chaining more than two fragments, stack concats - the output of one into prompt1 of the next.

    The inputs and output

    • prompt1 / prompt2 - the two text fragments (optional inputs; wire from CLIP-adjacent nodes, wildcards, or type directly).
    • separator - what goes between them. Default is empty; ", " is the sane default for comma-separated prompts.

    Output: a single prompt string. Feed it into a text-encode node or another concat.

    Installing it

    ComfyUI Manager: search ComfyUI Easy Use, install, restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use, install requirements (install.bat / pip install -r requirements.txt), restart. No models, no dependencies.

    Where people trip

    The one thing people forget is the separator, and it shows. Leave it empty and prompt1 runs straight into prompt2 with no space - blue skyforest path instead of blue sky, forest path - which can quietly change how the model reads the tags. Set it to ", " for tag prompts and you're fine. Beyond that: order matters for weighting in some models (earlier tokens carry more), so put the load-bearing part in prompt1. And if you're assembling from several sources, chaining concats is cleaner than trying to cram everything into one - small, readable steps beat one giant merge.

    CategoryEasyUse/Prompt

    Inputs (3)

    NameTypeDefaultDescription
    prompt1optSTRING
    prompt2optSTRING
    separatoroptSTRING

    Outputs (1)

    NameTypeDescription
    promptSTRING