Model Pruner (mtb)
Shrink a checkpoint on disk (experimental, but useful)
- unet
- clip
- vae
Checkpoints are fat, and a lot of that fat is stuff you don't need to keep on disk. Model Pruner is MTB's node for slimming one down - convert the weights to a smaller precision, strip the EMA copy, drop junk keys, and save a lighter file. If you've got a 6GB fp32 checkpoint that could be a 2GB fp16, this is how you cut it without leaving ComfyUI.
Fair warning up front, straight from the node's own description: this is experimental. It works, people use it, but treat the output as something to verify rather than trust blindly. Prune a copy, load it back, make sure it still generates before you delete the original.
How it works
It's an output node - it doesn't hand you a MODEL to keep chaining, it writes a file to disk and stops. You wire in whichever components you want to keep (the UNet, the CLIP, the VAE - all optional), tell it what to do with each, and it saves a new checkpoint. The savings come from three places: dropping the EMA weights (a second copy of the UNet used during training that you don't need for inference), converting precision (fp16 is half the size of fp32 for a negligible quality difference in most cases), and removing junk metadata keys.
The inputs and outputs that matter
The three model inputs - unet (MODEL), clip (CLIP), vae (VAE) - are all optional; wire the ones you want in the output. For each, there's a matching pair of knobs:
precision_unet/precision_clip/precision_vae-full,fp32,fp16,bf16, orfp8. fp16 is the standard "make it half the size" choice. fp8 is aggressive and can cost quality - test it.operation_unet/operation_clip/operation_vae-copy(keep as-is),convert(change precision), ordelete(drop this component entirely).ema_mode-remove_ema(the usual choice, drops the training copy),disabled, orema_only.fix_clipandremove_junk(both default true) - clean up a broken CLIP and strip junk keys.save_folder(defaultcheckpoints/ComfyUI) - where it lands. A relative path is relative to ComfyUI's output directory.save_separatelysplits the components into separate files instead of one checkpoint.
There are no node outputs - the result is the saved file.
How to install it
Via ComfyUI Manager: search MTB Nodes, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
then restart. No extra models.
Common issues & troubleshooting
The pruned model looks worse. Precision is the usual culprit. fp16 is almost always safe; fp8 trades real quality for size and isn't a free lunch. If quality dropped, re-prune at fp16 (or bf16) before blaming anything else.
I can't find the output file. Check save_folder - a relative path saves under ComfyUI's output folder, not models/checkpoints. Move it into your checkpoints folder afterward, or point save_folder at an absolute path.
Nothing happens / it's an output node. Right - you can't feed its result into a sampler in the same graph. It writes a file; you load that file in a fresh run. Queue the prompt, then go find the checkpoint on disk.
It's experimental, so verify. Load the pruned checkpoint and generate a test image before you throw away the original. Dedicated prune scripts exist too; this node is the convenient in-Comfy option, not the only one.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| save_separately | BOOLEAN | false | — |
| save_folder | STRING | checkpoints/ComfyUI | — |
| fix_clip | BOOLEAN | true | — |
| remove_junk | BOOLEAN | true | — |
| ema_mode | COMBO | remove_ema | 3 options: disabled, remove_ema, ema_only |
| precision_unet | COMBO | full | 5 options: full, fp32, fp16, bf16, fp8 |
| operation_unet | COMBO | convert | 3 options: copy, convert, delete |
| precision_clip | COMBO | full | 5 options: full, fp32, fp16, bf16, fp8 |
| operation_clip | COMBO | convert | 3 options: copy, convert, delete |
| precision_vae | COMBO | full | 5 options: full, fp32, fp16, bf16, fp8 |
| operation_vae | COMBO | convert | 3 options: copy, convert, delete |
| unetopt | MODEL | — | |
| clipopt | CLIP | — | |
| vaeopt | VAE | — |
Outputs (0)
No outputs