Nodes/Model Utility Toolkit/Diffusion Model Info Loader
ComfyUI Node

Diffusion Model Info Loader

Diffusion Model Info Loader — see what a .safetensors file actually is

By silveroxides·Created about a year ago·Updated 4 days ago· 14
Diffusion Model Info Loader
    • preview
    • workflow_json
    • metadata_json
    diffusion_model
    workflow_index0

    If your diffusion_models folder looks like a crime scene - a dozen files named things like flux1-dev-Q5_K_M-fixed-v3.safetensors and unet-final-final2-use-this-one.safetensors - this node is the antidote. It loads one of those files by name and hands you back whatever a model page would normally show you: a preview image, the workflow JSON that produced it, and the raw metadata. No browser tab, no hunting through HuggingFace or CivitAI trying to match a hash to a filename you renamed six months ago.

    It's part of ComfyUI-ModelUtils, a grab-bag pack from silveroxides that's really a ComfyUI-native front end for the kind of model-inspection and LoRA-extraction scripts people usually run from the command line (the README credits kohya-ss/sd-scripts and KohakuBlueleaf's LyCORIS directly). silveroxides is better known outside this pack for GGUF quantizations - their Chroma-GGUF repo on HuggingFace is one of the ones the community actually trusts and links to when someone asks "which GGUF quant do I grab." So it tracks that the same person got tired of a diffusion_models folder full of similarly-named quant files and built something to make sense of them.

    How it works. The node doesn't scrape the internet on the spot - it reads locally cached info that was pulled down earlier, typically by this pack's own DiffusionModelInfoMetaDownloader node, which hashes your local files and fetches metadata (and example images/workflows) from wherever that info lives online. This loader is the read side of that pair: point it at a model, and it surfaces what got cached.

    Inputs that matter. diffusion_model is a dropdown of whatever's sitting in your local diffusion-models folder - that part's automatic. workflow_index (default 0, 0–100) is the one you'll actually touch: models can have more than one cached example, and this is which one you're asking for. Bump it up if you want to flip through alternates instead of always seeing the first one.

    Outputs. preview is an IMAGE you can wire straight into a Preview Image node - the example render tied to that index. workflow_json is the full workflow that generated it, as a string; pipe it into a Save Text node or a display node if you want to read it, or further downstream if you're building something that parses it. metadata_json is the model's own metadata blob - base model, description, whatever the source captured.

    Installing it. ComfyUI Manager, search "Model Utility Toolkit," install, restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/silveroxides/ComfyUI-ModelUtils
    

    Restart ComfyUI afterward. The README doesn't list any exotic Python dependencies beyond what ComfyUI and PyTorch already give you, and there's nothing to download separately to use this particular node - it only touches models already in your folder.

    Where this bites. The obvious one: empty outputs. If you never ran the matching downloader node against a given file, there's nothing cached to show, and you'll get blank strings and no image rather than an error - it's not going to reach out to the internet on your behalf just because you asked. Set workflow_index past however many examples actually got cached and you'll get the same nothing; it doesn't wrap around or clamp to the last valid one, it just comes up empty. And because this only reads what's local, renaming or moving your model file after the fact will orphan the cache - the node matches on the file it sees now, not on whatever hash-to-metadata mapping you had in mind. If in doubt, re-run the downloader.

    CategoryModelUtils/Info

    Inputs (2)

    NameTypeDefaultDescription
    diffusion_modelCOMBO0 options:
    workflow_indexINT00–100

    Outputs (3)

    NameTypeDescription
    previewIMAGE
    workflow_jsonSTRING
    metadata_jsonSTRING