Advanced Model Data Extractor
Metadata Plus Every Readable String, at a Cost
- STRING
ModelDataExtractor is the third node in Sinphaltimus/comfyui_fedcoms_node_pack, and its display name tells you everything: "Advanced Model Data Extractor." This is the kitchen-sink version - structured metadata and raw text extraction in one output, for every format the pack claims. When you don't know what a model file even is, this is the node you run first. Just budget for it, because "Advanced" here partly means "slow."
How it works
.safetensors→ real header metadata viasafetensors.safe_open(). Fast, correct, and the useful part..ckpt,.pth,.pt,.bin,.gguf,.onnx→ routed totorch.load(). That's the catch: only the first four are pickle formats. GGUF and ONNX aren't pickles at all, sotorch.loadjust throws - the README's "supports .gguf, .onnx" is aspirational. And since PyTorch 2.6,torch.load()defaults toweights_only=True, which refuses most real checkpoints too. The author's own test log on an AnimateDiff.pthshows exactly this failure: "Weights only load failed."- Then it always scans the entire file as raw bytes with
chardetand decodes the first 2000 characters as "raw text." For real binaries that's mostly noise - the author's own run on a.ckptcame back "Encoding not detected."
The honest cost
This node reads the whole file - all of it - for the raw-text pass. On the author's test rig (an RTX 4090 with 128GB of RAM, not a weak machine), the Advanced node took about 16 minutes on a 528MB ONNX and nearly an hour on a 2GB checkpoint, per the shipped workflow's own timestamps. Blame the raw-text scan and a slow torch.load failure. The point: don't point this at a big file when all you need is metadata.
Inputs and output
One required input, model_path - a STRING, full absolute path, pasted in (no file browser). One STRING output containing a timestamped log, structured metadata as JSON, and the raw-text dump. Same shape as its two siblings in the pack; wire it into any display node. The included example workflow routes it into a "Display String" node and notes the expected slow extraction times.
Install
Same repo, same story:
cd ComfyUI/custom_nodes
git clone https://github.com/Sinphaltimus/comfyui_fedcoms_node_pack
or via ComfyUI Manager, searching "comfyui_fedcoms_node_pack". No model downloads; requirements.txt is standard library plus torch, safetensors, and chardet - everything a stock ComfyUI already has except possibly chardet, which Manager installs automatically.
The take
Use it when you genuinely don't know what a file is, or when you want the raw string dump - LoRA layer names, the "exported from" markers, strings that never make it into the metadata header. Otherwise, for plain safetensors metadata, its basic sibling ModelMetadataReader does the same useful work in a fraction of a second. This one's a sledgehammer. Know when to leave it in the drawer.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_path | STRING | Enter full model path here | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |