Nodes/ComfyUI-EZ-AF-Nodes/EZ Text Concatenate
ComfyUI Node

EZ Text Concatenate

The glue for prompts that refuses to fight you

By ez-af·Created 2 years ago·Updated 3 months ago· 28
EZ Text Concatenate
    • STRING
    number_of_inputs2
    delimiter,\n
    beautifynever
    line_breakskeep

    If you build prompts the way most people eventually do - as a pile of modular chunks you swap in and out - you will spend a weird amount of time gluing strings together. EZ Text Concatenate is the node in the EZ-AF pack that does that gluing, and it exists because its author got sick of how every other dynamic concat node behaves. From the r/comfyui launch thread: he specifically hated that the one he'd been using re-shuffled its inputs whenever you changed the input count. This one doesn't. You set number_of_inputs and the existing inputs stay put; only the last slot is affected when you bump it. Small thing, huge relief in a big workflow.

    How it works

    It's a dynamic-input node: the number_of_inputs integer (2–50) decides how many text_N slots show up, and each one accepts a wired-in STRING from another node. Under the hood it joins only the non-empty inputs with whatever delimiter you set - so blank slots silently drop out instead of leaving , , breadcrumbs behind. The default delimiter is ,\n, and yes, the literal characters \n are interpreted as a real line break, so each chunk lands on its own line.

    Two settings keep your output from looking like a keyboard was dropped on the floor. beautify has three positions: before cleans each input separately then joins, after joins first and cleans the whole thing, and never leaves it all alone. The cleaning itself is sensible stuff - spaces before commas stripped, duplicate commas collapsed, a space re-added after each comma, runs of blank lines squashed to a single break. If you're feeding raw tag lists with stray commas everywhere, before is usually the one that saves you. line_breaks (keep/delete) runs last and will flatten every newline to a space if you need a single-line prompt for a model that hates line breaks in the text encoder.

    The inputs that matter

    • number_of_inputs - how many text slots appear. The one gotcha: only the last slot is affected when you change it, which is the whole point, but it means you add slots from the bottom.
    • delimiter - what goes between chunks. , for flat tag lists, ,\n for readable multi-line prompts.
    • beautify and line_breaks - your cleanup pass. never/keep are fine when your inputs are already tidy.

    The single output, STRING, is processed text - wire it straight into a positive-prompt CLIP Text Encode or a Save Text node.

    Installing it

    It ships in the EZ-AF Nodes pack, so you install the whole pack once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ez-af/ComfyUI-EZ-AF-Nodes.git
    

    then restart ComfyUI - or, easier, open ComfyUI Manager, search ez-af and hit Install. It's pure Python with only aiohttp and Pillow in requirements (those are really for the file loaders), no model downloads, no extra weights.

    Common issues

    The main thing people trip on is expecting empty inputs to be preserved - they aren't, by design, so if you need a literal empty slot to matter, this isn't the node. And if you're on a model family where your prompt is a single flat instruction line (the LLM-encoder models like Flux 2 Klein or Anima), set line_breaks to delete before you feed it in. Other than that it's about as frictionless as a text utility gets - this is the node from the pack that people actually keep.

    CategoryEZ NODES

    Inputs (4)

    NameTypeDefaultDescription
    number_of_inputsINT22–50Dynamically select number of inputs. Only the last of current inputs may be affected when this value is changed
    delimiterSTRING,\nText string to add between inputs. Does not affect empty input slots. '\n' adds a line break
    beautifyCOMBOneverdelete exscessive commas, spaces, line breaks. - before: process each text input separately - after: process concatenated text - never: do not process text
    line_breaksCOMBOkeepKeep or delete all line breaks i text string. Applies after text processing

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGProcessed text.