Bubba Checkpoint Merge
Bubba Checkpoint Merge
- pipe
- metadata
- pipe
- checkpoint_merge
- metadata
- model
- clip
- vae
- merge_recipe
- info
Merging is how most of CivitAI's checkpoints were born - averaging existing weights in minutes instead of training for weeks - and Bubba Checkpoint Merge is a weighted two-way blender that runs entirely inside your graph. You pick two checkpoints, set a ratio, and get back a working model, CLIP, and VAE you can sample with immediately, plus a recipe string that records exactly how the blend was made. No separate merge tool, no tab switching, no mystery frankenmodel.
The mechanism is straightforward and worth understanding because it explains what you can expect. It loads both checkpoint state dicts, then for every key present in both files, blends the tensors: A * (1 - ratio) + B * ratio. At ratio 0.5 that's a 50/50 average; at 0.8 you're mostly B with a hint of A. Keys that exist only in A are carried over untouched - that's the "carrying unmatched keys" in the description, and it matters because it means a newer B that dropped a key won't silently zero out part of A. Incompatible shared keys (shape mismatches, like a different architecture between the two files) get skipped rather than crashing, and the info output tells you how many tensors were merged, carried, and skipped. That last number is your early warning: if shape_mismatch_keys is big, you're blending models that don't share an architecture, and the result will be mush.
The inputs that matter
checkpoint_aandcheckpoint_b- dropdowns of your models folder. Order matters at ratio ≠ 0.5: A is the base, B is what you're pulling toward.ratio- 0 to 1, step 0.01, default 0.5. This is the whole instrument.
Optionally feed a pipe in and the merged model, clip, and vae get written back into it, with the metadata updated to the suggested merge name. Wire a metadata in and that's what gets updated instead.
What comes out
The star output for the merge workflow is checkpoint_merge - a BUBBA_CHECKPOINT_MERGE payload holding the merged state dict and the recipe, designed to feed Bubba Save Checkpoint to write a real safetensors file. But you don't have to save anything: model, clip, and vae come out live, so you can wire them straight into a sampler and preview the merge before committing it to disk. That's the loop the pack encourages - merge, sample, tweak ratio, sample again - and it's dramatically faster than the save-then-reload cycle of standalone merge tools.
merge_recipe is the plain-text recipe (both files, ratio, suggested name) - keep it for your own notes, or wire it into a filename. info is the human-readable summary of what happened to each tensor.
What it isn't
It's the two-way weighted merge, not the A + (B - C) difference blend that the community uses to subtract a style or add one. That's Bubba Triple Checkpoint Merge, a sibling node in the same pack - same outputs, three checkpoints, a strength input instead of ratio. If you've read merge guides talking about "A + (B - C)" and came here looking for it, you want the triple version.
One more reality check, straight from the knowledge base: merges average weights, so they converge - whole families of merged checkpoints end up sharing faces and defects. Merging a realism model with an anime model gives you a model that's weaker at both, not the best of each. Use this node to tune between compatible parents, not to invent a new architecture.
Install
This is one node out of the Bubba Nodes pack - ComfyUI Manager, search "Bubba Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/bubbafett5611/Bubba_Nodes
Restart, and the pack pulls in aiohttp and pydantic (its requirements.txt). Needs ComfyUI 0.27.0+ since the pack uses the V3 node API. Merging is CPU work on big files, so the first execute on a pair of SDXL checkpoints can take a while - the loading and blending happens server-side, and the model only lands in VRAM when you actually sample with it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| checkpoint_a | COMBO | 0 options: | |
| checkpoint_b | COMBO | 0 options: | |
| ratio | FLOAT | 0.500–1 | — |
| pipeopt | BUBBA_PIPE | — | |
| metadataopt | BUBBA_METADATA | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| pipe | BUBBA_PIPE | — |
| checkpoint_merge | BUBBA_CHECKPOINT_MERGE | — |
| metadata | BUBBA_METADATA | — |
| model | MODEL | — |
| clip | CLIP | — |
| vae | VAE | — |
| merge_recipe | STRING | — |
| info | STRING | — |