Nodes/ComfyUI-BadmanNodes/Concat String (Badman)
ComfyUI Node

Concat String (Badman)

Glue two strings together, with a newline option

By MariusKM·Created 2 years ago·Updated 3 months ago· 4
Concat String (Badman)
    • STRING
    string_field_0Hello
    string_field_1World
    newline

    About as simple as a node gets: two string inputs go in, one combined string comes out, and you get a toggle for whether they're joined with a newline between them or just stuck together. The README is upfront about the intended use - combining tokens from BLIP or CLIP interrogation - and that's genuinely the case where this earns a spot in your graph over a generic string-join.

    Why a dedicated node for this

    Image captioners like BLIP and CLIP interrogation tools tend to produce their output as separate pieces - a general description here, a style or quality tag list there - and you often want to hand a single combined string to a CLIPTextEncode rather than juggling two separate string wires into one prompt field. This node is that join step, deliberately basic so it drops into a captioning-to-prompt pipeline without any surprises. It's also just a handy general-purpose glue node any time you've got two string outputs - a fixed prefix and a wildcard-resolved suffix, a style tag block and a scene description - that you want combined before they hit whatever consumes them next.

    Inputs and outputs

    Three required fields:

    • string_field_0 (multiline, default "Hello") - the first string.
    • string_field_1 (multiline, default "World") - the second string.
    • newline (boolean) - when on, the two strings are joined with a line break between them; when off, they're concatenated directly with no separator added.

    One output: the combined STRING.

    Installing it

    ComfyUI Manager: search ComfyUI-BadmanNodes, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MariusKM/ComfyUI-BadmanNodes
    

    Nothing else to install - this is string concatenation, there's no model, no dependency, no download.

    Where people get tripped up

    The one thing worth knowing going in: newline on is a hard line break, not a comma or space. If you're chaining captioner output into a tag-based prompt (Illustrious, Pony, NoobAI and similar SDXL-derived checkpoints all expect comma-separated tags), a newline in the middle of your prompt string usually reads fine to the text encoder but can look messy if you're also logging or displaying the combined string elsewhere - and if you're instead targeting one of the newer LLM-encoded models where your prompt is read more like an instruction than a tag bag, a genuine line break between two blocks of text (say, a tag block and a natural-language description) is often exactly the separation you want, not a formatting accident. Pick the toggle based on what you're actually feeding downstream, not out of habit. And because newline with no separator on the "off" side means a truly direct concatenation, forgetting a trailing space in string_field_0 when you want the two joined as ordinary prose will produce a squashed-together compound word - worth a glance at the output string before assuming the join went cleanly.

    CategoryBadman

    Inputs (3)

    NameTypeDefaultDescription
    string_field_0STRINGHello
    string_field_1STRINGWorld
    newlineBOOLEAN

    Outputs (1)

    NameTypeDescription
    STRINGSTRING