Extensions/Model Utility Toolkit
ComfyUI Extension

Model Utility Toolkit

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

By silveroxides·Created about a year ago·Updated a day ago· 14
silveroxides/ComfyUI-ModelUtils
Nodes62
On cloudLocal install
CategoryModelUtils/LoRA, ModelUtils/Info
Stars14
Updateda day ago

Nodes (62)

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
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
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
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
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
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
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
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
Get Text Encoder Metadata & Keys

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

ModelUtils/Keys
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
ModelUtils/Keys
Merge Text Encoders (3 Models)
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)

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:

License

See LICENSE for details.