ComfyUI Node

Weight Tags

Turn a whole prompt up or down by category, without touching a single comma

By alchemine·Created 2 months ago·Updated 3 days ago· 8
Weight Tags
    • STRING
    ◄text—►
    ◄modereplace►
    ◄subjectfalse►
    ◄subject_weight1.10►
    ◄posefalse►
    ◄pose_weight1.10►
    ◄expressionsfalse►
    ◄expressions_weight1.10►
    ◄bodyfalse►
    ◄body_weight1.10►
    ◄clothesfalse►
    ◄clothes_weight1.10►
    ◄backgroundfalse►
    ◄background_weight1.10►
    ◄bg_detailsfalse►
    ◄bg_details_weight1.10►
    ◄framingfalse►
    ◄framing_weight1.10►
    ◄characterfalse►
    ◄character_weight1.10►
    ◄othersfalse►
    ◄others_weight1.10►

    What it's for

    Weight Tags writes (tag:weight) into a prompt for you - but only on the tags in the categories you switch on. It's the last node in the pack's own chain: Tags Extractor turns a sentence into tags, Character Tags Generator adds characters, Tags Generator grows it into a full prompt, Classify Tags splits it, and Weight Tags turns the parts you care about up.

    That ordering matters: the prompt arriving here isn't something you typed, and you can't weight those tags by eye without reading the whole thing back and editing it - the chore this node deletes. Flip on expressions at 1.5 and background at 1.2, and :3, shirt, library comes back as (:3:1.5), shirt, (library:1.2). Everything else passes through untouched.

    Settle one thing first: this is a CLIP-era node. (tag:1.3) is the attention syntax of SD 1.5, SDXL, Illustrious, NoobAI, Pony and WAI, and it does nothing on the LLM-encoded models - Z-Image, Flux 2 Klein, Anima, ERNIE. There it isn't ignored, it's fed to the encoder as literal punctuation, which is worse than leaving it out. Running a 2026-model workflow? Close this tab.

    How it decides what to weight

    It splits your text on commas, normalises each tag down to its name - weights, parens, underscores and all - then looks up its bucket, one of ten: subject, pose, expressions, body, clothes, background, bg_details, framing, character, others. The buckets are wider than they sound: body covers hair and eyes too, pose covers sex acts, bg_details takes props, lighting and effects. Anything the label tables don't claim lands in others, along with the categories nothing here draws - creatures, style, text, meta, concept.

    If the bucket's toggle is on, the tag is rewritten with that bucket's weight; if it's off, it arrives untouched. BREAK is never touched - it's chunk syntax, not a tag.

    The inputs that matter

    text is required and it's a forced input, which means there's no text box on the node. You wire a STRING into it - from Classify Tags, Tags Generator, or a Primitive/String node if you're typing your own. If you're staring at a node with no place to type, that's why.

    Then there are ten toggle-plus-weight pairs, all defaulting to false and 1.1: subject, pose, expressions, body, clothes, background, bg_details, framing, character, others. The 1.1 default is what (tag) means to CLIP - its own shorthand for "a bit more of this". The practical range is 0.5–1.5; past 1.5 you're buying oversaturation and distorted anatomy, not adherence. And a weight of 0 isn't the same as the toggle being off: the toggle passes the tag through, 0 zeroes the concept.

    mode decides what happens to a weight the tag already carries. replace swaps the number out and keeps the sign, so (abc:-1.1) under pose 1.5 comes back as (abc:-1.5). multiply keeps both: 1.2 × 1.5 becomes 1.8. ((x)) counts as 1.21 and [x] as 1/1.1, so multiply compounds with emphasis brackets.

    There's one output: a STRING. It goes into the text input of the positive CLIPTextEncode.

    Install

    Search ComfyUI-Generator-Pack in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alchemine/comfyui-generator-pack
    

    Restart ComfyUI. requirements.txt is one line - googletrans - and Weight Tags never touches it; only Tags Extractor's translate widget calls it, optionally. The pack declares Python >= 3.12, worth a look if your install predates that.

    Nothing ships in the repo: the first run pulls the label tables out of a ~2MB sha256-pinned archive in the pack's GitHub releases into custom_nodes/comfyui-generator-pack/resources, so it needs internet once. The big 100MB statistics tables belong to Tags Generator's sampler - weighting doesn't need them.

    Where it bites

    Nothing happens when you first drop it in. All ten toggles default off, and an off category passes through untouched - by design, but it looks broken for a second.

    It splits on commas, flatly. Hand-grouped weights like (long hair, blue eyes:1.2) get taken apart, because each piece is its own tag and the parentheses land wrong. One tag per comma, or don't run it over that prompt.

    A tag in the wrong bucket is the label table's fault, not yours. The pack puts ~3% of the vocabulary unlabelled, well under 1% by prompt frequency. When a tag surprises you, wire Classify Tags next to it: same tables, same grouping, one output per bucket, so you can see where it lands.

    Offline, it degrades rather than crashes. No archive means static tables first and everything else into others, quietly - you can weight a pile of tags as others with no error at all. Fresh install looking off? Check resources/group/ exists.

    Last thing: the repo is new - one author, September 2026, 4.0.0 as of October - so almost nothing is written about it yet. Read the tooltips.

    CategoryGeneratorPack/Tags

    Inputs (22)

    NameTypeDefaultDescription
    textSTRING—
    modeCOMBOreplaceWhat a weight the tag already has becomes: replace swaps it for the category's weight, keeping its sign; multiply multiplies the two. ((x)) counts as 1.21 and [x] as 1/1.1.
    subjectBOOLEANfalseWeight subject tags.
    subject_weightFLOAT1.100–3The weight every subject tag gets, replacing any it already has.
    poseBOOLEANfalseWeight pose/sex tags.
    pose_weightFLOAT1.100–3The weight every pose tag gets, replacing any it already has.
    expressionsBOOLEANfalseWeight expressions tags.
    expressions_weightFLOAT1.100–3The weight every expressions tag gets, replacing any it already has.
    bodyBOOLEANfalseWeight body/hair/eyes tags.
    body_weightFLOAT1.100–3The weight every body tag gets, replacing any it already has.
    clothesBOOLEANfalseWeight clothes tags.
    clothes_weightFLOAT1.100–3The weight every clothes tag gets, replacing any it already has.
    backgroundBOOLEANfalseWeight background tags.
    background_weightFLOAT1.100–3The weight every background tag gets, replacing any it already has.
    bg_detailsBOOLEANfalseWeight objects/lighting/effects tags.
    bg_details_weightFLOAT1.100–3The weight every bg_details tag gets, replacing any it already has.
    framingBOOLEANfalseWeight framing tags.
    framing_weightFLOAT1.100–3The weight every framing tag gets, replacing any it already has.
    characterBOOLEANfalseWeight character tags.
    character_weightFLOAT1.100–3The weight every character tag gets, replacing any it already has.
    othersBOOLEANfalseWeight others tags.
    others_weightFLOAT1.100–3The weight every others tag gets, replacing any it already has.

    Outputs (1)

    NameTypeDescription
    STRINGSTRING—