Extensions/Model Utility Toolkit
ComfyUI Extension

Model Utility Toolkit

[WIP]Custom nodes for handling, inspecting, modifying and creating various model files.

By silveroxides·Created 2 years ago·Updated 2 days ago· 17
silveroxides/ComfyUI-ModelUtils
Nodes103
On cloudLocal install
CategoryModelUtils/LoRA, ModelUtils/Info
Stars17
Updated2 days ago

Nodes (103)

Anima LoRA Rename (Diffusers to Non-Diffusers)

Fix a diffusers-format Anima LoRA for native ComfyUI loaders

ModelUtils/LoRA
Checkpoint Info Loader

Pull the preview image and embedded workflow out of a checkpoint

ModelUtils/Info
Checkpoint Downloader

Checkpoint Downloader — bulk-fetch metadata for every checkpoint you own

ModelUtils/Downloader
Get Checkpoint Metadata & Keys

What's actually inside a safetensors checkpoint

ModelUtils/Keys
Analyze Checkpoint Similarity (2 Models)

Compare two checkpoints before you merge them — and find out if merging is even worth it

ModelUtils/Analysis
Prune Checkpoint Keys

Strip unwanted tensors out of a checkpoint file

ModelUtils/Keys
Rename Checkpoint Keys

Rename Checkpoint Keys — fix a checkpoint whose layer names don't match

ModelUtils/Keys
Merge Checkpoints (3 Models)

A third input for when two-way blending isn't enough

ModelUtils/Merging
Merge Checkpoints (2 Models)

Blend two full checkpoints with actual controls

ModelUtils/Merging
ControlNet Info Loader

ControlNet Info Loader — untangle a folder of identically-named ControlNets

ModelUtils/Info
ControlNet Downloader

ControlNet Downloader — build a local index of what each ControlNet actually does

ModelUtils/Downloader
CWB Merge Checkpoints (3 Models)

Three checkpoints into one, where the blend adapts per layer

ModelUtils/Merging
CWB Merge Checkpoints (2 Models)

CWB's adaptive blend

ModelUtils/Merging
CWB Custom Configuration

Take the wheel from CWB presets — the config node behind every CWB merge

ModelUtils/Merging/Configuration
CWB Embedding Multi-Merge

Merge 2 to 8 embeddings into one file without a training run

ModelUtils/Embeddings/Merge
CWB Embedding Self-Coalesce

Shrink an embedding by deleting its redundant rows

ModelUtils/Embeddings/Merge
CWB Merge Embeddings (3 Models)

Merge three embeddings into one vector file

ModelUtils/Merging
CWB Merge Embeddings (2 Models)

Merge two embeddings into one vector file

ModelUtils/Merging
CWB LoRA Multi-Merge

Merge 2 to 8 LoRAs in one go — the CWB LoRA blender that scales

ModelUtils/LoRA/Merge
CWB Merge LoRAs (3 Models)

Three LoRAs into one file, blended by consensus per layer

ModelUtils/Merging
CWB Merge LoRAs (2 Models)

Merge two LoRAs into one file with CWB, instead of stacking them in a workflow

ModelUtils/Merging
CWB Merge Models (3 Models)

Three UNets/DiTs, one consensus-merged denoiser

ModelUtils/Merging
CWB Merge Models (2 Models)

Merge two diffusion models (UNet/DiT) with a per-layer consensus blend

ModelUtils/Merging
CWB Merge Text Encoders (3 Models)

Three text encoders, one consensus-merged CLIP

ModelUtils/Merging
CWB Merge Text Encoders (2 Models)

Merge two CLIP text encoders with a consensus blend

ModelUtils/Merging
Delta CWB LoRA Multi-Merge

2 to 8 LoRAs, merged by consensus instead of by average

ModelUtils/LoRA/Merge/Delta CWB
Delta CWB Merge LoRAs (3)

The CWB consensus merge with a third vote

ModelUtils/LoRA/Merge/Delta CWB
Delta CWB Merge LoRAs (2)

What 'Delta CWB' actually does with two inputs

ModelUtils/LoRA/Merge/Delta CWB
Analyze Diffusion Model Similarity (2 Models)

Two diffusion models, zero merges — see how similar they really are first

ModelUtils/Analysis
Diffusion Model Dtype Conversion

Resize a diffusion model's precision without re-downloading it

ModelUtils/Conversion
Diffusion Model Info Loader

Diffusion Model Info Loader — see what a .safetensors file actually is

ModelUtils/Info
Diffusion Model Downloader

Diffusion Model Downloader — make sense of a folder full of quant files

ModelUtils/Downloader
DoRA Extract (Fixed Rank)

Pull an adapter out of a base/finetune pair at a rank you choose

ModelUtils/DoRA
DoRA Extract (Frobenius)

Adaptive-rank extraction that targets quality, not a fixed size

ModelUtils/DoRA
DoRA Extract (Knee Detection)

DoRA Extract (Knee Detection) — pull a DoRA out of two checkpoints, automatically

ModelUtils/DoRA
DoRA Extract (Quantile)

DoRA Extract (Quantile) — extract a DoRA sized by how much energy you want to keep

ModelUtils/DoRA
DoRA Extract (Ratio)

DoRA Extract (Ratio) — extract a DoRA by relative singular-value magnitude

ModelUtils/DoRA
DoRA Learned Extract (Fixed Rank) (WIP)

DoRA Learned Extract (Fixed Rank) — SVD extraction refined by gradient descent

ModelUtils/DoRA
DoRA Learned Extract (Frobenius) (WIP)

DoRA Learned Extract (Frobenius) — target energy retention, then refine it

ModelUtils/DoRA
DoRA Learned Extract (Knee Detection) (WIP)

DoRA Learned Extract (Knee Detection) — automatic rank, then gradient-refined

ModelUtils/DoRA
DoRA Learned Extract (Quantile) (WIP)

DoRA Learned Extract (Quantile) — percentage-targeted extraction, gradient-refined

ModelUtils/DoRA
DoRA Learned Extract (Ratio) (WIP)

DoRA Learned Extract (Ratio) — magnitude-threshold extraction, gradient-refined

ModelUtils/DoRA
Embedding Info Loader

Embedding Info Loader — read the label on a 30KB mystery file

ModelUtils/Info
Embedding Downloader

Bulk-fetch metadata and previews for your textual inversions

ModelUtils/Downloader
Get Embedding Metadata & Keys

Get Embedding Metadata & Keys — peek inside a .safetensors embedding

ModelUtils/Keys
Analyze Embedding Similarity (2 Models)

Compare two embeddings without guessing which tokens match

ModelUtils/Analysis
Prune Embedding Keys

Prune Embedding Keys — strip tensors out of a .safetensors embedding

ModelUtils/Keys
Rename Embedding Keys

Rename Embedding Keys — fix tensor naming inside a .safetensors embedding

ModelUtils/Keys
Merge Embeddings (3 Models)

Merge Embeddings (3 Models) — blend three textual inversions into one

ModelUtils/Merging
Merge Embeddings (2 Models)

Merge Embeddings (2 Models) — blend two .safetensors embeddings into one

ModelUtils/Merging
Layer Parameter Configuration

Layer Parameter Configuration

ModelUtils/Configuration
Lodestone LoRA Multi-Merge

The batch merge that normalizes each one first

ModelUtils/LoRA/Merge/Lodestone
Lodestone Merge LoRAs (3)

Merge three LoRAs into one file without triple-stacking the weights

ModelUtils/LoRA/Merge/Lodestone
Lodestone Merge LoRAs (2)

When two LoRAs fight, merge the weight deltas instead of stacking them

ModelUtils/LoRA/Merge/Lodestone
LoRA Extract (Fixed Rank)

LoRA Extract (Fixed Rank) — pull a LoRA out of two checkpoints

ModelUtils/LoRA
LoRA Extract (Frobenius)

LoRA Extract (Frobenius) — extract a LoRA sized by norm retention, not rank

ModelUtils/LoRA
LoRA Extract (Knee Detection)

LoRA Extract (Knee Detection) — auto-rank LoRA extraction from two checkpoints

ModelUtils/LoRA
LoRA Extract (Quantile)

LoRA Extract (Quantile) — extract a LoRA by cumulative singular-value mass

ModelUtils/LoRA
LoRA Extract (Ratio)

LoRA Extract (Ratio) — extract a LoRA by singular-value ratio threshold

ModelUtils/LoRA
LoRA Info Loader

Pull the preview image and embedded workflow out of a LoRA file

ModelUtils/Info
LoRA Downloader

LoRA Downloader — bulk-fetch metadata and previews for your LoRA folder

ModelUtils/Downloader
LoRA Merge To Model

Bake up to 8 LoRAs permanently into a checkpoint

ModelUtils/LoRA/Merge
Get LoRA Metadata & Keys

See what a LoRA actually trained (and every tensor it has)

ModelUtils/Keys
Analyze LoRA Similarity (2 Models)

Two LoRAs, same concept? Check before you merge them

ModelUtils/Analysis
LoRA Multi-Merge

Combine up to 8 LoRAs into one file, ranks and naming resolved

ModelUtils/LoRA/Merge
LoRA Multi-Merge (DARE-Ties)

LoRA Multi-Merge (DARE-Ties) — combine up to 8 LoRAs without them fighting

ModelUtils/LoRA/Merge
LoRA Multi-Merge (Enhanced DARE-Ties)

LoRA Multi-Merge (Enhanced DARE-Ties) — magnitude-aware LoRA merging for up to 8 LoRAs

ModelUtils/LoRA/Merge
LoRA Normalize Alpha

Bake a LoRA's Alpha Into Its Weights (and Drop the Alpha Tensors)

ModelUtils/LoRA/Utilities
Analyze LoRA Effect on Diffusion Model

Measuring its effect on a diffusion model

ModelUtils/Analysis
Prune LoRA Keys

Prune LoRA Keys — strip tensors out of a LoRA .safetensors file

ModelUtils/Keys
Rename LoRA Keys

Fix mismatched tensor names without retraining anything

ModelUtils/Keys
LoRA Resize (Cumulative)

LoRA Resize (Cumulative) — shrink a LoRA without hand-picking a rank

ModelUtils/LoRA/Resize
LoRA Resize (Fixed Rank)

LoRA Resize (Fixed Rank) — shrink or resize an existing LoRA

ModelUtils/LoRA/Resize
LoRA Resize (Frobenius)

LoRA Resize (Frobenius) — shrink a LoRA to a target fidelity, not a fixed rank

ModelUtils/LoRA/Resize
LoRA Resize (SV Ratio)

LoRA Resize (SV Ratio) — resize a LoRA by singular-value threshold

ModelUtils/LoRA/Resize
Merge LoRAs (3 Models)

Three LoRA files through the generic weighted-merge engine

ModelUtils/Merging
Merge LoRAs (2 Models)

Blend two LoRA files with the same engine as the checkpoint mergers

ModelUtils/Merging
Manual Path Downloader

Manual Path Downloader — fetch model metadata from any folder, not just loras/

ModelUtils/Downloader
MiniMax H3 Diffusers LoRA Convert

Your MiniMax H3 LoRA Loads Fine and Does Nothing

ModelUtils/LoRA
MiniMax H3 Fold AdaLN

MiniMax H3 Full-Width AdaLN, Folded Down to Rank 8

ModelUtils/DiffusionModels
Get Diffusion Model Metadata & Keys

Get Diffusion Model Metadata & Keys — open the hood on a .safetensors file

ModelUtils/Keys
Prune Diffusion Model Keys

Prune Diffusion Model Keys — strip tensors out of a checkpoint file

ModelUtils/Keys
Rename Diffusion Model Keys

Rename Diffusion Model Keys — fix tensor naming across checkpoint formats

ModelUtils/Keys
Merge Models (3 Models)

Three-way blending for UNet-only diffusion models

ModelUtils/Merging
Merge Models (2 Models)

Blend two UNet-only diffusion models

ModelUtils/Merging
TE DoRA Extract (Fixed Rank)

Extract a text-encoder DoRA at a fixed rank, no training required

ModelUtils/DoRA Extract (TE)
TE DoRA Extract (Frobenius)

Extract a text-encoder DoRA that keeps a target share of the energy

ModelUtils/DoRA Extract (TE)
TE DoRA Extract (Knee)

Let the singular values pick the rank

ModelUtils/DoRA Extract (TE)
TE DoRA Extract (Quantile)

DoRA for text encoders, rank by quantile

ModelUtils/DoRA Extract (TE)
TE DoRA Extract (Ratio)

DoRA for text encoders, rank by ratio

ModelUtils/DoRA Extract (TE)
TE LoRA Extract (Fixed Rank)

Turn a fine-tuned text encoder into a LoRA — no training run required

ModelUtils/LoRA Extract (TE)
TE LoRA Extract (Frobenius)

Keep X% of the Frobenius norm

ModelUtils/LoRA Extract (TE)
TE LoRA Extract (Knee)

The LoRA node that picks its own rank

ModelUtils/LoRA Extract (TE)
TE LoRA Extract (Quantile)

Keep enough singular values to reach 90%

ModelUtils/LoRA Extract (TE)
TE LoRA Extract (Ratio)

Keep the singular values that actually matter

ModelUtils/LoRA Extract (TE)
Get Text Encoder Metadata & Keys

Inspect a CLIP/T5 file before you merge or debug it

ModelUtils/Keys
Analyze Text Encoder Similarity (2 Models)

How different are they, really?

ModelUtils/Analysis
Prune Text Encoder Keys

Prune Text Encoder Keys — strip tensors out of a standalone CLIP/T5/Qwen encoder file

ModelUtils/Keys
Rename Text Encoder Keys

When your text encoder ships with the wrong labels

ModelUtils/Keys
Merge Text Encoders (3 Models)

Merging three text encoders you almost certainly don't have to

ModelUtils/Merging
Merge Text Encoders (2 Models)

Blend two CLIP/T5 files at the weight level

ModelUtils/Merging
VAE Info Loader

VAE Info Loader — figure out which VAE file is which

ModelUtils/Info
VAE Downloader

VAE Downloader — fetch metadata for the VAE files you actually keep around

ModelUtils/Downloader
Readme

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:

License

See LICENSE for details.