Nodes/ComfyUI-Desert-Pixel-Nodes/DP Advanced Weight String SDXL
ComfyUI Node

DP Advanced Weight String SDXL

Numeric or bracket weighting, your choice

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP Advanced Weight String SDXL
    • STRING
    mode
    weight1.0
    symbol_count1
    text

    The grown-up version of the basic weight node. Same core job - wrap a string in SDXL prompt-weighting so a phrase gets more or less attention - but here you choose how the weight is written, and the range is sensibly capped. If you've been hand-typing (phrase:1.3) or stacking ((phrase)) brackets and want a node to do it consistently, this is the one.

    It's from DesertPixelAi's Desert-Pixel-Nodes pack, a large set of quality-of-life tools. It generates nothing; it's a text formatter. The "advanced" tag is earned by two things the basic node lacks: a mode switch between numeric and bracket weighting, and a weight range that tops out at 2 instead of an absurd 10 - a small sign someone thought about what values actually make sense.

    How it works

    You give it text and a weight, and pick a mode:

    • NUMERIC - produces the explicit colon form, e.g. (phrase:1.3). Precise and readable.
    • PLUS/MINUS - produces the bracket form instead, using symbol_count to decide how many brackets to stack. This is the old A1111-style (phrase) / ((phrase)) emphasis, where each layer nudges attention a little.

    Both styles mean the same thing to a CLIP encoder; NUMERIC just lets you dial an exact value while PLUS/MINUS works in coarse steps. Pick whichever matches how you like to read your prompts.

    Same hard caveat as every SDXL-weight node: this only does anything on CLIP-based models - SD 1.5, SDXL, Illustrious, Pony, NoobAI, WAI. On LLM-encoded models (Flux 2, Z-Image, Qwen-based), weight syntax is discarded and the brackets end up as literal characters in your instruction. Use it on the CLIP lineage; skip it elsewhere.

    The inputs and outputs that matter

    • mode - NUMERIC for (text:weight), PLUS/MINUS for stacked brackets.
    • weight - a float from 0 to 2, applied in NUMERIC mode. Capped at 2, which is already past the useful range; stay near 0.5-1.5 in practice.
    • symbol_count - an integer from 1 to 3, controlling how many brackets stack in PLUS/MINUS mode.
    • text - the optional multiline string to wrap.

    Output is STRING - your weighted text. Wire it into a CLIP Text Encode or concatenate it into a larger prompt.

    How to install it

    • ComfyUI Manager: search "Desert Pixel", install, restart. No models to fetch.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes, pip install -r requirements.txt if present, restart.

    Find it under the DP category.

    Common issues

    Bracket weighting compounds, and that catches people. Three stacked brackets in PLUS/MINUS mode is roughly (phrase:1.33), but people assume it's a bigger jump than it is - or push symbol_count to 3 and then also crank NUMERIC weight elsewhere and wonder why the image fried. Pick one weighting approach per phrase and keep it gentle.

    And, again, the wrong-encoder problem. If weighting seems to have no effect, confirm you're on a CLIP model. On an LLM-encoded model this node can't help you emphasize anything - restate the important part of your prompt in plain words and put it early instead. That's the modern equivalent of weighting on those models.

    CategoryDP/String

    Inputs (4)

    NameTypeDefaultDescription
    modeCOMBO2 options: NUMERIC, PLUS/MINUS
    weightFLOAT1.00–2
    symbol_countINT11–3
    textoptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING