Stable Diffusion Tips and Tricks

Stable Diffusion is a powerful AI system for generating images from text descriptions. With the right prompts and techniques, you can create stunning visuals. However, it does take some skill to get great results consistently. This article provides tips and tricks for crafting better prompts, fixing common image defects, and using advanced features to take your Stable Diffusion images to the next level.

Prompt Engineering Fundamentals

Be Detailed and Specific

Although AI is advancing rapidly, it still benefits greatly from detailed and specific prompts. Describe not just the subject, but the style, composition, lighting, background, etc. The more details you provide, the better the AI can render what you want.

Use Powerful Keywords

Certain words evoke stronger mental images for AI systems. Using the right keywords around style, texture, lighting, and other attributes will improve results. For example, “cinematic”, “intricate”, “vibrant”, etc. Build a library of powerful keywords to spice up prompts.

Fix Common Issues with Negative Prompts

Negative prompts let you specify things you DON’T want to see in the image. Use them to fix blurred faces, extra limbs, etc. For example adding “-blurry, -extra fingers” at the end of a prompt.

Advanced Prompt Engineering

Blend Styles and Subjects

You can blend multiple styles and subjects by listing them in the prompt. For example “A still life painting of fruit in the style of pop art and Picasso”. This fuses multiple concepts into one image.

Adjust Image Properties

Add prompts about camera angle, distance, lighting, etc. to tweak the image properties. For example “A close up portrait taken from a low angle with soft lighting”. This gives you more control over the final render.

Use Markdown Formatting

Put prompt components in bold or italics to tell the AI to emphasize specific parts of the prompt. This focuses the attention of the AI system.

Fixing Image Defects

Use Inpainting to Remove Artifacts

Inpainting lets you mask out parts of an image to have the AI generate missing areas. Use this to remove artifacts, blobs, etc. from your images.

Rerun Several Times

Rerunning the same prompt with different random seeds can produce variation. If you get an image with good composition but defects, rerun and you may get a better result.

Leverage Face Restoration

Faces can be prone to defects. Using face restoration features from extensions like CodeFormer can automatically fix facial distortions and blemishes.

Useful Stable Diffusion Resources

With these prompt engineering tips and tricks, you can push Stable Diffusion to its limits and consistently create incredible AI-generated images. Don’t be afraid to experiment until you nail the perfect prompt!