Model Utility Toolkit
[WIP]Custom nodes for handling, inspecting, modifying and creating various model files.
Nodes (103)
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
Compare two checkpoints before you merge them — and find out if merging is even worth it
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
Three checkpoints into one, where the blend adapts per layer
CWB's adaptive blend
Take the wheel from CWB presets — the config node behind every CWB merge
Merge 2 to 8 embeddings into one file without a training run
Shrink an embedding by deleting its redundant rows
Merge three embeddings into one vector file
Merge two embeddings into one vector file
Merge 2 to 8 LoRAs in one go — the CWB LoRA blender that scales
Three LoRAs into one file, blended by consensus per layer
Merge two LoRAs into one file with CWB, instead of stacking them in a workflow
Three UNets/DiTs, one consensus-merged denoiser
Merge two diffusion models (UNet/DiT) with a per-layer consensus blend
Three text encoders, one consensus-merged CLIP
Merge two CLIP text encoders with a consensus blend
2 to 8 LoRAs, merged by consensus instead of by average
The CWB consensus merge with a third vote
What 'Delta CWB' actually does with two inputs
Two diffusion models, zero merges — see how similar they really are first
Resize a diffusion model's precision without re-downloading it
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
Compare two embeddings without guessing which tokens match
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
Layer Parameter Configuration
The batch merge that normalizes each one first
Merge three LoRAs into one file without triple-stacking the weights
When two LoRAs fight, merge the weight deltas instead of stacking them
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)
Two LoRAs, same concept? Check before you merge them
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
Bake a LoRA's Alpha Into Its Weights (and Drop the Alpha Tensors)
Measuring its effect on a diffusion model
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/
Your MiniMax H3 LoRA Loads Fine and Does Nothing
MiniMax H3 Full-Width AdaLN, Folded Down to Rank 8
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
Extract a text-encoder DoRA at a fixed rank, no training required
Extract a text-encoder DoRA that keeps a target share of the energy
Let the singular values pick the rank
DoRA for text encoders, rank by quantile
DoRA for text encoders, rank by ratio
Turn a fine-tuned text encoder into a LoRA — no training run required
Keep X% of the Frobenius norm
The LoRA node that picks its own rank
Keep enough singular values to reach 90%
Keep the singular values that actually matter
Inspect a CLIP/T5 file before you merge or debug it
How different are they, really?
Prune Text Encoder Keys — strip tensors out of a standalone CLIP/T5/Qwen encoder file
When your text encoder ships with the wrong labels
Merging three text encoders you almost certainly don't have to
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)
- Diffusion Model Dtype Conversion – Stream models to fp32, fp16, or bf16 while preserving excluded tensor dtypes
Layer filters
Nodes with exclude_patterns or skip_patterns have an appended include_mode toggle
(off by default). Turn it on to process only layers matching that same field,
using the node's existing regex or glob syntax. An empty include filter selects
nothing. Nonmatches follow the node's usual exclusion behavior: preserve the
source/anchor layer for pattern-exclusion mergers, resize, or conversion; omit
it from analysis or extraction. LoRA Merge to Model retains its existing skip
semantics: nonmatching base tensors are omitted from the saved model, while
guarded low-bit base tensors are always preserved. Its filter uses regex only.
discard_patterns, where available, still takes precedence.
Example Workflows
Per-layer parameters
Connect Layer Parameter Configuration to layer_parameters on standard
two/three-input mergers, extraction nodes, or LoRA resize nodes. For example,
fixed extraction accepts (blocks\.4[589]\.attn\.qkv_proj) a:64 b:32 c:0.99 d:0.
Short aliases and full names, with whitespace or comma separators, are supported.
The configurator's documentation output lists every method's bindings and bounds.
Only explicitly assigned values override the receiving node; other settings and existing filters still apply. Overlapping rules and rules matching no target layer fail before streaming or writing. LoRA patterns target the existing normalized logical layer names, not individual factor/alpha suffixes.
<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.