Nodes/babydjac Nodes/Weight Adjust
ComfyUI Node

Weight Adjust

Rescale a Whole Taglist Without Editing Forty Tags

By babydjac·Created 7 months ago·Updated 5 months ago· 12
Weight Adjust
    • adjusted
    taglist
    multiply1.00
    base_weight1.10
    apply_to_unweightedtrue
    clamp_min0.10
    clamp_max2.00
    round_to2

    If you live in the booru-tag world - SD 1.5, SDXL, Illustrious, NoobAI, Pony - your prompt is a pile of comma-separated tags with weights like (face:1.2) sprinkled in, and bumping the whole thing up or down means editing every single one by hand. Weight Adjust exists so you don't have to. Paste a taglist in, pick a multiplier, and it rescales every weight in one pass, wrapping the unweighted tags too if you want.

    Mechanically it's dead simple and fully local: no API, no key, no network. It's the kind of utility that feels trivial until you're hunting through a 60-tag prompt for the one (tag:0.8) you need at 1.1.

    How it works

    The node splits your input on commas and newlines, then for each token checks whether it matches the (tag:weight) shape. Three cases:

    • A weighted tag like (foo:1.3) gets its weight multiplied by multiply and re-wrapped.
    • An unweighted tag like bar gets wrapped at base_weight (default 1.1) - the shorthand for a mild boost - then scaled, but only if apply_to_unweighted is on.
    • The result is clamped into [clamp_min, clamp_max] and rounded to round_to decimals.

    So set multiply to 1.5 and the whole prompt gets punchier uniformly; set it to 0.7 and everything relaxes. The clamping is your safety rail - weights past ~1.5 tend to oversaturate and distort on CLIP-era models, so the 2.0 default max keeps you out of the danger zone.

    The inputs that matter

    • taglist (required) - the multiline input.
    • multiply - the one you'll actually touch. 1.0 does nothing; above 1.0 boosts, below weakens.
    • base_weight + apply_to_unweighted - together they decide what happens to tags that have no weight. On by default, which is usually what you want.
    • clamp_min / clamp_max - the floor and ceiling for every output weight.

    One output, adjusted, a STRING ready to feed your positive prompt.

    The take you actually need

    Here's the part nobody tells you: weights only do something on CLIP-era tag models. Z-Image, Flux, and the other LLM-encoder checkpoints discard attention weights entirely - the encoder wrapper literally passes disable_weights=True. Weight Adjust will happily emit (word:1.5) strings for those models, and the sampler will quietly ignore them. Before you wire this node up, confirm your checkpoint is one that actually reads weights. If it's an SDXL-lineage model, this is a genuinely handy tool; if it's Z-Image or Flux, it's dead weight.

    Also worth knowing: the parser is picky. It matches the exact (tag:number) shape, so ((tag)), [tag] downweights, and any tag containing a comma will confuse the splitter. Keep your input to flat (tag:weight) pairs and it behaves.

    Install

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/babydjac/babydjacNODES
    # restart ComfyUI
    

    Or search "babydjacNODES" in ComfyUI Manager. No dependencies beyond what ComfyUI already ships, no model downloads.

    For its narrow job - bulk-rescaling weights in a taglist - it does exactly what it says, which is more than a lot of fancier nodes manage.

    CategorybabydjacNODES/Utils

    Inputs (7)

    NameTypeDefaultDescription
    taglistSTRING
    multiplyoptFLOAT1.000–10
    base_weightoptFLOAT1.100–10
    apply_to_unweightedoptBOOLEANtrue
    clamp_minoptFLOAT0.10
    clamp_maxoptFLOAT2.00
    round_tooptINT20–6

    Outputs (1)

    NameTypeDescription
    adjustedSTRING