Nodes/ComfyUI_RS_MultiCharacter_Sampler/RS Character Tagger Loader
ComfyUI Node

RS Character Tagger Loader

The node that decides who's who in a crop

By raspie10032·Created 3 days ago·Updated 2 days ago· 1
RS Character Tagger Loader
    • RS_MC_TAGGER
    ◄device▾►
    ◄batch_size4►
    ◄model_nameWD ViT v3►

    Here's the problem this solves. The detailer finds three faces in your image and re-renders each one. But which character prompt belongs to which face? A normal detailer picks the same prompt for every crop, which is how the second character's face gets re-baked with the first character's hair colour.

    RS Character Tagger Loader is the node that answers that question - locally, with a WD-style tagger, and with one important design rule: the tags it infers never become prompt text. They're only used to pick which of your original prompts applies to that crop. Your sentences stay your sentences; a tagger hallucinating blonde hair cannot inject blonde into a brunette's face.

    How the matching works

    Each detected crop goes through the tagger, returning tags with confidence scores. The pack pulls the tags it recognises out of your character prompts and scores each character by its single strongest discriminating tag, with sensible exclusions: count tags like 1girl and solo are dropped, so are tags two characters share, so are artist: and quality/background tags. Eye tags get a quarter weight, because on their own they're weak evidence.

    The winner needs both a minimum score (match_min_score, 0.25 default) and a minimum margin over the runner-up (match_min_margin, 0.08 default), both on the detailer node. Fail either and the region is left alone and reported as ambiguous. That's the behaviour I'd want from anything guessing at identity on my image: skip, don't bluff.

    The three models, and which to pick

    model_name is a three-way choice, and it's the only field most people touch:

    • WD ViT v3 - the default. Small, fast, good enough for distinguishing red hair from blue hair and school uniform from hoodie. Start here.
    • WD EVA02 Large v3 - bigger, more accurate. Use it when two characters look genuinely similar and the small model keeps failing the margin test.
    • PixAI Tagger v1.0 - a different architecture with a notably different tag set, and it wants requirements-tagger-pixai.txt plus more memory. Start it at batch_size = 1.

    The other two fields: device is auto or cpu (auto picks GPU when it can), and batch_size (default 4, max 16) controls how many crops go through per pass. Output is a single RS_MC_TAGGER wire into the detailer's tagger input.

    You genuinely need this node for any multi-character detailing. The detailer refuses to run with more than one character and no tagger, with an error saying exactly that - it won't guess.

    Downloads, and where they land

    Nothing is bundled. When you execute the node it resolves the selected model's files - config.json, selected_tags.csv and model.safetensors for the WD variants; config, preprocessor config, a tagger_pipeline.py and weights for PixAI - through huggingface_hub, with byte-level progress painted on the node itself. Cached files are reused on later runs, so the second run is instant.

    That caching means the models live in your Hugging Face cache, not in ComfyUI/models. If you're tight on disk or run ComfyUI on a small boot drive, set HF_HOME before launching to redirect it. Choosing a different model_name downloads a different model.

    Inference is entirely local. No API, no account, no rate limit.

    Install

    Same pack as the rest of the modular pipeline, plus the tagger dependencies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/raspie10032/ComfyUI_RS_MultiCharacter_Sampler.git
    cd ComfyUI_RS_MultiCharacter_Sampler
    /path/to/ComfyUI/venv/bin/python -m pip install -r requirements-tagger.txt
    # only if you want PixAI:
    # /path/to/ComfyUI/venv/bin/python -m pip install -r requirements-tagger-pixai.txt
    

    requirements-tagger.txt pulls timm, huggingface-hub and safetensors, reusing ComfyUI's torch/torchvision - no ONNX runtime. requirements-tagger-pixai.txt adds transformers 5.x. Use the ComfyUI interpreter, not system Python; the wrong environment is the standard cause of "no module named timm".

    Restart ComfyUI afterwards, then open the detailer example graph and hit a two-face run.

    Where it goes wrong

    It picked the wrong character. Check the detailer's region_report first - it lists each region's score and margin. Marginal means raise the thresholds; confidently wrong usually means your prompts lack distinguishing tags, so add something concrete (silver bob cut, green jacket).

    First run seems hung. It's downloading a couple of hundred megabytes with progress on the node. Watch the node, not the console.

    PixAI runs out of memory. Drop batch_size to 1 and make sure nothing else is holding VRAM. It's the heaviest of the three and rarely worth it.

    Ambiguous on a single character. You don't need a tagger at all in a one-character scene; the detailer runs fine without it.

    CategoryRS MultiCharacter

    Inputs (3)

    NameTypeDefaultDescription
    deviceCOMBO2 options: auto, cpu
    batch_sizeINT41–16—
    model_nameoptCOMBOWD ViT v3Executing this loader downloads only the selected model, with progress on the node. Cached files are reused. PixAI needs requirements-tagger-pixai.txt and more memory; start with batch_size=1.

    Outputs (1)

    NameTypeDescription
    RS_MC_TAGGERRS_MC_TAGGER—