Nodes/Model Utility Toolkit/Get Embedding Metadata & Keys
ComfyUI Node

Get Embedding Metadata & Keys

Get Embedding Metadata & Keys — peek inside a .safetensors embedding

By silveroxides·Created about a year ago·Updated 4 days ago· 14
Get Embedding Metadata & Keys
    • metadata
    • keys
    embedding

    Embeddings are the most opaque files in your whole model folder. A checkpoint at least announces itself - big file, obvious name. An embedding is 20-80KB of numbers with a trigger word slapped on the filename, and unless you trust whoever uploaded it, you have no idea what's actually inside. Get Embedding Metadata & Keys is the node that answers that: point it at an embedding you already have loaded in ComfyUI, and it reads the file's header and hands back the metadata block and the tensor key names, no execution, no guessing.

    It comes from silveroxides' ComfyUI-ModelUtils pack - the same author who ships the Chroma-GGUF quantizations a lot of the Chroma crowd runs without even knowing it. This particular node is the read-only inspector in a toolkit that's otherwise about editing and merging model files.

    How it works. A .safetensors file is just an 8-byte length prefix, a JSON header, then raw tensor bytes - nothing in it executes, which is the entire reason the format replaced pickle-based .ckpt files. That JSON header is where the interesting stuff lives: an optional free-form __metadata__ string map (where trainers sometimes stash notes, training settings, or attribution) and a dictionary of tensor names mapped to shape and dtype. This node reads that header and returns two things: the metadata block as one string, and the list of tensor key names as another. It doesn't touch the tensor data itself, so it's fast regardless of the embedding's size.

    Inputs and outputs. There's exactly one input worth knowing: embedding, a dropdown of whatever's in your embeddings folder. Two outputs come back - metadata (the __metadata__ block, if the file has one; plenty don't) and keys (every tensor name inside the file). Wire both to a text-display node like Show Text if you want to actually read them, since this node just returns strings, it doesn't print anything on its own.

    Installing it. Search "Model Utility Toolkit" in ComfyUI Manager, or clone it by hand: cd ComfyUI/custom_nodes && git clone https://github.com/silveroxides/ComfyUI-ModelUtils, then restart. The README doesn't call out any extra dependencies or model downloads - it works on embedding files you already have.

    Where this actually earns its keep. Two situations. First, before you use EmbeddingPruneKeys or EmbeddingRenameKeys from the same pack - both of those need you to type in exact key names, and guessing wrong just means nothing matches and nothing happens. Run this first, copy the real names. Second, when you've downloaded a mystery embedding and want to sanity-check it before loading it into a workflow - an empty metadata output isn't a bug, most embeddings simply don't carry one; but a keys list with a wildly unexpected shape or count is a decent tell that the embedding was trained for a different text encoder than you think.

    That last point matters more than it sounds. Embeddings are locked to the exact text encoder they were trained against - an SD 1.5 embedding is CLIP ViT-L/14 vectors, and swapping to OpenCLIP or a Qwen3-class encoder (what current architectures like Z-Image and Flux 2 actually use) makes those vectors meaningless. Nothing in ComfyUI warns you when an incompatible embedding silently does nothing; it just gets ignored. This node won't tell you outright whether an embedding is compatible with your checkpoint, but the key names and shapes it returns are the closest thing to a paper trail you'll get without opening the file in a hex editor.

    One easy trip-up: this node isn't marked as a workflow output, so if you leave its outputs dangling with nothing downstream, ComfyUI's graph pruning may skip running it entirely. Wire metadata or keys into something before hitting Queue.

    CategoryModelUtils/Keys

    Inputs (1)

    NameTypeDefaultDescription
    embeddingCOMBO0 options:

    Outputs (2)

    NameTypeDescription
    metadataSTRING
    keysSTRING