Nodes/Mikey Nodes/Checkpoint Hash (Mikey)
ComfyUI Node

Checkpoint Hash (Mikey)

Trace an image back to the exact checkpoint that made it

By bash-j·Created 3 years ago·Updated 10 months ago· 188
Checkpoint Hash (Mikey)
    • ckpt_hash
    ckpt_name

    Checkpoint files get renamed, re-uploaded, and re-shared constantly across Civitai and Discord - the filename you have on disk is not a reliable way to know exactly which version of a model you're actually using. A file hash is. Checkpoint Hash computes a hash string from a checkpoint file, the same general idea behind the resource hashes you see attached to generation metadata on Civitai and in A1111-style PNG info - a short fingerprint that identifies the exact file, independent of whatever name someone gave it.

    It's a small, single-purpose utility node: give it ckpt_name, get back ckpt_hash. The obvious pairing is with Add Metadata - compute the hash, stamp it onto your output image as a labeled metadata field, and now every image you generate carries a durable, unambiguous record of which checkpoint file actually made it, which matters a lot if you're running a lot of merges, fine-tunes, or near-identical checkpoint variants and need to tell them apart later without re-downloading and re-hashing everything by hand.

    The one input that matters is ckpt_name, and it's worth noting this is a plain string field on this node - not a dropdown pulling live from your models/checkpoints folder the way a standard checkpoint loader widget works. That means you need to type or wire in the exact filename, extension included, rather than clicking a name from a list. The output is ckpt_hash, a single string.

    Installing it

    Comes with the full Mikey Nodes pack. Through ComfyUI Manager, search "Mikey Nodes." Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bash-j/mikey_nodes
    

    Restart ComfyUI. No downloads needed for this node itself - it just reads whatever checkpoint file you point it at and hashes it.

    Common issues

    Because ckpt_name is a raw string rather than a live dropdown, the most common mistake is a typo or a mismatched extension - get the filename slightly wrong and you'll get a file-not-found style failure rather than a helpful nudge toward the correct name. If you're not sure of the exact filename, it's worth wiring this from a string that's already correct elsewhere in your graph, or simply copying the name directly out of your checkpoint loader node rather than retyping it from memory.

    Hashing a large checkpoint file (several gigabytes is normal for SDXL-class models) also isn't instant - if the node seems to be sitting there for a moment on first run, that's expected, not a hang; it's reading through the whole file.

    It's also worth being clear about what this node is for versus what it isn't. It doesn't validate the checkpoint, check it against a known-good hash, or warn you if a file has been tampered with - it just computes and returns a fingerprint. Any comparison against a "correct" hash (matching it against what Civitai lists for a given model version, for instance) is something you do yourself afterward, by eye or with another tool. Treat the output as a label for record-keeping and later identification, not as a security or integrity check on its own.

    CategoryMikey/Loaders

    Inputs (1)

    NameTypeDefaultDescription
    ckpt_nameSTRING

    Outputs (1)

    NameTypeDescription
    ckpt_hashSTRING