ComfyUI Node

weightMultiText

The weighted prompt combiner that grows to 20 blocks

By sp8999·Created 6 months ago·Updated 6 months ago· 8
weightMultiText
    • text
    text_count1
    text_1
    weight_11.00
    text_2
    weight_21.00
    text_3
    weight_31.00
    text_4
    weight_41.00
    text_5
    weight_51.00
    text_6
    weight_61.00
    text_7
    weight_71.00
    text_8
    weight_81.00
    text_9
    weight_91.00
    text_10
    weight_101.00
    text_11
    weight_111.00
    text_12
    weight_121.00
    text_13
    weight_131.00
    text_14
    weight_141.00
    text_15
    weight_151.00
    text_16
    weight_161.00
    text_17
    weight_171.00
    text_18
    weight_181.00
    text_19
    weight_191.00
    text_20
    weight_201.00

    weightMultiText is weight3Text with the training wheels off: instead of exactly three fixed blocks, you get a dynamic count - up to 20 - and every block gets its own emphasis slider. Same mechanism, same (text:weight) wrapping, just scaled up and made configurable. If your prompt has more than three moving parts and you're tired of hand-editing weight syntax, this is the node.

    How it works

    The schema holds a hidden text_count (1–20, default 1) plus up to 20 pairs: text_N (multiline) and weight_N (float, 0–1.95, step 0.05, default 1). As with multiText, a bundled JS extension hides the count widget, shows or hides the blocks to match, and patches graphToPrompt so the dynamically-created widgets' values are actually saved into the workflow file. Without that patch, the blocks beyond text_1 would vanish when you saved and reloaded - worth knowing if you ever hand-edit a workflow JSON and wonder where the values went.

    At runtime each block goes through the same apply_weight rule as weight3Text: weight 1 → text passes through unwrapped; anything else → wrapped as (text:1.35); empty text or weight 0 → skipped. The survivors join with ", " into one string output. Dropping a block's weight to 0 is a clean way to disable it without deleting the text.

    Inputs that matter:

    • text_1 … text_20 - multiline blocks.
    • weight_1 … weight_20 - per-block emphasis, 0–1.95.
    • text - the output, comma-joined and wrapped.

    Two caveats worth remembering

    • Only the first two slots convert to inputs. The README says it plainly: "Slots after the 2nd cannot be converted to inputs." So you can wire another node's output into text_1 (and text_2), but blocks 3+ are widget-only. If your fragments mostly come from other nodes, reach for multiTextConcat instead and keep the weighting for the parts you type.
    • The emphasis is CLIP-only. (text:weight) is parsed by CLIP-era text encoders - SD 1.5, SDXL, Pony, Illustrious. On LLM-encoded models (Anima, Chroma, and friends) it's not a control signal; it's fed to the encoder as literal punctuation, which actively hurts. Weighted combining is a CLIP-model tool, and the prompt-engineering knowledge base is clear that nothing about it transfers to the LLM encoders. Use this node on CLIP models and write plain prose elsewhere.

    vs. the siblings

    weightMultiText is the flexible version of weight3Text - same wrap-and-join logic, dynamic count. Compared to plain multiText (no weights), it's the choice when emphasis is actually part of your prompt strategy. If you mostly use it for the sliders' A/B testing and never go past three blocks, you might as well save a click and use weight3Text.

    Installation

    No dependencies, no model downloads - it's pure text logic plus a JS file. ComfyUI Manager → search ComfyUI-Text-Utils-sp → Install → restart, or:

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

    It lands in the text_utils_sp category. README caveat applies here more than anywhere: it's tuned for the Nodes 2.0 frontend, and on the older v1 renderer the dynamic widgets work but can render at the wrong size.

    Categorytext_utils_sp

    Inputs (41)

    NameTypeDefaultDescription
    text_countINT11–20
    text_1STRING
    weight_1FLOAT1.000–1.95
    text_2optSTRING
    weight_2optFLOAT1.000–1.95
    text_3optSTRING
    weight_3optFLOAT1.000–1.95
    text_4optSTRING
    weight_4optFLOAT1.000–1.95
    text_5optSTRING
    weight_5optFLOAT1.000–1.95
    text_6optSTRING
    weight_6optFLOAT1.000–1.95
    text_7optSTRING
    weight_7optFLOAT1.000–1.95
    text_8optSTRING
    weight_8optFLOAT1.000–1.95
    text_9optSTRING
    weight_9optFLOAT1.000–1.95
    text_10optSTRING
    weight_10optFLOAT1.000–1.95
    text_11optSTRING
    weight_11optFLOAT1.000–1.95
    text_12optSTRING
    weight_12optFLOAT1.000–1.95
    text_13optSTRING
    weight_13optFLOAT1.000–1.95
    text_14optSTRING
    weight_14optFLOAT1.000–1.95
    text_15optSTRING
    weight_15optFLOAT1.000–1.95
    text_16optSTRING
    weight_16optFLOAT1.000–1.95
    text_17optSTRING
    weight_17optFLOAT1.000–1.95
    text_18optSTRING
    weight_18optFLOAT1.000–1.95
    text_19optSTRING
    weight_19optFLOAT1.000–1.95
    text_20optSTRING
    weight_20optFLOAT1.000–1.95

    Outputs (1)

    NameTypeDescription
    textSTRING