Nodes/comfyui-adaptiveprompts/πŸ‹οΈβ€β™€οΈ Weight Lifter πŸ‹οΈβ€β™€οΈ
ComfyUI Node

πŸ‹οΈβ€β™€οΈ Weight Lifter πŸ‹οΈβ€β™€οΈ

Randomize prompt emphasis weights β€” but check your model first

By AlectricitiΒ·Created 12 months agoΒ·Updated 23 days agoΒ· 87
πŸ‹οΈβ€β™€οΈ Weight Lifter πŸ‹οΈβ€β™€οΈ
    • STRING
    β—„promptβ€”β–Ί
    β—„seed0β–Ί
    β—„min_weight0.80β–Ί
    β—„max_weight1.20β–Ί
    β—„delimiter,β–Ί
    β—„modeRANDOMβ–Ί
    β—„existing_tag_behaviorPRESERVEβ–Ί
    β—„limit0β–Ί
    β—„keyword_selectionβ–Ί
    β—„keyword_modeNONEβ–Ί
    β—„keyword_variance0.10β–Ί
    β—„jitter_strength0.00β–Ί

    You know the trick: (epic masterpiece:1.1), (highres:0.9) - nudging the sampler's attention toward or away from specific phrases with parenthesis-weight syntax. Doing that by hand across a long prompt is tedious and doing it the same way every time defeats the point of a randomized batch. Weight Lifter automates it: hand it a plain prompt and it splits it into phrases, then applies a random or semi-structured weight to each one, spitting out a fully-weighted string like (this text is not strong:1.08), (it is weak:1.16), (it needs srs gainz:1.27).

    The author's own framing matters here: this ships as an "experimental" node, explicitly still being tuned, feedback explicitly welcome. Treat it accordingly - it's a fun batch-variance tool, not a precision instrument.

    The one thing that decides whether this node does anything at all

    Weight Lifter only matters on CLIP-based checkpoints. SD 1.5, SDXL, and the whole SDXL-lineage anime family - Illustrious, NoobAI, WAI, Pony - all read (word:1.3) as a real attention-weight instruction. But a growing share of current models (Z-Image, Flux 2 Klein, Anima, Krea 2, ERNIE) use an LLM text encoder instead of CLIP, and on those, parenthesis-weight syntax isn't weakened - it's discarded outright. The tokenizer sees your parentheses and colons as literal punctuation and feeds them straight into the encoder, which is worse than doing nothing. Check what your checkpoint's text encoder actually is before you reach for this node - it's the single most common way to waste a batch on a tool that can't touch the model you're running.

    How it works

    The node walks your prompt string, splits it on delimiter (comma by default - matching the pack's own definition of a "phrase" as the text between two commas), and assigns each resulting phrase a weight between min_weight and max_weight. mode controls the pattern: RANDOM gives each phrase an independent roll and is the sane default to start with; GRADIENT, BURST, and NOISE apply more structured variation instead of pure independence. The README doesn't spell out the exact math per mode, and given the "still being developed" note, it's worth just running a fixed seed through all four and eyeballing the diff rather than assuming you know what each does from the name alone.

    The inputs and outputs that matter

    • prompt - the text to weight, and seed - fix it if you want a reproducible weighting pass instead of a fresh roll every queue.
    • min_weight / max_weight (defaults 0.8 / 1.2) - the range weights are drawn from. That default is a genuinely conservative, sane choice: community consensus on CLIP models is that emphasis stays useful roughly between 0.5 and 1.5, and pushing much past 1.5 produces visible artifacts. Widen it deliberately, not by accident.
    • existing_tag_behavior - PRESERVE (default) leaves phrases that already carry a weight untouched, MODIFY adjusts them further, OVERWRITE replaces any existing weight with a fresh one.
    • keyword_selection + keyword_mode - a comma-separated filter list plus how to treat it: ONLY weights just the matched phrases, IGNORE weights everything but them, BOOST amplifies matches while everything else gets standard variation, SUPPRESS minimizes matches the same way. keyword_variance controls how much extra swing gets applied to whichever phrases the filter is boosting or suppressing.
    • limit - caps how many phrases actually get touched; leave it at 0 to weight everything.
    • jitter_strength - per the node's own tooltip, "extra randomness applied on top of structured modes." Use it to loosen up GRADIENT or BURST without abandoning their pattern entirely.
    • Output: a single STRING, ready for your CLIP Text Encode (on a model that will actually honor it).

    How to install it

    Ships with the rest of the pack - no separate steps, no models, no extra dependencies. Via ComfyUI Manager, search comfyui-adaptiveprompts and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Alectriciti/comfyui-adaptiveprompts
    

    Restart ComfyUI and it'll show up under adaptiveprompts/processing.

    Common issues & troubleshooting

    No visible effect at all. Nine times out of ten this is the encoder mismatch above - you're on Z-Image, Flux 2, Anima, or another LLM-encoded model, and the weight syntax is simply being ignored. Confirm by checking your checkpoint's text encoder before debugging anything else in the graph.

    Weird, oversaturated results even on a CLIP model. If max_weight creeps past ~1.5 or you're stacking Weight Lifter's output through another weighting pass downstream, you're compounding emphasis on top of emphasis. Pull max_weight back toward the defaults first.

    The delimiter splits on commas that aren't tag boundaries. A phrase like (cat, sitting:1.2) has its own internal comma; the default comma delimiter will likely treat it as two phrases and weight them independently, breaking the group you meant to keep together. Simplify nested weighted groups before feeding them in, or use PRESERVE mode and accept the node won't touch them.

    Results feel inconsistent run to run when you expected structure. That's RANDOM mode doing what it says. If you want a repeatable, patterned distribution of weight across a prompt rather than independent per-phrase rolls, that's what GRADIENT and BURST are for - reach for one of those instead of fighting RANDOM with a fixed seed.

    Categoryadaptiveprompts/processing

    Inputs (12)

    NameTypeDefaultDescription
    promptSTRINGβ€”
    seedINT00–18446744073709550000β€”
    min_weightFLOAT0.800–10β€”
    max_weightFLOAT1.200–10β€”
    delimiterSTRING,β€”
    modeCOMBORANDOM4 options: RANDOM, GRADIENT, BURST, NOISE
    existing_tag_behaviorCOMBOPRESERVE3 options: PRESERVE, MODIFY, OVERWRITE
    limitINT00–999β€”
    keyword_selectionSTRINGβ€”
    keyword_modeCOMBONONE5 options: NONE, ONLY, IGNORE, BOOST, SUPPRESS
    keyword_varianceFLOAT0.100–5β€”
    jitter_strengthFLOAT0.000–1Extra randomness applied on top of structured modes.

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”