XY Plotting to Compare Stable Diffusion Checkpoints

Updated
XY Plotting to Compare Stable Diffusion Checkpoints
Join us on this captivating journey as we explore the fascinating realm of Stable Diffusion. In this blog, we will explore the essential role of XY plotting in comparing checkpoints against various parameters.

1. Introduction

Welcome back, dear readers! In this engaging blog post, we embark on a captivating exploration of Stable Diffusion. Join us as we delve into a indispensable technique: XY plotting. In this tutorial, we will employ the XY plot technique to determine the most suitable checkpoint/model for achieving the highest level of photorealism. Let's dive in.

2. Before Using the XY Plot (Requirements)

Before comparing different checkpoints/models to different parameters we need the following:

  • Multiple checkpoints installed (which can be compared later on)
  • Create an initial image (the seed of the image will be used when we compare the checkpoints to give an accurate comparison)

Downloading Checkpoints

To evaluate and identify the most optimal model for achieving photorealism, I obtained multiple checkpoints from the Civit AI website.

To begin this tutorial, I have obtained the following checkpoints/models, which will be compared shortly based on different parameters:

  • Cyberrealistic
  • Fantasticmix

If you're unsure about how to download & install new models/checkpoints, you can refer to the tutorial below:

How to Install Stable Diffusion Checkpoints & Models

Create an Initial Image

With our installed checkpoints/models in place, we can now proceed to generate our base image. To accomplish this, navigate to the "txt2img" tab and create a prompt. Once the prompt is ready, click on the "Generate" button to obtain your base image, along with the associated seed of the image. The following will be used as my base image: xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-initial_image.png

  • Checkpoint: Cyberrealistic
  • Sampling Method: DDIM
  • Sampling Steps: 40
  • Seed: 3127333660

After generating the image, you will find all the image specifications below the image, including the seed. xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-1.png

We will fill the obtained seed number into the "Seed" section. This ensures that when the images are generated, they will yield similar results. xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-2.png

While it is possible to set the seed to -1, doing so will result in different images being generated each time. Since our goal is to compare images which are similar, this approach is not advisable.

Now that we have downloaded our models and generated our base image, it is time to employ the XY plotting technique to compare various stable diffusion checkpoints (Cyberrealistic vs Fantasticmix).

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds
20% bonus on first deposit

3. Comparing Checkpoint/Models (XY Plot)

So let's do some plotting now. First click the X/Y/Z plot script under the "Script" expansion panel to open the options. xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-3.png

Once you have selected the X/Y/Z plot, a panel will appear where you can customize and fill in specific settings according to your desired comparison parameters.

Comparison 1 (Checkpoints vs Sampling Method)

The first comparison will be the models compared to different Sampling methods. To achieve this we will need the following settings:

  • set X type to "Checkpoint name"
  • at the X values select the two checkpoints you want to compare
  • set Y type to "Sampler"
  • at the Y values select the sampling methods you want to compare xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-4.png

Of course you can add more checkpoints and more sampling methods. Additionally you have the option to add another "Z type" to compare another parameter, but for this tutorial we will leave it as above.

With all the X/Y/Z plot settings correctly configured, it is crucial to ensure that our prompt matches the original image we created. Once this is confirmed, we can proceed to generate our first checkpoint comparison by simply clicking the "Generate" button.

XY Plot (Comparison 1): xy-plotting-to-compare-stable-diffusion-checkpoints-xyz_grid-nextdiffusion.png

The XY Plot serves as an excellent tool for comparing checkpoints using various sampling methods. Feel free to modify or include different sampling methods and checkpoints according to your requirements. Experiment with it and enjoy the process of comparing them.

Comparison 2 (Checkpoints vs VAEs)

The next comparison will be the models compared to different VAEs. Don't you know what VAEs are and why you should use them? Down below you can find more information about VAEs and how to install them:

The Power of VAEs in Stable Diffusion: Install Guide

To achieve this we will need the following settings:

  • set X type to "Checkpoint name"
  • at the X values select the two checkpoints you want to compare
  • set Y type to "VAE"
  • at the Y values select the VAEs you want to compare xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-8-vae-compared-checkpoints.png

With all the X/Y/Z plot settings correctly configured, it is crucial to ensure that again our prompt matches the original image we created. Once this is confirmed, we can proceed to generate our second checkpoint comparison by simply clicking the "Generate" button.

XY Plot (Comparison 2): xy-plotting-to-compare-stable-diffusion-checkpoints-xyz_grid-vae-checkpoint-comparison.png

The secondary XY Plot functions as a valuable instrument for comparing various checkpoints against VAEs. It becomes evident that the utilization of VAEs is highly recommended and necessary for specific checkpoints. It is advisable to carefully review the information provided when downloading checkpoints, particularly regarding the requirement of VAEs. For instance, the "Fantasticmix" checkpoint suggests the inclusion of the following VAE: xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-9-vae-fantasticmix.png

Naturally, there exists a multitude of parameters that you can select and experiment with. Feel free to try out different combinations of parameters that best align with your specific requirements and preferences.

4. Outputs Folder & Extra Settings (XY Plot)

Output Folder XY Plot

After generating an XY Plot, the generated plot will be saved in the following folder: "stable-diffusion-webui\outputs\txt2img-grids" xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-5.png

Extra Settings

Prior to generating the XY Plot, there are checkboxes available for your convenience. One such option is the "Include Sub Images" checkbox, which enables the saving of individual images used in the plot. These will be saved in the following folder: xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-7-include-sub-images.png

Those will be saved in the following folder: xy-plotting-to-compare-stable-diffusion-checkpoints-nextdiffusion-6.png

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds

5. Conclusion

By harnessing the power of XY plots, we can make informed decisions and achieve remarkable results in our pursuit of choosing the right checkpoints and settings. We hope this tutorial has provided you with valuable insights and inspiration for your own projects. Now, armed with the knowledge of XY plotting, it's time for you to unleash your creativity and take your work to new heights. Happy plotting!