ComfyUI Node

Lora Info (UTK)

Which CivitAI LoRA is this, and what's its trigger word?

By whmc76·Created about a year ago·Updated 2 months ago· 72
Lora Info (UTK)
    • lora_name
    • civitai_trigger
    • example_prompt
    • civitai_info
    • meta_info
    lora_name

    Everyone has that one LoRA folder where half the files are named checkpoint_v6_merged_final_fix.safetensors and you have no idea which character they are or what triggers them. Lora Info (UTK) is the "who are you" node: pick a LoRA from your folder and it tells you the trigger words, an example prompt, the base model, and whatever metadata the training run baked into the file. It does the digging so you don't have to open CivitAI for every single download.

    How it works

    The lora_name dropdown lists every LoRA in your models/loras folder (standard ComfyUI folder path). Pick one and the node does two things:

    1. Reads the file's own metadata - safetensors files carry a JSON header, and training tools like kohya's (the ss_* keys) embed trigger words, tag frequency, and base model info right in there. The node extracts that locally.
    2. Hits the CivitAI API - it hashes the file (SHA-256) and calls CivitAI's model-versions/by-hash endpoint to pull the official trigger words, example prompt, and model page info. CivitAI identifies models by hash, which is why it works even if you renamed the file.

    So it's a local lookup plus a network lookup, and the two fill in each other's gaps.

    Outputs

    Five strings: lora_name (passthrough, handy for chaining), civitai_trigger, example_prompt, civitai_info (the assembled info text), and meta_info (raw training metadata). Wire them into a text display node, a log, or even a prompt assembly - the trigger words are exactly what you'd paste into your prompt.

    Installing it

    Standard pack install - ComfyUI Manager → search ComfyUI-UniversalToolkit, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/whmc76/ComfyUI-UniversalToolkit
    cd ComfyUI-UniversalToolkit && pip install -r requirements.txt
    

    Then restart. It uses requests, which is in the pack requirements.

    Gotchas

    • It needs internet for the CivitAI half, and CivitAI needs to know the file. If the API call fails (offline, or the LoRA is a private/older upload not on the hash registry), you still get the local metadata - the node degrades gracefully, but civitai_trigger comes back empty. That's not a bug, that's an unregistered file.
    • The hash takes a moment - it reads the whole file to compute SHA-256, so a 500MB LoRA stalls for a second or two. Normal.
    • It's an output node - it shows its results in the node's UI widget and only runs when reached. It's a lookup tool, not a loader; it doesn't apply the LoRA to anything.
    • Trigger words are training-suggestions, not guarantees. The creator's actual intent may differ, and quality LoRAs sometimes work better with their own phrasing. Treat this as a strong hint, not scripture.

    For anyone whose LoRA folder has grown past "I remember what all of these are," this is a small but genuinely useful sanity tool. It turns "I think this one is the anime one" into an actual answer.

    CategoryUniversalToolkit/Tools

    Inputs (1)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:

    Outputs (5)

    NameTypeDescription
    lora_nameSTRING
    civitai_triggerSTRING
    example_promptSTRING
    civitai_infoSTRING
    meta_infoSTRING