Arguments to control image generation in Stable Diffusion

Stable Diffusion is a powerful AI system for generating images from text descriptions. However, controlling the output images can be challenging for new users. This article provides useful prompt engineering techniques and examples to help you generate better images in Stable Diffusion.

Specifying Image Content and Style

The key to controlling Stable Diffusion image generation is writing detailed prompts. Be as specific as possible about what you want the image to contain. Here are some examples:

Describing Subject Matter

  • A photo of a smiling toddler playing with a red ball on green grass
  • A painting of a lone hiker overlooking a mountain landscape at sunset

Defining Artistic Style

  • Oil painting in the style of Van Gogh featuring a vase of sunflowers
  • Cubist abstract portrait of a woman with blue eyes

Adding Descriptive Details

  • A macro photograph of a red ladybug with black polka dots climbing up a green leaf
  • A cinematic scene of a wizard casting a spell, vibrant light rays emitting from his staff

Being comprehensive with visual details like color, lighting, and composition will help Stable Diffusion generate more accurate images.

Guiding Image Properties

You can also guide technical aspects of the generated image:

Specifying Image Size

  • A 1920×1080 pixel digital illustration of a robot walking through a futuristic city

Choosing Color Profile

  • A monochrome pencil sketch of a sailboat on the ocean

Defining Aspect Ratio

  • A 16:9 vertical portrait painting of a ballerina

Using Negative Prompts

Negative prompts are essential for excluding unwanted elements from images. For example:

  • An oil painting of a bowl of fruit -photo, -real

This prevents photorealistic outputs. Other common negative prompts:

  • -poorly drawn
  • -mutation, -deformed
  • -mutilated, -gore
  • -worst quality, -low quality

Removing Watermarks

Many sites add watermarks to AI images. Add -watermark to prompts to avoid them.

Advanced Prompting Techniques

As you become more experienced with Stable Diffusion, try these advanced techniques:

Iterative Prompting

Start with a simple prompt, generate images, then add details to refine outputs over many generations.

Associative Prompting

Chain descriptive keywords together to imply relationships without directly stating them. For example, “a still life painting of fruit in a bowl on a table by a window”.

Embedding Images

Input real images to bias Stable Diffusion outputs. This can improve consistency with aspects like faces.

Mastering prompts takes practice, but it enables you to reliably control Stable Diffusion image generation. Refer to these examples as handy prompts to modify for your needs.

Useful Resources

Here are some websites with more Stable Diffusion prompting guides and ideas: