How to Use the Merge Block Weighted GUI for Automatic1111’s Stable Diffusion Web UI

May 18, 2021 | Data Science

Welcome to your guide on leveraging the Merge Block Weighted GUI, an extension that breathes life into your artistic endeavors with Automatic1111’s Stable Diffusion Web UI. With exciting new features and a user-friendly interface, this tool enables you to merge models effectively, helping you bring your vision to reality.

Table of Contents

How to Install

To get started, follow these simple installation steps:

  1. Open the Extensions tab in your web UI.
  2. Select Install from URL and input the repository URL.
  3. Click Install and then restart the Web UI to apply changes.

How to Use

Once installed, it’s time to put the power of the Merge Block Weighted GUI to work!

Select model_A and model_B, and Input Output Model Name

Before merging, choose your models:

  1. Select model_A and model_B from the dropdown.
  2. Input your desired output model name.
  3. If you have updated checkpoints, push the Reload Checkpoint button to refresh your options.

Set Merge Ratio for Each Block of U-Net

Imagine you’re a chef blending two different flavors to create a culinary masterpiece. In this step, you will manage the ratios of each block in the U-Net to find the right balance:

  • Select presets from the dropdown menu or adjust them using the GUI slider.
  • Each block can be controlled through a text box where you input your desired weights; 25 values separated by commas are required.

Setting Values

Now, let’s fine-tune the other settings:

Base Alpha

The base_alpha controls the proportion of model_a and model_b:

  • 0 – Merged model completely uses model_A (100%).
  • 1 – Merged model completely uses model_B (100%).

Other Settings

  • Enable verbose console output for additional info.
  • Allow overwriting output-model with the same name if desired.

Save as Half/Safetensors

Select these options to save your output model in either half-precision float16 or Safetensors format. Just add ‘.safetensors’ to your output file name, and it will save automatically in that format.

SkipReset CLIP position_ids Key Value

Manage the treatment of position_ids values in CLIP. This influences how prompts connect with embeddings, tackling issues of certain tokens being ignored. Choose an effect: None, Skip, or Reset, based on your experiment.

Other Function

Save Merge Log

This feature allows you to keep a record of your merge operations, stored in a handy log as ‘csvhistory.tsv’.

Sample Example

Take a practical look at how to merge stable diffusion models. For example, you might compare two models, sd-v1.5-pruned and wd-v1.3-float32. Specify your desired output and prompts for a tailored generation.

1: weight1 values...
2: weight2 values...

Presets Grids

Experiment with various presets to see how they affect your outputs. Sample grids can be previewed to guide your selections.

Example Presets...

Special Thanks

We extend our gratitude to the brilliant minds behind this tool. A special shoutout to kohya_ss for their innovation!

Troubleshooting

If you encounter delays or functionality issues, ensure your installation steps were followed correctly. Furthermore, double-check your input formats and values. For unresolved dilemmas, consult the community or reach out for assistance.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox