Nodes/AAA Metadata System/Trigger Word Manager v03
ComfyUI Node

Trigger Word Manager v03

What's the trigger word for this LoRA? This node answers that.

By EricRollei·Created 10 months ago·Updated 9 months ago· 13
Trigger Word Manager v03
    • all_triggers
    • selected_trigger
    • status
    lora_path
    fetch_from_civitaifalse
    force_fetchfalse
    trigger_placementauto-detect
    primary_trigger
    custom_triggers

    Every character and style LoRA comes with a magic phrase. Use it and the LoRA kicks in; forget it and you get a generic subject that sort of resembles the character but isn't them. The problem is remembering which phrase goes with which of the 300 LoRAs in your folder. Trigger Word Manager v03 exists to answer that question on demand.

    It's a pure "info provider" node from the AAA Metadata System pack - it doesn't load any model, doesn't patch anything, doesn't touch your graph's model pipeline. You give it the path to a LoRA file and it returns the trigger words as strings you can read, log, or wire into a prompt. That's it, and that's exactly what makes it useful.

    How it works

    Drop the path to a .safetensors LoRA into lora_path. The node looks the file up in the pack's local LoRA database (lora_tester_db.json, the same database the Multi-LoRA loaders use, keyed by file identity), which the author has curated with categories, ratings and trigger words for the LoRAs it knows.

    If the database has no entry, or you want the freshest data, set fetch_from_civitai to true and it'll query the Civitai API for the LoRA's trigger words - with force_fetch to bypass any cached result. trigger_placement (auto-detect by default) controls how the trigger is meant to be used, and the optional primary_trigger / custom_triggers fields let you override or extend what comes back.

    The outputs

    • all_triggers - every trigger word the node found for the file.
    • selected_trigger - the one it considers the primary/active trigger.
    • status - a text summary of what happened (found in DB, fetched from Civitai, nothing found).

    All three are strings, so the natural wiring is into a Show Text node, or splice selected_trigger straight into a prompt string if you're building prompts dynamically. It plays nicely with the pack's Multi-LoRA loaders for the same reason they share a database: one lookup, consistent answers.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/AAA_Metadata_System.git
    cd AAA_Metadata_System
    pip install -r requirements.txt
    

    Restart ComfyUI, or install "AAA Metadata System" via ComfyUI Manager. No model downloads. The pack is CC BY-NC licensed (non-commercial); commercial use needs a paid license from the author.

    Common issues

    • Empty outputs - the LoRA isn't in the local database and fetch_from_civitai is off. Turn fetching on; it needs network access. If it still comes back empty, the LoRA may genuinely have no published trigger words - check its Civitai page.
    • Wrong trigger word - creators change trigger words between versions. force_fetch to refresh, and keep in mind the local DB is a snapshot that goes stale.
    • "No file provided" style errors - it needs an absolute path to the file; a LoRA name alone isn't enough.

    Honest take: for daily prompting you may never need this - the trigger word is usually in the LoRA's filename or on its Civitai card. Where it earns its keep is automation: when you're building a batch workflow that has to pull the right trigger for whatever LoRA is loaded, a node that returns it as a string is the difference between a hardcoded phrase and something that actually works.

    Categoryloaders/lora tester

    Inputs (6)

    NameTypeDefaultDescription
    lora_pathSTRINGPath to the LoRA file
    fetch_from_civitaiBOOLEANfalseFetch trigger words from Civitai
    force_fetchBOOLEANfalseForce fetch even if tags already exist
    trigger_placementCOMBOauto-detectWhere trigger words work best in prompts
    primary_triggeroptSTRINGSelect primary trigger word (leave empty to auto-select first)
    custom_triggersoptSTRINGAdd custom trigger words (comma-separated)

    Outputs (3)

    NameTypeDescription
    all_triggersSTRING
    selected_triggerSTRING
    statusSTRING