Model Similarity Node
Is that 'new' checkpoint actually new? This tells you in seconds
- base_model
- target_model
- similarity_report
Model hubs are full of "brand new" checkpoints that turn out to be someone's 50/50 merge of two existing models with a fresh name. Sometimes that's fine - a good merge is a legitimately useful artifact. Sometimes it's a reupload farming downloads, or you're evaluating a model and want to know how much of it is actually new versus inherited. Model Similarity Node answers the question numerically: feed it two MODEL sockets and it compares their attention layers, returning a single similarity percentage.
The README gives you the rough interpretation, and it's a genuinely useful yardstick:
- 0–5% - truly independent training
- 60–90% - a fine-tune or weight-merge of the base
- 95%+ - nearly identical weights
So the workflow everyone actually uses this for: load the suspicious download as one model, load the base you suspect it was trained from as the other, run it. If you get 90%+, you're looking at a merge wearing a new name. If you get single digits, it's a genuinely different training run. That's a much better answer than squinting at sample images.
How it works
The node unwraps both models to their weight dictionaries, then scans the self-attention layers across the input, middle and output blocks - the transformer_blocks.0.attn1 query/key/value weights. For each matching layer it feeds a fixed random tensor through each model's attention and computes the cosine similarity of the attention outputs, then averages across all matched blocks. The random input is seeded (114514, if you must know), so results are reproducible run to run.
Why attention and not raw weights? Cosine similarity over a whole raw weight dump is dominated by a handful of big tensors and tells you little about behavior. Attention outputs are a fingerprint of how the model processes input - which is the thing that actually changes when someone fine-tunes or merges. And feeding both models the same fixed input makes it apples-to-apples instead of comparing two models on their own random terms.
The result comes back as a string like Similarity: 87.34% (compared 17 blocks), which you can read with any text-display node.
Inputs and output
base_model- MODEL socket (from a Checkpoint Loader)target_model- MODEL socket (from a second Checkpoint Loader)- Output:
similarity_report- STRING
Honest caveats
Two full checkpoints have to be loaded into VRAM at once, which is trivial for SD1.5 but gets uncomfortable with big Flux checkpoints. The node is tested on SD1.x and SDXL - if the layer keys don't match the expected pattern, it reports "No matching attention layers found in both models." And it's a heuristic, not a proof: two independently-trained models on the same base can still land in the 60s because they share so much DNA. Use it as a strong signal, not a court ruling.
The broader point from our KB's checkpoint essays is worth stating: the community has noticed a convergence problem where increasingly many models are inheriting each other's weights. This node is the cheap way to check how much of what you're about to use is actually new - and it pairs naturally with Model Weight Dumper, also in this pack, when you want to see where the differences live.
Install
ComfyUI Manager → search "uber_comfy_nodes" ("Suplex Misc ComfyUI Nodes") → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/saftle/uber_comfy_nodes
Restart, find it under Uber Comfy. Requirements are Pillow, numpy, psutil, pynvml - nothing heavy, no model downloads beyond the checkpoints you're already loading.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| base_model | MODEL | — | |
| target_model | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| similarity_report | STRING | — |