chapter two

2 Easier Image Generation with Stable Diffusion Webui

 
“Once men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.”

- Frank Herbert, Dune

This chapter covers

  • Negative prompting and prompt attention.
  • What the Classifier Free Guidance scale is and how to use it.
  • How Sample steps change the final result.
  • Recovering information you used to generate an image.

In this chapter we’ll continue using A1111 to generate images, focusing on learning about some of the other key configuration options we have as well as improving and expanding our prompt engineering techniques. At the end of the chapter we’ll have a solid foundation of the basic configuration options we have when working with base Stable Diffusion.

2.1 Returning to A1111

In the last chapter we covered the basics of using A1111, an open source tool that makes it much easier to work with Stable Diffusion. Despite the fact that A1111 makes using Stable Diffusion easier, the interface is still quite complex and will require a bit more exploration for us to fully understand how to make the most of it.

2.1.1 Quick UI refresher

To get started let’s create some images of a “sandworm” from the Dune universe (the source of our opening quote).

We’ll use the following settings that we covered in the last chapter:

  • Prompt: sandworm
  • Number of iterations (called batch count in A1111): 6
  • Batch size: 2
  • Width: 680
  • Height: 520
  • Seed: -1

2.1.2 Viewing the images you’ve created

2.2 New prompting tricks

2.2.1 Negative Prompting

2.2.2 Prompt Attention

2.2.3 “Sandworm” or “Sand worm”? Understanding Tokens

2.3 Other options to tweak

2.3.1 Classifier-Free Guidance (CFG) Scale

2.3.2 Sampling Steps

2.4 PNG Info

2.5 Summary