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.
Before comparing different checkpoints/models to different parameters we need the following:
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:
If you're unsure about how to download & install new models/checkpoints, you can refer to the tutorial below:
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:
After generating the image, you will find all the image specifications below the image, including the seed.
We will fill the obtained seed number into the "Seed" section. This ensures that when the images are generated, they will yield similar results.
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).
So let's do some plotting now. First click the X/Y/Z plot script under the "Script" expansion panel to open the options.
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.
The first comparison will be the models compared to different Sampling methods. To achieve this we will need the following settings:
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):
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.
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:
To achieve this we will need the following settings:
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):
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:
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.
After generating an XY Plot, the generated plot will be saved in the following folder: "stable-diffusion-webui\outputs\txt2img-grids"
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:
Those will be saved in the following folder:
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!