Nodes//Nougan Lora Inspector πŸ”
ComfyUI Node

Nougan Lora Inspector πŸ”

Point at any LoRA and it tells you who it is β€” live from Civitai

By WinnouganΒ·Created 2 months agoΒ·Updated about a month agoΒ· 4
Nougan Lora Inspector πŸ”
    • model_name
    • base_model
    • trigger_words
    • metadata_json
    β—„lora_nameβ–Ύβ–Ί
    β—„sourceautoβ–Ί
    β—„refreshuse cacheβ–Ί
    β—„api_keyβ–Ί

    Every LoRA folder has orphans: files you downloaded because a workflow referenced them, renamed by the browser, and now you have no idea what base model they're for or what trigger word they want. The classic fix is hunting through Civitai's search for 20 minutes. NouganLoraInspector solves it by hashing the file and looking the hash up on Civitai - no browser, no guesswork, the record rendered right on the node.

    How it works

    When you pick a LoRA (or hit inspect), the node computes a SHA-256 of the file in 8MB chunks with a live progress bar, then queries Civitai's model-versions/by-hash API - civitai.com first, automatic fallback to red.civitai.com. The result becomes an on-node card: thumbnail strip, trigger words, base-model badge, downloads, rating, file size, and the prompt used for each sample image (click one to copy it). If the hash isn't on Civitai - self-trained LoRAs, renamed files - it falls back to reading the local Kohya ss_* metadata from the safetensors header and flags the card local only instead of crashing.

    Hashes and Civitai records are cached to a JSON file in the suite folder, so after the first lookup each one is near-instant.

    The inputs that matter

    • lora_name - the required dropdown, populated from models/loras.
    • source - auto, civitai.com, or red.civitai.com. Leave on auto.
    • refresh - use cache or force refresh. Force re-hashes and re-fetches, bypassing all caches. Your tool when a record is stale after a re-upload.
    • api_key - optional Civitai bearer token. Unauth requests work, but a key gets higher rate limits and full NSFW records. Resolution order is widget β†’ CIVITAI_API_TOKEN env var β†’ civitai_api_key.txt in the suite folder.

    Outputs, all STRING: model_name, base_model, trigger_words, and metadata_json - so you can wire the trigger words straight into a prompt builder rather than just reading them off the card.

    Installing

    Search Nougan in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Winnougan/Nougan_Nodes
    # restart ComfyUI
    

    Zero pip dependencies - the pack uses stdlib plus the aiohttp that ComfyUI already bundles. The node is also guarded in its own try/except, so a load failure shows a [Nougan] ⚠️ Lora Inspector NOT loaded line and leaves the rest of the suite running.

    Where people get burned

    The local only card is not an error - it's the graceful fallback, and people mistake it for a bug. If you see it on a file you know is on Civitai, hit force refresh or delete cache/lora_inspector_cache.json; if the file was renamed after upload, the hash won't match Civitai's record at all and local-only is the correct answer. A bad or expired key shows up as auth rejected (401/403), and blank sample images are usually a Civitai CDN hiccup, not a node fault. One honest caveat: first hash of a 200MB LoRA takes a few seconds. Every lookup after that is instant - which is the whole point of the cache.

    Categorynougan

    Inputs (4)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:
    sourceoptCOMBOauto3 options: auto, civitai.com, red.civitai.com
    refreshoptCOMBOuse cacheforce refresh bypasses all caches and re-hashes / re-fetches.
    api_keyoptSTRINGOptional Civitai bearer token. Falls back to CIVITAI_API_TOKEN env var or civitai_api_key.txt in the suite folder.

    Outputs (4)

    NameTypeDescription
    model_nameSTRINGβ€”
    base_modelSTRINGβ€”
    trigger_wordsSTRINGβ€”
    metadata_jsonSTRINGβ€”