Nodes/ComfyCollectorNodes/LoRA Metadata (CCN)
ComfyUI Node

LoRA Metadata (CCN)

LoRA Metadata (CCN) Reads the Receipt

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
LoRA Metadata (CCN)
    • summary
    • full_metadata
    lora_name
    debug_modefalse

    Every LoRA file has a story, and LoRA Metadata (CCN) is how you read it. The moment someone trains a LoRA with kohya, OneTrainer, EveryDream2, ai-toolkit, SimpleTuner, diffusers, or any of the other mainstream trainers, the tool embeds a header into the safetensors file recording how it was made: network dim and alpha, learning rate, steps, resolution, base model - and, critically, the trigger words. This node surfaces all of it as readable text, which ends most of the "what's the trigger for this LoRA?" guessing that wastes everyone's first few generations.

    It works by opening the safetensors file directly (safe, read-only - it never loads or patches anything) and scanning the metadata against a big table of known keys organized by trainer. The node has the kohya key schema memorized (ss_network_dim, ss_learning_rate, ss_optimizer, ss_caption_text...), plus modelspec's conventions (modelspec.trigger_phrase, modelspec.author), plus EveryDream2, ai-toolkit, SimpleTuner, and diffusers formats. So depending on what trained the file, you get the relevant slice. It also detects the LoRA's architecture and reports it, which is genuinely useful now that the KB notes most 2026 "LoRAs" are actually LoKr or other variants - knowing what you're loading matters.

    Outputs are two strings, and they're designed for different purposes:

    • summary - a clean, human-readable digest: title, trigger words, rank/alpha, base model, training stats. This is what you want in front of you when you're writing a prompt.
    • full_metadata - the complete raw metadata, every key ComfyUI found. For the forensic stuff: training comments, dataset dirs, seeds, everything the trainer recorded. Feed it to a text display or a string node if you want to mine it programmatically.

    There's also a debug_mode toggle that prints extra parsing diagnostics to the console - only turn it on if a file isn't parsing the way you expect. This is an output node (marked as such in ComfyUI), so it can sit at the end of your graph just to show its strings in the UI.

    Install

    ComfyUI Manager → search "ComfyCollectorNodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/valkymaera/ComfyCollectorNodes
    

    Restart ComfyUI. It's in the "CCN" category as "LoRA Metadata (CCN)". Uses safetensors, which ComfyUI already ships. No model downloads, MIT license.

    Common issues

    The big caveat is the one that trips everyone: not all LoRAs have useful metadata. Many Civitai downloads and a lot of older files were trained with metadata stripped or never written - you'll get a summary with trigger words empty and the honest message that there's nothing to show. That's the file's fault, not the node's. Also, this reads the embedded header only; it does not look up Civitai's online database, so there's no web call and no API key, but also no "the author said the trigger is X" enrichment. If the file has no metadata, the trigger is genuinely unknowable from the file alone. And one small warning: it reads the file every run, so if your LoRA folder is on a slow network drive, this node is slower than the loaders that cache.

    CategoryCCN

    Inputs (2)

    NameTypeDefaultDescription
    lora_nameCOMBO0 options:
    debug_modeoptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    summarySTRING
    full_metadataSTRING