ArtificialGuyBR

Home / Blog / Fixing things

Stable Diffusion Model Merging: SuperMerger vs Chattiori

Compare SuperMerger and Chattiori for Stable Diffusion merges. Block-weighted merging, add difference, and cosine similarity evaluation.

8 sources cited Fixing things

Merging Stable Diffusion checkpoints is one of the most practical ways to build a model without training from scratch. You combine the weights of existing models to preserve the features you want. The two tools most commonly used for this are SuperMerger, a WebUI extension, and Chattiori Model Merger, a command-line script. For a general overview of merge strategies and block-level control, see the model merging guide.

TL;DR

What does Stable Diffusion model merging actually do?

A Stable Diffusion checkpoint is a collection of tensors representing the U-Net, text encoder, and sometimes VAE. Merging replaces those tensors with weighted combinations of tensors from other checkpoints. The simplest form is a linear interpolation: (1 - alpha) * modelA + alpha * modelB. More advanced methods add the difference between two models, triple-sum three checkpoints at once, or swap tensors based on their directional similarity rather than raw magnitude.

The goal is not to average styles blindly. It is to transfer concepts—anatomy, line art, clothing detail—from one model into the structure of another. The wrong merge can blur faces or wash out colors; the right merge can give you a model that responds to prompts better than any single parent.

What merge methods does SuperMerger support?

SuperMerger is an extension for AUTOMATIC1111's WebUI. Its README describes the tool as allowing "merged models to be loaded as models for image generation without saving them," which avoids repeated disk I/O during experimentation.

The extension exposes several merge modes directly in the UI:

ModeFormulaNotes
Weight sum(1 - alpha) * A + alpha * BStandard linear interpolation
Add differenceA + alpha * (B - C)Injects the delta between B and C into A
Triple sum(1 - alpha - beta) * A + alpha * B + beta * CThree-model blend
Sum twice(1 - beta) * ((1 - alpha) * A + alpha * B) + beta * CTwo-stage blend

Beyond those, SuperMerger offers calculation methods that change how the math is performed. The documentation lists cosineA and cosineB as modes that "calculate to minimize loss during merging, using ModelA as the reference" or ModelB as the reference, respectively. These are useful when the two checkpoints share most of their structure and you want to preserve one model's overall architecture while borrowing details from the other.

The extension also supports block-weighted merging. Its README explains that "each block may correspond to background depiction, characters, art style, etc.," so you can assign different weights to individual U-Net blocks rather than merging the entire checkpoint uniformly. Elemental merging goes further, letting you target specific tensors within blocks, though the documentation cautions that this is best used for fine adjustments rather than broad experimentation.

What features does Chattiori Model Merger offer?

Chattiori Model Merger is a Python script designed to run on CPU by default, making it practical for Colab or machines with limited VRAM. Its README lists modes for weighted sum, sigmoid, geometric mean, max, add difference, smooth add difference, multiply difference, similarity add difference, train difference, triple sum, tensor sum, sum twice, no interpolation, read metadata, DARE, and others.

The tool accepts block-weight strings and elemental syntax through the same --alpha argument, so you can migrate recipes from SuperMerger without rewrites. It also bakes VAEs into the output checkpoint, prunes unused tensors, and saves in .safetensors or .ckpt formats with rich metadata.

One feature distinct to Chattiori is its cosine structure modes: --cosine0, --cosine1, and --cosine2. The README states that --cosine0 makes "Model 0 define the structure" while injecting details from Model 1, and --cosine2 makes Model 2 the structural base while blending details from both earlier models. This is useful when you want to keep the prompt comprehension of one model but adopt the rendering style of another.

How do you read and reproduce a community merge recipe?

Community recipes are usually shared as numbered steps with block-level weights rather than a single alpha value. The Blessing Mix recipe (civitai.com/articles/645) attempts to reconstruct BracingEvoMix using publicly available source models, organized into output_blocks, input_blocks, and a base encoder merge, each with its own alpha schedule.

To reproduce such a recipe, you need a tool that supports block-weighted notation. Both SuperMerger and Chattiori accept per-block weights, so the same recipe can be executed in either environment. The process typically looks like this:

  1. Identify whether each step uses add difference, weight sum, or another mode.
  2. Map the block IDs—IN00 through IN11, M00, OUT00 through OUT11, and BASE—to the tool's expected format.
  3. Run the steps sequentially, saving intermediate checkpoints if the tool does not keep them in memory.
  4. Compare the final output against the target model using cosine similarity or visual inspection.

The Blessing Mix recipe reports block-level cosine similarities against BracingEvoMix, with final output blocks reaching 98.5% similarity and input blocks reaching 98.6% similarity. These numbers are community-reported metrics, not independent benchmarks.

How do you evaluate whether a merge actually improved anything?

Cosine similarity is the most common quantitative check. The wkpark/sd-cosine-similarity calculator, forked from JosephusCheung's ASimilarityCalculatior, supports output_blocks, input_blocks, and middle_block, which matches the block-level workflow used by both merge tools. High similarity to a target model suggests the merge preserved structural details, but it does not guarantee better prompt response or fewer artifacts.

Subjective evaluation remains essential. A merge can score well on cosine similarity while still producing blurry hands or washed-out backgrounds. The documentation for BracingEvoMix grades its own v2 release on dimensions such as prompt reaction, photo-realism, finger-drawing precision, and pose stability, with self-assigned scores ranging from 40 to 95 out of 100. That kind of multidimensional checklist is more useful than a single similarity percentage.

When comparing two merges, test the same prompt set on both and look for regressions in specific blocks. SuperMerger's pinpoint-block feature and Chattiori's per-block alpha strings make it possible to rerun only the problematic layers instead of rebuilding the entire model from scratch.

Common errors and fixes

SymptomLikely causeFix
Merge outputs look washed outAlpha too high for a style-different parentReduce alpha or switch to cosine mode to preserve base structure
Faces degenerate but backgrounds stay sharpInput block weights too aggressiveLower weights on IN07, OUT03, OUT04, and OUT05, which the elemental documentation flags as high-influence layers
File will not load in WebUIMissing VAE or CLIP ids mismatchUse the VAE bake option and reset CLIP ids before saving
Merge takes excessive VRAMMerging on GPU with large .ckpt filesSwitch to CPU mode or convert sources to .safetensors first
Cosine similarity is misleadingly highOnly a subset of blocks measuredCompare full checkpoints or add the omitted blocks to the similarity calculation

FAQ

What is the difference between add difference and weight sum? Weight sum blends two models linearly. Add difference injects the learned difference between a third model and a base into your primary model, which is closer to installing a LoRA-like adjustment permanently.

Does block-weighted merging actually matter? Yes. The OrangeMixs documentation shows published recipes that rely on block-level control, and SuperMerger's README notes that blocks correspond to different semantic elements such as background, characters, and art style.

Can I merge SDXL models with these tools? SuperMerger supports XL with 25-length block weights, and Chattiori auto-detects architecture. Both tools warn that XL merges require substantial system memory.

What does cosine similarity tell me about a merge? It measures directional alignment between tensors. A high score means the merged model kept the structural direction of the target, but it does not measure aesthetic quality or prompt adherence.

Is Chattiori Model Merger better than SuperMerger? Not universally. SuperMerger is faster for interactive WebUI experimentation; Chattiori is better for headless servers, Colab, and scripts that need deterministic outputs.

How do I avoid breaking a merge with elemental edits? Start with block weights first. The elemental documentation recommends element-level tweaks only as a final adjustment when block-weighted merging cannot solve a specific issue.

Can I merge more than three models at once? SuperMerger supports triple sum and sum twice as direct modes. For larger ensembles, chain merges sequentially or use a tool like ModelMergeTool for simple weighted averages.

What is the safest merge mode for beginners? Weighted sum with a single alpha value. It is deterministic, easy to reverse, and less likely to produce unexpected tensor interactions than add difference or train difference.

Sources

SourcePurpose
https://github.com/hako-mikan/sd-webui-supermergerSuperMerger tool documentation and merge modes
https://github.com/hako-mikan/sd-webui-supermerger/blob/main/elemental_en.mdElemental merge syntax and block influence notes
https://github.com/hako-mikan/sd-webui-supermerger/blob/main/calcmode_en.mdCosine structure behavior and modes
https://github.com/Faildes/merge-modelsCLI merger documentation, cosine modes, block weighting
https://huggingface.co/WarriorMama777/OrangeMixsOrangeMixs published recipe using SuperMerger
https://huggingface.co/sazyou-roukaku/BracingEvoMixBracingEvoMix v2 performance scores (40–95/100) and licensing
https://huggingface.co/haor/Evt_V4-previewEvt_V4-preview model card and training details
https://civitai.com/articles/645Blessing Mix merge recipe with SuperMerger notation