1 Making our First Image: “A damn fine cup of coffee”
In this opening exploration of text-to-image generation, the reader is introduced to Stable Diffusion as a creative but unpredictable system that turns words into images. The main goal is to learn how to guide that system more effectively by understanding its interface, the role of prompts, and the importance of trying many outputs rather than expecting a perfect result on the first attempt. The chapter frames image generation as a process of discovery: generate broadly, then refine what you like.
To get started, the text walks through using AUTOMATIC1111’s Stable Diffusion WebUI as a practical beginner-friendly tool for working locally. It explains how to launch the interface, use the txt2img tab, and create an initial image from a simple prompt. It then shows how batch size and batch count can be combined to produce multiple images efficiently, emphasizing that having many variations makes it easier to identify the best result while staying within hardware limits.
The chapter also explains why reproducibility matters by introducing the seed, showing that the same seed can recreate the same “random” results and make comparisons meaningful. From there, it explores how image size and aspect ratio influence both composition and content, often in surprising ways. Finally, it begins prompt engineering by demonstrating that clear, concrete, descriptive prompts work better than vague or poetic ones, and that adding context or style cues can help shape the image toward a more satisfying and intentional outcome.
Stable Diffusion sure can create strange things, let’s try to avoid going too far in that direction.
Image of the upper portion of the A1111 UI.
Entering our prompt into A1111
The initial image created by our prompt: “A damn fine cup of coffee.”
Batch count and Batch size theoretically offer different ways to increase images generated
One configuration for generating 30 images at once.
30 different answer to the prompt “A damn fine cup of coffee”
Setting the value to -1 will give us a ‘random’ seed each time we hit ‘Generate’.
The recycle button will give us the seed we used previously.
The options for setting our Width and Height in the UI.
Images with a 5:3 landscape aspect ratio.
Using the same seed but reverting to 512x512 shows us the impact of aspect ratio and image size.
We can easily swap Width and Height values in A1111.
Images with a 3:5 aspect ratio .
Images with a 3:7 aspect ratio.
Images with a 4:1 aspect ratio.
A poetic prompt does not always yield poetic images.
A straight forward prompt yields more cups of black coffee.
Adding a scene to an image can help provide context.
Choosing a landscape aspect ratio helps display the counter.
Creating surrealistic images.
Images in the style of a wood etching.
I would say that’s a damn fine cup of coffee!
Summary
- Generating with Stable Diffusion is an iterative process, in which we are constantly revising our settings and prompts.
- Despite the many ways to improve images, it’s always a good idea to generate a variety of images to see if we find a particular one that stands out to us as pleasing.
- Our prompts should be clear and descriptive. Giving some context for the object we’re prompting can change the image dramatically. Describing the style of the image can further let us change the feeling of the images we’re generating.
- The aspect ratio that we use to generate an image can have a major impact on the way the image looks. Consider whether the image you want to create would look better as a square, a landscape or portrait.
FAQ
What is the main goal of Chapter 1, “Making our First Image: ‘A damn fine cup of coffee’”?
The chapter’s goal is to help you create your first image with Stable Diffusion while learning the basics of using A1111, writing prompts, changing image size, generating multiple images, and making results reproducible with seeds.What is A1111, and why does the chapter use it?
A1111 is AUTOMATIC1111’s Stable Diffusion Webui, an open-source graphical interface for working with Stable Diffusion. The chapter uses it because it is beginner-friendly and makes it easier to create and customize images than the original command-line version.How do I start A1111 after installing it?
After installing it, run./webui.sh on Linux or macOS, or ./webui.bat on Windows. Once it is running, open your browser to http://127.0.0.1:7860.
Local Image Generation ebook for free