Nodes/ComfyUI-Desert-Pixel-Nodes/DP String Text With SDXL Weight
ComfyUI Node

DP String Text With SDXL Weight

Text plus attention-weight formatting

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP String Text With SDXL Weight
    • TEXT
    Widget_Input
    weight1.0
    String_01

    Same idea as this pack's plain DP String Text node, with one addition: a weight slider that formats your text with CLIP-style attention-weight syntax - the (keyword:1.3) pattern that pushes an SDXL, SD 1.5, or Illustrious-lineage model to pay more (or less) attention to a specific chunk of your prompt. If you're used to typing that syntax by hand, this node is a slider that does the parenthesizing for you.

    How it works

    Type your text into Widget_Input (or feed one in via the optional String_01, same as the plain string node), set weight (-10 to 10, default 1), and the output comes back formatted with that weight applied - the equivalent of wrapping your text in (text:weight) syntax by hand. Values above 1 increase attention on that text, values below 1 decrease it, and negative values push the model away from the concept rather than toward it.

    Know your architecture before you reach for this. This syntax does real work on CLIP-based text encoders - SD 1.5, SDXL, and the whole Illustrious/Pony/NoobAI/WAI lineage. It does nothing on 2026's LLM-encoded models (Z-Image, Anima, Flux 2 Klein, Krea 2): those encoders read your prompt as an instruction, not a token bag with weights, and the parentheses-and-colon syntax isn't stripped or interpreted - it gets fed straight through as literal punctuation. On those models, a weighted string from this node isn't inert, it's actively worse than plain text, because the model now has to make sense of stray characters it was never trained to parse. Community-tested practical range for the syntax where it does work: 0.5-1.5. Push much past 1.5 and you get oversaturation and artifacts rather than more emphasis.

    Inputs and outputs

    Required:

    • Widget_Input (multiline text, default empty).
    • weight (-10 to 10, default 1, step 0.1).

    Optional:

    • String_01 (multiline text) - feed a string in from upstream instead of typing it.

    One output: TEXT (STRING) - your text, formatted with the weight applied.

    Installing it

    ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes
    

    Restart ComfyUI - text formatting only, nothing to download.

    Where people get tripped up

    The big one is architecture mismatch, covered above: this node is built for CLIP-family checkpoints. If you're running a 2026 LLM-encoded model and wondering why weighting your subject harder isn't changing anything - or is making results worse - that's expected, not a bug in this node. Switch to plain DP String Text and say what you want in words instead; word order and structure are what actually steer those models.

    Second: weight set to exactly 1 produces the same text as the plain string node would, formatting-wise - there's no visual difference at neutral weight, so don't expect a weight of 1 to look any different from skipping this node entirely. And stacking multiple weighted strings from this node inside one larger prompt (nested or back-to-back) is the same trap as manually stacking parentheses by hand - (((concept)))-style compounding causes artifacts even on models where weighting works correctly. Set the weight value directly rather than chaining several of these nodes to compound the effect.

    CategoryDP/text

    Inputs (3)

    NameTypeDefaultDescription
    Widget_InputSTRING
    weightFLOAT1.0-10–10
    String_01optSTRING

    Outputs (1)

    NameTypeDescription
    TEXTSTRING