📝🪡AGSoft Text Concatenate
The prompt joiner that doesn't leave empty commas behind
- STRING
Every prompt-builder workflow ends up gluing strings together, and the naive text + "," + text approach has a nasty habit: leave one field empty and you get "masterpiece, , highly detailed" - stray commas and double spaces that quietly pollute your conditioning. 📝🪡AGSoft Text Concatenate is the pack's flexible string-joiner that handles that by default: it cleans whitespace, skips empty strings, and only inserts the delimiter between the strings that actually exist. It manages 2 to 32 inputs dynamically, so it grows with your workflow instead of forcing you to guess a fixed count.
How it works
It's the big brother of the pack's fixed X2/X4/X8 concatenates. The inputs are created dynamically by frontend JS based on number_of_inputs (2–32) - set it to 7 and you get text_1 through text_7, no dead sockets. The execution pipeline is where the quality lives:
- clean_whitespace (default on) - strips leading/trailing whitespace from each input.
- ignore_empty_strings (default on) - drops anything empty or whitespace-only.
- delimiter - the separator, chosen from 15 presets (
",","New Line","Space"," | ", and more) or"custom"for your own. - custom_delimiter - the free-text field, active only when delimiter is
"custom". Supports escape sequences:\n(newline),\t(tab),\r. - reverse_order (default off) - flips the join order (last input first). Handy when a downstream node reads prompts newest-first.
The output is a single STRING - the joined result.
What you'll actually set
- number_of_inputs - grow the field count to match your prompt parts.
- delimiter - this is the one you'll touch constantly.
", "is what most people want for prompt fragments;"New Line"if you're building a multi-paragraph structure. The" - "and" :: "presets are aimed at tag-style joins. - ignore_empty_strings - leave on. Turn it off only if you want empty entries represented (e.g. you're joining for CSV-style output and need positional slots).
Installing and gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft
Restart, or ComfyUI Manager → "comfyui-AGSoft". No models.
The one trap: because custom delimiters go through escape processing, a literal \n in your custom field becomes a newline - which is what you want 99% of the time, but if you ever need a literal backslash-n in the output you'll have to double it. And remember this is the dynamic variant: if you know you'll always join exactly 4 strings, the fixed X4 is the tidier, less-widget-y choice. Use the dynamic one when the count changes between workflows.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| number_of_inputs | INT | 22–32 | Number of text inputs to create (2-32). Each input will be named text_1, text_2, etc. Example: number_of_inputs=3 → creates text_1, text_2, text_3 Inputs are managed dynamically via frontend JS. --- Количество текстовых входов (2-32). Каждый вход будет называться text_1, text_2 и т.д. Пример: number_of_inputs=3 → создаются text_1, text_2, text_3 Входы управляются динамически через JS на фронтенде. |
| reverse_order | BOOLEAN | false | If true, concatenates strings in reverse order (from last active input to first). Example: text_1='A', text_2='B', text_3='C' → result will be 'C, B, A' --- Если включено, объединяет строки в обратном порядке (от последнего активного входа к первому). Пример: text_1='A', text_2='B', text_3='C' → результат будет 'C, B, A' |
| delimiter | COMBO | , | The separator used between concatenated strings. Choose from presets or 'custom'. Presets: - 'custom' : Enter your own delimiter in the next field. Supports escape sequences: \n (newline), \t (tab), \r (carriage return). - 'New Line X2' : Inserts a blank line (\n\n) for visual spacing between paragraphs. --- Разделитель. 'custom' поддерживает \n, \t, \r. 'New Line X2' вставляет \n\n. |
| custom_delimiter | STRING | Enter a custom delimiter if 'custom' is selected above. Supports \n, \t, \r. --- Пользовательский разделитель. Поддерживает \n, \t, \r. | |
| clean_whitespace | BOOLEAN | true | Strip leading/trailing whitespace. / Удалить пробелы по краям. |
| ignore_empty_strings | BOOLEAN | true | Skip empty strings (including whitespace-only). / Пропускать пустые строки (включая состоящие только из пробелов). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | Concatenated text result. / Результат объединения. |