askvity

How do I Merge Inpainting Models?

Published in StableDiffusion 2 mins read

To merge Inpainting models, you'll use a checkpoint merger tool, typically found in a Stable Diffusion web UI, like the one from AUTOMATIC1111. The "Add Difference" method is most commonly used for this purpose. Here's a step-by-step guide:

Steps to Merge Inpainting Models

  1. Go to Checkpoint Merger: Navigate to the Checkpoint Merger section within your Stable Diffusion web UI.

  2. Select "Add Difference": Choose the "Add Difference" merge method. This method is specifically designed for creating inpainting models.

  3. Set "Multiplier" to 1.0: Ensure the "Multiplier" value is set to 1.0. This determines the strength of the difference being added.

  4. Set "A" to the Official Inpaint Model (SD-v1. ...): Assign the official Stable Diffusion inpainting model (e.g., sd-v1-5-inpainting.ckpt) to slot "A". This serves as your base inpainting model.

  5. Set "B" to Your Model: Place the model you want to adapt for inpainting into slot "B" (e.g., your custom trained model). This model's characteristics will be transferred to the base inpainting model.

  6. Set "C" to the Standard Base Model (SD-v1. ...): In slot "C," select the standard Stable Diffusion base model (e.g., sd-v1-5.ckpt). This is essential for the "Add Difference" method to calculate the necessary adjustments.

  7. Set Name: Give your new merged model a descriptive name, such as your_model_inpainting.ckpt. This will help you easily identify it later.

Explanation:

The "Add Difference" method works by calculating the difference between your model (B) and the standard base model (C). It then adds this difference to the official inpainting model (A). This essentially transfers the specific characteristics of your model into an inpainting-capable version.

Example:

Let's say:

  • A: sd-v1-5-inpainting.ckpt (Official SD v1.5 Inpainting Model)
  • B: MyCustomModel.ckpt (Your custom trained model)
  • C: sd-v1-5.ckpt (Standard SD v1.5 Base Model)

The process will create a new model called MyCustomModel_inpainting.ckpt that incorporates the inpainting capabilities of sd-v1-5-inpainting.ckpt while retaining the unique style and characteristics of MyCustomModel.ckpt.

Related Articles