ComfyUI Node

LORA Discovery

Inventory your LORA folder without loading a single weight

By turnbros·Created 11 months ago·Updated 10 months ago· 0
LORA Discovery
    • metadata_json
    directory_path
    recursivetrue
    include_extensions.safetensors,.ckpt,.pt,.pth

    LORA Discovery scans a directory for LORA files and reports back what it finds - including the training metadata embedded in each safetensors file. It doesn't load any model into VRAM, doesn't touch the sampler, doesn't generate anything. It's an inventory and inspection tool: point it at your LORA folder and it tells you what's there, how big each file is, and, for safetensors files, what the training metadata says.

    That last bit is the genuinely useful part. LORA files carry a __metadata__ block - for community-trained LoRAs this is where the training recipe lives: base model, dataset size, optimizer, learning rate, even the ss_* keys that Civitai-style trainers embed. This node reads that header directly. If you've ever stared at a LORA file name wondering which base model it was trained for, this is the node that answers without loading gigabytes of weights.

    Inputs

    • directory_path - the folder to scan. Use an absolute path; the node does no relative-path guessing.
    • recursive - whether to descend into subfolders, default true.
    • include_extensions - comma-separated extensions to consider, default .safetensors,.ckpt,.pt,.pth.

    How it works and what you get

    The mechanism matters here: safetensors files start with an 8-byte header-length field followed by a JSON header, and the node reads just that header - never the weight payload. So it's fast and VRAM-free. For .ckpt/.pt/.pth (pickle-based) files, full metadata extraction would mean loading the model, which the author deliberately skipped; those get basic file info and a note instead. That's a sensible tradeoff, just know it before you point it at a folder of old .ckpt LoRAs and wonder why the metadata is thin.

    The output is a single metadata_json string: per file you get filename, path, size in MB, modified time, extension, and for safetensors files the metadata dict, tensor count, and per-tensor dtype/shape. It's designed to be read, or parsed with the pack's own JsonParse + Dict Get if you want to route specific fields into your workflow.

    Installing it

    ComfyBros installs like any custom node pack. ComfyUI Manager - search "ComfyBros" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/turnbros/ComfyBros
    

    Then restart ComfyUI. The README references a requirements.txt that doesn't exist; the real deps are in pyproject.toml. The node lives under ComfyBros/LORA Management.

    Gotchas

    Two things. First, a wrong or missing path produces empty or error results, not a friendly message - double-check the absolute path. Second, remember the .ckpt/.pt/.pth limitation: for those formats you get file stats only, because extracting more would require loading the full weights. If you want rich metadata, your safetensors LoRAs are where you'll get it.

    CategoryComfyBros/LORA Management

    Inputs (3)

    NameTypeDefaultDescription
    directory_pathSTRING
    recursiveBOOLEANtrue
    include_extensionsSTRING.safetensors,.ckpt,.pt,.pth

    Outputs (1)

    NameTypeDescription
    metadata_jsonSTRING