Nodes/ComfyUI_Eclipse/String Multiline
ComfyUI Node

String Multiline

Paste a big block of text, get one clean line out

By r-vageΒ·Created 10 months agoΒ·Updated a day agoΒ· 31
String Multiline
    • string
    β—„stringβ–Ί
    β—„input_stringβ€”β–Ί

    ComfyUI is not a text editor, and trying to use a prompt node as one gets awkward fast. String Multiline is the fix for the specific annoyance of writing multi-line prompts in single-line fields: it gives you a proper multiline text box and joins every line into one space-separated string on output. Paste in your nicely formatted, line-broken prompt, and out comes a single clean line ready for a CLIP Text Encode - no stray newlines leaking into your conditioning.

    The mechanism is exactly as billed. The string widget is the multiline input; on execute, it splits the content into lines, strips each, drops empty ones, and joins them with spaces. There's also an optional input_string input - a normal single-line socket - that gets prepended to whatever you typed in the box. Both go into the same string output. It's two lines of logic, and it's precisely what you want from a utility node: no surprises.

    How it works

    • string - your multiline text. Lines are joined with spaces.
    • input_string (optional) - a wired-in string that's prepended to the multiline content. Handy for injecting a value from elsewhere without typing it.
    • string (output) - the joined result.

    The join behavior is worth internalizing: a paragraph of prose entered as separate lines comes out as a normal sentence. That's usually what you want for prompts, and it also means you can paste in a formatted description and have it collapse cleanly. If you ever need the lines as a list and the joined string, the sibling String Multiline List node gives you both.

    Where it fits

    Anywhere you type more than one line of text into a generation workflow. Long prompts, negative prompt blocks, a notes field you want to keep in the graph, a caption you'll reuse - String Multiline is the comfortable place to hold them. Because the output is a plain STRING, it feeds anything: CLIP encoders, Smart Prompt, Show Text for checking, or String DeDuplicate before it hits the encoder.

    Installing it

    Part of ComfyUI_Eclipse, no dependencies:

    git clone https://github.com/r-vage/ComfyUI_Eclipse custom_nodes/ComfyUI_Eclipse
    

    Or ComfyUI Manager β†’ search "ComfyUI_Eclipse" β†’ install and restart.

    Gotchas

    The join-with-spaces behavior can surprise you if you were expecting newlines preserved - this node deliberately collapses them, so don't use it to carry formatted text that must keep its line breaks (for that, keep a Show Text or a raw string). And the optional input_string prepends with a space separator, so no manual spacer needed. One family note: old pre-v4.0.0 RvTools-era node IDs need the migration tool; new workflows are fine.

    CategoryπŸŒ’ Eclipse/ Text

    Inputs (2)

    NameTypeDefaultDescription
    stringSTRINGMultiline string input. Lines are joined with spaces.
    input_stringoptSTRINGOptional string input to prepend to the multiline content.

    Outputs (1)

    NameTypeDescription
    stringSTRINGβ€”