Model Utility Toolkit
[WIP]Custom nodes for handling, inspecting, modifying and creating various model files.
Nodes (62)
Fix a diffusers-format Anima LoRA for native ComfyUI loaders
Pull the preview image and embedded workflow out of a checkpoint
Checkpoint Downloader — bulk-fetch metadata for every checkpoint you own
What's actually inside a safetensors checkpoint
Strip unwanted tensors out of a checkpoint file
Rename Checkpoint Keys — fix a checkpoint whose layer names don't match
A third input for when two-way blending isn't enough
Blend two full checkpoints with actual controls
ControlNet Info Loader — untangle a folder of identically-named ControlNets
ControlNet Downloader — build a local index of what each ControlNet actually does
Diffusion Model Info Loader — see what a .safetensors file actually is
Diffusion Model Downloader — make sense of a folder full of quant files
Pull an adapter out of a base/finetune pair at a rank you choose
Adaptive-rank extraction that targets quality, not a fixed size
DoRA Extract (Knee Detection) — pull a DoRA out of two checkpoints, automatically
DoRA Extract (Quantile) — extract a DoRA sized by how much energy you want to keep
DoRA Extract (Ratio) — extract a DoRA by relative singular-value magnitude
DoRA Learned Extract (Fixed Rank) — SVD extraction refined by gradient descent
DoRA Learned Extract (Frobenius) — target energy retention, then refine it
DoRA Learned Extract (Knee Detection) — automatic rank, then gradient-refined
DoRA Learned Extract (Quantile) — percentage-targeted extraction, gradient-refined
DoRA Learned Extract (Ratio) — magnitude-threshold extraction, gradient-refined
Embedding Info Loader — read the label on a 30KB mystery file
Bulk-fetch metadata and previews for your textual inversions
Get Embedding Metadata & Keys — peek inside a .safetensors embedding
Prune Embedding Keys — strip tensors out of a .safetensors embedding
Rename Embedding Keys — fix tensor naming inside a .safetensors embedding
Merge Embeddings (3 Models) — blend three textual inversions into one
Merge Embeddings (2 Models) — blend two .safetensors embeddings into one
LoRA Extract (Fixed Rank) — pull a LoRA out of two checkpoints
LoRA Extract (Frobenius) — extract a LoRA sized by norm retention, not rank
LoRA Extract (Knee Detection) — auto-rank LoRA extraction from two checkpoints
LoRA Extract (Quantile) — extract a LoRA by cumulative singular-value mass
LoRA Extract (Ratio) — extract a LoRA by singular-value ratio threshold
Pull the preview image and embedded workflow out of a LoRA file
LoRA Downloader — bulk-fetch metadata and previews for your LoRA folder
Bake up to 8 LoRAs permanently into a checkpoint
See what a LoRA actually trained (and every tensor it has)
Combine up to 8 LoRAs into one file, ranks and naming resolved
LoRA Multi-Merge (DARE-Ties) — combine up to 8 LoRAs without them fighting
LoRA Multi-Merge (Enhanced DARE-Ties) — magnitude-aware LoRA merging for up to 8 LoRAs
Prune LoRA Keys — strip tensors out of a LoRA .safetensors file
Fix mismatched tensor names without retraining anything
LoRA Resize (Cumulative) — shrink a LoRA without hand-picking a rank
LoRA Resize (Fixed Rank) — shrink or resize an existing LoRA
LoRA Resize (Frobenius) — shrink a LoRA to a target fidelity, not a fixed rank
LoRA Resize (SV Ratio) — resize a LoRA by singular-value threshold
Three LoRA files through the generic weighted-merge engine
Blend two LoRA files with the same engine as the checkpoint mergers
Manual Path Downloader — fetch model metadata from any folder, not just loras/
Get Diffusion Model Metadata & Keys — open the hood on a .safetensors file
Prune Diffusion Model Keys — strip tensors out of a checkpoint file
Rename Diffusion Model Keys — fix tensor naming across checkpoint formats
Three-way blending for UNet-only diffusion models
Blend two UNet-only diffusion models
Inspect a CLIP/T5 file before you merge or debug it
Prune Text Encoder Keys — strip tensors out of a standalone CLIP/T5/Qwen encoder file
Blend two CLIP/T5 files at the weight level
VAE Info Loader — figure out which VAE file is which
VAE Downloader — fetch metadata for the VAE files you actually keep around
ComfyUI-ModelUtils
A collection of ComfyUI custom nodes for inspecting, modifying, merging, and creating model files. Supports Models, TextEncoders, LoRAs, Checkpoints, and Embeddings.
Features
- MetaKeys – Inspect and display metadata and tensor keys from model files
- RenameKeys – Batch rename tensor keys using pattern matching
- PruneKeys – Remove unwanted layers/keys from models
- Mergers – Combine 2 or 3 models with configurable blend modes and ratios
- LoRA Extraction – Extract LoRA adapters from model pairs using various SVD rank selection methods (Fixed, Ratio, Quantile, Knee-detection, Frobenius-norm)
Example Workflows
<p align="center"> <img src="assets/GetMetaAndkeys.png" width="400" alt="Get Meta and Keys"> <br> <a href="example_workflows/GetMetaAndkeys.json">📥 GetMetaAndkeys.json</a> </p><p align="center"> <img src="assets/LoRA_Extract_nodes.png" width="400" alt="LoRA Extraction Nodes"> <br> <a href="example_workflows/LoRA_Extract_nodes.json">📥 LoRA_Extract_nodes.json</a> </p>
<p align="center"> <img src="assets/Merging_Examples.png" width="400" alt="Merging Examples"> <br> <a href="example_workflows/Merging_Examples.json">📥 Merging_Examples.json</a> </p>
<p align="center"> <img src="assets/RenameKeysInModel.png" width="400" alt="Rename Keys in Model"> <br> <a href="example_workflows/RenameKeysInModel.json">📥 RenameKeysInModel.json</a> </p>
Acknowledgements
The LoRA extraction functionality was inspired by and references the excellent work from:
- kohya-ss/sd-scripts – Training scripts for Stable Diffusion
- KohakuBlueleaf/LyCORIS – Advanced LoRA techniques
- bmaltais/kohya_ss – Windows-friendly GUI for sd-scripts
License
See LICENSE for details.