Nodes/Suplex Misc ComfyUI Nodes/Model Weight Dumper
ComfyUI Node

Model Weight Dumper

Open up any loaded model and read its weight keys

By saftle·Created 2 years ago·Updated 8 months ago· 3
Model Weight Dumper
  • model
  • weight_info
show_shapestrue
filter_prefix

Every now and then you need to see inside a model: what layers actually exist, what shape the tensors are, whether a custom loader is reading the right keys. ComfyUI doesn't give you a window into that from the graph - until you add a node like this one. Model Weight Dumper takes any MODEL socket and dumps its weight keys to a string you can read, with optional shape and dtype info and a prefix filter so you're not drowning in ten thousand lines.

It's a debugging tool, and it's honest about being one. When your custom checkpoint loader throws "unexpected key" errors, or you want to confirm a model loaded as fp16 rather than fp32, or you're comparing two checkpoints to see whether their layer structures match, this node turns a black box into a scrollable list.

How it works

It unwraps the MODEL object down to its state dict, sorts the keys, and builds a report:

Total weights: 754

model.diffusion_model.input_blocks.0.0.weight → (320, 4, 3, 3) (torch.float16)
model.diffusion_model.input_blocks.1.0.in_layers.0.weight → (320, 320, 3, 3) (torch.float16)
...

With show_shapes on (the default), each key gets its shape and dtype appended. With filter_prefix set, only keys starting with that prefix are listed, and the report notes how many matched.

Inputs and output

  • model - MODEL socket, straight from a Checkpoint Loader or anything else that produces one.
  • show_shapes - BOOLEAN, default true. Flip it off for a bare key list, handy for diffing two models' structures.
  • filter_prefix - STRING, default empty. Set e.g. model.diffusion_model.input_blocks to inspect only the encoder's weights (the README's example is model.diffusion_model.input_blocks.0.0.weight → (320, 4, 3, 3)).
  • Output: weight_info - STRING. Wire it into a text-display node to actually see it in the UI.

Where people get burned

The output is enormous if you don't filter - a full model is thousands of keys, and printing all of them into the UI is slow and useless. Decide what you're looking for and set filter_prefix first; it's the difference between "inspect one block" and "scroll for an hour." Also worth knowing: the node reads weights as loaded, so the dtypes you see reflect your loader and any quantization, not the file on disk. Pair it with Model Similarity Node (same pack) for the "dump first, then compare" debugging flow.

Install

Standard for this pack: ComfyUI Manager → search "uber_comfy_nodes" ("Suplex Misc ComfyUI Nodes") → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/saftle/uber_comfy_nodes

Restart, look under Uber Comfy. Requirements are Pillow, numpy, psutil and pynvml - nothing exotic, no model files to download.

CategoryUber Comfy

Inputs (3)

NameTypeDefaultDescription
modelMODEL
show_shapesBOOLEANtrue
filter_prefixSTRING

Outputs (1)

NameTypeDescription
weight_infoSTRING