ComfyUI Node

Tagger🧸

Inject lora and trigger tags into any text block, in the right spot

By glibsonoran·Created 3 years ago·Updated about a year ago· 197
Tagger🧸
    • tagged_text
    • help
    • troubleshooting
    Beginning_tags
    Middle_tags
    Prefer_middle_tag_after_periodtrue
    End_tags
    text

    Tagger inserts tags into a block of text, at the start, the middle, or the end. That sounds trivial until you realize the problem it solves. You've got an LLM writing your prompts (say, with Advanced Prompt Enhancer), and now you want to bolt a LoRA trigger, a weighted phrase, or a quality tag onto that generated prompt without hand-editing it every run. Tagger does that automatically, in-line, in whichever position you want.

    It's a plumbing node. Not exciting on its own, but it's the piece that makes an automated prompt pipeline actually usable, because the AI-generated part and your fixed tags stay separate and get merged at runtime.

    How it works

    You feed it a text block on the text input, and you provide three sets of tags: Beginning_tags, Middle_tags, and End_tags. The node splices them in at those positions and outputs the combined string. So the LLM prose sits in the middle and your <lora:whatever:0.8> or masterpiece tags wrap around it exactly where you told them to.

    The Prefer_middle_tag_after_period option controls where the middle tag lands: with it on, the node drops the middle tags right after a sentence-ending period rather than mid-sentence, which keeps the result readable instead of jamming a tag into the middle of a clause.

    The inputs

    • text (optional, multiline): the block you're tagging, usually piped from a prompt-generating node.
    • Beginning_tags / Middle_tags / End_tags (multiline): what to insert, and where. Leave any of them empty to skip that position.
    • Prefer_middle_tag_after_period (boolean, default true): put middle tags after a period for cleaner placement.

    The output is tagged_text, which goes on to your CLIP Text Encode or wherever the prompt is headed. There's also help and troubleshooting.

    A word on where tags actually work

    Tagger will faithfully insert whatever you give it, but whether those tags do anything depends on the model consuming them. On SDXL-lineage checkpoints, comma tags and LoRA triggers work the way you expect, and beginning-position tags carry the most weight since Stable Diffusion front-loads attention. On modern LLM-encoded models (Flux and its relatives), attention-weight syntax like (word:1.3) is silently discarded and quality-spam like masterpiece, best quality is inert vocabulary the encoder never learned. So put Tagger to work adding LoRA triggers and real descriptive tags, not magic-word incantations that stopped mattering two model generations ago. The author's own example workflows chain Tagger together with Advanced Prompt Enhancer to build small prompt-refinement agents, which is exactly the use it's best at.

    Installing it

    Comes with Plush-for-ComfyUI. Install through ComfyUI Manager (search "Plush", install Plush-for-ComfyUI, restart), or clone it: cd ComfyUI/custom_nodes && git clone https://github.com/glibsonoran/Plush-for-ComfyUI.git, then pip install -r requirements.txt, restart.

    Common issues

    There's not much to break here, since Tagger doesn't touch the network or need a key. If your tags land in odd places, that's the middle-tag positioning, so try toggling Prefer_middle_tag_after_period. If they seem to have no effect on the final image, the problem is downstream, not in Tagger: check that your model actually respects that tag syntax and that a LoRA loader is present for any LoRA you referenced. The troubleshooting output is there if you need it.

    CategoryPlush🧸/Utils

    Inputs (5)

    NameTypeDefaultDescription
    Beginning_tagsSTRING
    Middle_tagsSTRING
    Prefer_middle_tag_after_periodBOOLEANtrue
    End_tagsSTRING
    textoptSTRING

    Outputs (3)

    NameTypeDescription
    tagged_textSTRING
    helpSTRING
    troubleshootingSTRING