ComfyUI Node

multiText

One node, up to 20 prompt boxes, no more node-spam on the canvas

By sp8999·Created 6 months ago·Updated 6 months ago· 8
multiText
    • text
    text_count1
    text_1
    text_2
    text_3
    text_4
    text_5
    text_6
    text_7
    text_8
    text_9
    text_10
    text_11
    text_12
    text_13
    text_14
    text_15
    text_16
    text_17
    text_18
    text_19
    text_20

    The classic ComfyUI text problem: you've got four separate prompt fragments - subject, style, background, quality tags - and you want them all in one positive prompt without dragging four separate nodes into your sampler. multiText is the pack's answer: one node with a text box per fragment, all combined into a single string when it runs. It's the no-frills version of this pack's combiners, which is exactly why it's the one you'll reach for most.

    How it works

    The node defines up to 20 text inputs (text_1 through text_20), all multiline, plus a hidden text_count integer (1–20, default 1) that decides how many are active. When it runs, it takes every non-empty box in order and joins them with ", " - the standard comma-space that CLIP tag prompting expects. Empty boxes are skipped, so you don't get stray commas or dangling separators.

    The frontend is where the magic (and one limitation) lives. A bundled JS extension hides the text_count widget and shows or hides the text boxes to match the count you set, and it patches graphToPrompt so the dynamically-created widget values actually get saved into your workflow file. That patching is the part that matters when you share a workflow: without it, the extra boxes' contents wouldn't survive a save and reload.

    The inputs that matter:

    • text_1 - required, multiline.
    • text_2 … text_20 - optional, appear as you raise the count.
    • text - the output, a single STRING, comma-joined.

    The one real limitation

    The README is upfront about it: "Slots after the 2nd cannot be converted to inputs." In practice that means you can wire another node's output into text_1 and text_2, but blocks 3+ are widget-only - you can't turn text_3 into a socket. If your fragments come from other nodes rather than from your typing, you want multiTextConcat instead, which is the connector-only variant of this same design.

    Where it fits

    This is pure plumbing - no pixels touched, no models loaded, no dependencies beyond the pack itself. Use it to keep a prompt readable: a box for score_9, score_8_up quality tags, a box for the subject, a box for the style, one output into your CLIP Text Encode. It's also handy for A/B-ing fragments, since you can clear one box and leave the others untouched.

    One honest caveat from the prompt-engineering playbook: comma-joining assumes a tag-based, CLIP-encoded model. If your model's text encoder is an LLM (Anima, Chroma, and friends), the comma-joined tag soup still works as text, but you'd often get better structure by writing it as prose - the joining is on you, not the node.

    Installation

    No dependencies, no downloads. Through ComfyUI Manager (search ComfyUI-Text-Utils-sp) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sp8999/ComfyUI-Text-Utils-sp.git
    

    Restart ComfyUI and you'll find multiText in the text_utils_sp category. One README note: it's optimized for the Nodes 2.0 frontend - on the older v1 renderer the dynamic widgets still work but can render at the wrong size.

    Categorytext_utils_sp

    Inputs (21)

    NameTypeDefaultDescription
    text_countINT11–20
    text_1STRING
    text_2optSTRING
    text_3optSTRING
    text_4optSTRING
    text_5optSTRING
    text_6optSTRING
    text_7optSTRING
    text_8optSTRING
    text_9optSTRING
    text_10optSTRING
    text_11optSTRING
    text_12optSTRING
    text_13optSTRING
    text_14optSTRING
    text_15optSTRING
    text_16optSTRING
    text_17optSTRING
    text_18optSTRING
    text_19optSTRING
    text_20optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING