Local tensor-level checkpoint merging

How to merge AI diffusion models locally

Saient contains a local worker for weighted-sum and add-difference merges of compatible diffusion checkpoints. It writes a new safetensors file without uploading model weights.

Dev.6 Linux beta: the Merge picker now selects single-file diffusion checkpoints rather than GGUF chat models. Prefer .safetensors inputs from compatible architectures. Output is a new .safetensors file; a completed merge still needs loading and image-quality checks.

Updated · The screenshot below is historical.

Real interface

Historical merge screen

Saient Merge screen with model A, B and C selectors, weighted-sum method, weight slider and output path

Saient Merge, v1.0.4

This older screenshot predates the corrected diffusion-checkpoint picker. It is not a screenshot of dev.6.

Beta input rules

Diffusion checkpoints, with tensor-only loading

The old GGUF picker defect is fixed in the beta. Merge scans compatible single-file diffusion checkpoints. GGUF language models, LoRA adapters and Diffusers directories are not interchangeable with full diffusion checkpoints.

Use .safetensors where possible. The worker also accepts tensor-only .ckpt/.pt dictionaries through PyTorch's weights_only=True loader. If safe loading rejects a file, the job fails visibly; there is no fallback to unrestricted pickle loading. Do not rename a file to bypass a format error.

The v1.0.9 report of unusable GGUF selectors remains a historical finding. It does not describe the corrected dev.6 picker.

Methods

What the merge worker implements

MethodFormulaUse
Weighted sumA × (1-w) + B × wInterpolates matching tensors between two structurally compatible checkpoints.
Add differenceA + (B-C) × wApplies a weighted difference between B and C onto A; model C is required.

When a shared tensor has a different shape, the worker keeps A's tensor. Keys found only in A or only in B are copied into the output. That behavior prevents a shape exception, but it does not prove the resulting hybrid model is semantically sound.

Compatibility

Choose checkpoints that belong together

  • Use the same architecture and closely related tensor layout—such as two checkpoints derived from the same SDXL base.
  • Compare tensor-key and shape compatibility before treating a completed file as a valid model.
  • Never merge a LoRA adapter as if it were a full checkpoint, and never merge GGUF language models with this diffusion worker.
  • Keep the source files. A merge output is a new experiment, not a replacement for A, B or C.
  • Review every source model's licence; blending weights does not remove upstream restrictions.
Hardware

RAM and storage requirements

  • GPU: not required by this tensor merge; it runs on CPU.
  • Safetensors inputs: opened lazily, so input tensors are fetched as needed. The result still accumulates before save, making peak RAM roughly output-model scale plus working tensors.
  • Tensor-only CKPT/PT inputs: loaded fully into RAM if safe loading accepts them; prefer safetensors for lazy input access.
  • Disk: keep A, B, optional C and the new output simultaneously. Use a filesystem with enough free space for a failed/retried save as well.
Proof boundary

Checked process behavior, limited model-quality evidence

Earlier native Linux development tests merged two tiny CPU tensor fixtures and independently checked the output values. They also exercised a failed save, cancellation without output, and a successful retry. These are historical integration checks, not a fresh dev.6 full-checkpoint benchmark.

The beta retains corrected model selection, visible worker errors and owned cancellation. A delayed cancelled request cannot start later or stop a replacement job. Output is saved through a temporary file before replacement.

Remaining limit: tiny tensors do not establish full diffusion-model compatibility or useful image quality. Load the resulting checkpoint and assess representative images before relying on it.

Keep source checkpoints and test the result.

The Linux beta corrects the picker and process handling. Keep A, B and C, use a distinct output path, and evaluate the merged model before depending on it.