Nodes/comfyui-AGSoft/📝🪡AGSoft Text Concatenate X2
ComfyUI Node

📝🪡AGSoft Text Concatenate X2

Join exactly two strings without the stray-comma disease

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
📝🪡AGSoft Text Concatenate X2
    • STRING
    text_1
    text_2
    reverse_orderfalse
    delimiter,
    custom_delimiter
    clean_whitespacetrue
    ignore_empty_stringstrue

    The smallest member of the AGSoft concatenate family, and the one you'll use when the answer is genuinely "two strings." 📝🪡AGSoft Text Concatenate X2 joins text_1 and text_2 with a configurable separator - and, crucially, it skips empties by default, so "" + "sunset" gives you "sunset" and not ", sunset". It's the polite way to bolt a quality tag onto a base prompt.

    How it works

    Two multiline text inputs, one output (STRING). The processing is the same clean pipeline as the rest of the family:

    • clean_whitespace (on by default) strips leading/trailing spaces from each input.
    • ignore_empty_strings (on by default) drops any input that ends up empty - so joining with blank fields doesn't litter your prompt with bare delimiters.
    • delimiter - pick from the same 15 presets (, default, ".", "New Line", "Space", " | ", etc.) or "custom".
    • custom_delimiter - free text, used only when delimiter is "custom"; supports \n, \t, \r escapes.
    • reverse_order - swap the join order if you need text_2 first.

    Why pick X2 over the dynamic node

    Because it's less machinery. The dynamic AGSoftTextConcatenate grows 2–32 inputs with a JS widget; the X2 is a fixed, static pair of fields with the same delimiter machinery and no extra widgets to configure. For a stable "base prompt + quality suffix" join that sits in every workflow, the fixed node is easier to read and one less thing to accidentally mis-set.

    The pragmatic use: a prompt-prefix/suffix sandwich. Wire your main prompt into one field, a fixed set of quality tags into the other with a ", " delimiter, and the empty-skip handles the case where one side is blank - you can even drive one field from another node's output and let the other be static.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/Art-xmaster/comfyui-AGSoft
    

    Restart ComfyUI, or ComfyUI Manager → "comfyui-AGSoft". No models, nothing special. If your joined output has a comma at the start, it's the classic forgot-clean_whitespace/empty-skip setup reversed - check that the fields are actually feeding what you think, since whitespace-only strings get dropped just like truly empty ones.

    CategoryAGSoft/Text

    Inputs (7)

    NameTypeDefaultDescription
    text_1STRINGThe 1st text string to concatenate. / 1-я текстовая строка для объединения.
    text_2STRINGThe 2nd text string to concatenate. / 2-я текстовая строка для объединения.
    reverse_orderBOOLEANfalseIf 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'
    delimiterCOMBO,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). - ',' : Comma separator. - '.' : Period separator. - 'New Line' : Inserts a line break (\n) in the output. - 'New Line X2' : Inserts a blank line (\n\n) for visual spacing between paragraphs. - 'Space' : Inserts a single space character. - ';' : Semicolon separator. - '|' : Vertical bar separator. - ' - ' : Dash with spaces. - ' | ' : Pipe with spaces. - ' :: ' : Double colon with spaces. - ' >>> ' : Triple greater-than with spaces. - ' • ' : Bullet point with spaces. - ' — ' : Em dash with spaces. - ' ... ' : Ellipsis with spaces. --- Разделитель, используемый между объединяемыми строками. Выберите из предустановленных вариантов или 'custom'. Предустановленные значения: - 'custom' : Введите свой собственный разделитель в следующем поле. Поддерживает escape-последовательности: \n (перенос строки), \t (табуляция), \r (возврат каретки). - ',' : Запятая. - '.' : Точка. - 'New Line' : Вставляет перенос строки (\n) в выводе. - 'New Line X2' : Вставляет пустую строку (\n\n) для визуального разделения абзацев. - 'Space' : Вставляет один пробел. - ';' : Точка с запятой. - '|' : Вертикальная черта. - ' - ' : Дефис с пробелами. - ' | ' : Пайп с пробелами. - ' :: ' : Двойное двоеточие с пробелами. - ' >>> ' : Три знака больше с пробелами. - ' • ' : Эмодзи-точка с пробелами. - ' — ' : Длинное тире с пробелами. - ' ... ' : Многоточие с пробелами.
    custom_delimiterSTRINGEnter a custom delimiter if 'custom' is selected above. Ignored otherwise. Supports escape sequences: \n (newline), \t (tab), \r (carriage return). Example: '\n\n' for blank line, ' | ', '---', or even an emoji like '⭐'. --- Введите пользовательский разделитель, если выше выбрано 'custom'. Игнорируется в противном случае. Поддерживает escape-последовательности: \n (перенос строки), \t (табуляция), \r (возврат каретки). Пример: '\n\n' для пустой строки, ' | ', '---', или даже эмодзи, например '⭐'.
    clean_whitespaceBOOLEANtrueIf true, removes leading and trailing whitespace from each input string before concatenation. Example: ' hello ' → 'hello' --- Если установлено, удаляет начальные и конечные пробелы из каждой входной строки перед объединением. Пример: ' hello ' → 'hello'
    ignore_empty_stringsBOOLEANtrueIf true, empty strings (or strings that become empty after cleaning whitespace) will be ignored and not included in the final result. This includes strings containing only spaces, tabs, or newlines. --- Если установлено, пустые строки (или строки, которые становятся пустыми после очистки пробелов) будут проигнорированы и не будут включены в конечный результат. Это включает строки, состоящие только из пробелов, табуляций или переносов строк.

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGConcatenated result of 2 input strings. / Результат объединения 2 входных строк.