Nodes/Civitai Recipe Finder/Lora Trigger Words
ComfyUI Node

Lora Trigger Words

Lora Trigger Words

By BAIKEMARK·Created 12 months ago·Updated 6 months ago· 135
Lora Trigger Words
    • metadata_triggers
    • civitai_triggers
    • triggers_md
    lora_name
    force_refreshno

    You know the drill: you download a LoRA, drop it in, generate, and get... nothing. The style doesn't show up, the character doesn't show up, because half of LoRAs need a magic word typed into the prompt before they'll do anything at all. That word lived on the Civitai page you had open three tabs ago and closed. Lora Trigger Words exists to stop that specific flavor of pain - it grabs the trigger words for a local LoRA from two places at once and hands you both.

    It's the smallest, most single-purpose node in the whole Civitai Toolkit pack - filed straight under the Civitai category rather than a subfolder, because it doesn't need one. Point it at a LoRA, run it, done.

    How it works

    Two sources, because they disagree more often than you'd expect. Some LoRAs bake trigger words straight into the file's own metadata at training time - that's metadata_triggers. Others never got that treatment (older files, hand-placed files, trainers who skipped it), so the node also hash-matches your file against Civitai's database and pulls whatever the model page itself lists as trigger words - that's civitai_triggers. The third output, triggers_md, is a small markdown table putting the two side by side, built to feed straight into the Markdown Presenter node (under Display) so you actually get to read it instead of squinting at a text widget.

    The inputs that matter

    Only two:

    • lora_name - pick the LoRA from your local folder. Straightforward dropdown.
    • force_refresh - no by default. Leave it alone and the node reuses whatever it already cached; flip it to yes when you suspect the Civitai-side trigger words changed (creators do update model pages) or the first pull came back wrong.

    That caching matters more than it looks. The toolkit hashes your local models to match them against Civitai, and hashing thousands of files used to freeze ComfyUI on startup - bad enough that the author moved it to a background process in a recent update after users reported ComfyUI just... not loading. First run on a big LoRA folder will still be slower than the tenth; that's the hashing catching up, not a bug.

    Installing it

    Two ways, both from the README: search Civitai Toolkit in ComfyUI Manager and hit install, or do it by hand -

    cd ComfyUI/custom_nodes
    git clone https://github.com/BAIKEMARK/ComfyUI-Civitai-Toolkit
    pip install -r requirements.txt
    

    Restart ComfyUI after either route. You'll find the node under Civitai, and the same pack also adds two sidebar panels (a Civitai browser and a local model manager) that surface trigger words in a UI popup if you'd rather not wire a node for it at all.

    Where this actually earns its keep vs. the alternative

    If you're already using rgthree's Power Lora Loader to stack multiple LoRAs, its right-click menu already pulls trigger words for you - no extra node required. This one's better when you want the trigger words as an actual text output: piping into a prompt-builder, logging what you used, or wanting that clean local-vs-Civitai comparison table specifically. Different job, don't feel like you need both.

    Troubleshooting

    metadata_triggers comes back empty. Not a bug - it means the file genuinely has no trigger-word metadata baked in. Plenty of LoRAs, especially older ones, ship with none. Lean on civitai_triggers when this happens.

    civitai_triggers comes back empty too. That means the hash didn't match anything on Civitai - a renamed file, a heavily re-packed file, or a model that's since been pulled (removals happen routinely on Civitai; it's not rare). No hash match, no lookup.

    Requests start failing or timing out. Civitai's API rate-limits unauthenticated requests. Grab an API key from your Civitai account page and drop it into the toolkit's settings panel - the pack added a dedicated field for exactly this, and it noticeably improves reliability once your local library gets past a few hundred models.

    CategoryCivitai

    Inputs (2)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:
    force_refreshCOMBOno2 options: no, yes

    Outputs (3)

    NameTypeDescription
    metadata_triggersSTRING
    civitai_triggersSTRING
    triggers_mdSTRING