Nodes/ComfyUI-ModelMetadataReader/Model Metadata Reader
ComfyUI Node

Model Metadata Reader

Your Model Files Keep Secrets. This Node Reads the Label Without Loading the Whole Thing

By kana112233·Created 7 months ago·Updated 7 months ago· 0
Model Metadata Reader
    • metadata_json
    • download_url
    • model_info
    model_typeloras
    model_name

    ModelMetadataReader is the basic node of the three that ship in Sinphaltimus/comfyui_fedcoms_node_pack, and it's the one you'll actually reach for. Its job: read the metadata that lives in a model file and hand it to you as text. Why care? Checkpoints and LoRAs carry a surprising amount of useful junk in their headers - training tags, trigger words, the ss_* keys from a LoRA training run, the base model it was built on. That's all readable without loading a 7GB file into VRAM, and ComfyUI's default loaders won't show you any of it.

    How it works

    The node looks at the file extension and picks a method:

    • .safetensors → opens with safetensors.safe_open() and returns the header metadata. This is the fast, genuinely useful path - only the header is read, the weights never touch RAM.
    • .ckpt, .pth, .pt, .bin → loads the whole file with torch.load() and returns the top-level keys (usually just state_dict).
    • anything else → "Unsupported model format".

    The one input and one output

    There's a single required input, model_path - a STRING with the placeholder "Enter full model path here". It's exactly what it sounds like: the full absolute path to the model file, typed or pasted in. There's no file browser. The output is one STRING: a timestamped log plus the extracted metadata as pretty-printed JSON. Wire it into any text display node, or feed it to a node that builds filenames or tags from what it finds.

    Install

    Three nodes, one tiny repo. Via ComfyUI Manager, search "comfyui_fedcoms_node_pack", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Sinphaltimus/comfyui_fedcoms_node_pack
    

    Restart ComfyUI. No model downloads, no heavy dependency. The requirements.txt is mostly the Python standard library plus torch, safetensors, and chardet - and torch and safetensors are already in every ComfyUI install, so in practice only chardet might be new. Manager installs it automatically.

    Where people get burned

    • It needs a real path. A relative path or a typo gets you ❌ Error: Model not found and nothing else. The pack ships a PowerShell script (PSscript/Model_Lister_with_paths.ps1) that walks your models folder and writes every full path to a model_list.txt for copy-pasting - Windows only, and clearly how the author actually runs this.
    • It's not a universal reader. .onnx and .gguf files get "Unsupported model format." The "Enhanced" sibling handles ONNX, and the "Advanced" one claims the rest.
    • The .ckpt path has a modern-PyTorch trap. Since PyTorch 2.6, torch.load() defaults to weights_only=True, which refuses to deserialize anything but plain tensors - a whole class of checkpoints now errors with "Weights only load failed." And it's worth remembering why safetensors exists: .ckpt is pickle, the format that can execute code when loaded. You're not in danger from merely reading keys here, but this node's ckpt support is best-effort, not something to rely on.

    If what you care about is safetensors - LoRAs especially - this is the honest pick of the three. It's fast, and the metadata it returns is real.

    Categoryutils/model

    Inputs (2)

    NameTypeDefaultDescription
    model_typeCOMBOloras9 options: checkpoints, loras, vae, controlnet, embeddings, upscale_models, +3
    model_nameSTRING

    Outputs (3)

    NameTypeDescription
    metadata_jsonSTRING
    download_urlSTRING
    model_infoSTRING