🧙🏻‍♂️ Making Magic with Stable Diffusion

😉 Master Prompt Engineering + Bonus Prompts to Expand Your Skills

In partnership with

Read time: 15 minutes | Sponsor this newsletter

Hey Genesis Residents!

Today, I’m excited to share my methods for effective prompting in Stable Diffusion.

I'll guide you through my thought process, strategies for crafting prompts quickly, and how to refine them to achieve the exact results you desire.

I primarily use Stable Diffusion Forge UI and the Juggernaut XL Version 10 model, but feel free to use any model with the settings that suit you best.

Don't Miss:

  • 🖥️ How Does Stable Diffusion Work?

  • 🎨 Basics of Stable Diffusion Prompts

  • 🗝️ Breaking Down the Prompt

  • 📊 Advanced Techniques for Prompt Engineering

  • 🚀 Practical Tips and Tricks

  • 🔥 Bonus Prompts

🖥️ How Does Stable Diffusion Work?

Stable Diffusion is a generative deep learning model designed to create new data by learning patterns from existing data. It excels in typography and prompt adherence, outperforming DALL-E. While DALL-E is closed-source, Stable Diffusion is open-source.

As a text-to-image model, Stable Diffusion is accessible through various websites.

Running Stable Diffusion Locally:

  1. Install Python & Git: Ensure Python 3.10.6 and Git are installed.

  2. Create Accounts: Sign up for GitHub and Hugging Face accounts.

  3. Clone Repository: Use Git to clone the Stable Diffusion web UI repository.

  4. Download Model: Get the Stable Diffusion model from Hugging Face and place it in the appropriate folder.

  5. Set Up Web-UI: Install necessary dependencies by running webui-user.bat.

  6. Run Model: Access the web UI at http://127.0.0.1:7860.

Running Stable Diffusion Online:

  • DreamStudio: Sign up to generate images quickly with 25 free credits for new users.

  • ChatLabs AI: Compare Stable Diffusion 3 and DALL-E 3 with a Pro Subscription.

  • Hugging Face: Access Stable Diffusion models with some customization limitations Stable Diffusion is a powerful AI tool for generating images from text prompts, but mastering it requires more than just typing a simple description.

🎨 Basics of Stable Diffusion Prompts

Stable Diffusion is a powerful AI tool for generating images from text prompts, but mastering it requires more than just typing a simple description.

While generic prompts like "portrait of a woman" may yield results, they often leave too much creative freedom to the AI, resulting in images that might not meet your expectations.

🔓To achieve precise and visually appealing outputs, it's essential to craft detailed and specific prompts.

Learn AI in 5 Minutes a Day

AI Tool Report is one of the fastest-growing and most respected newsletters in the world, with over 550,000 readers from companies like OpenAI, Nvidia, Meta, Microsoft, and more.

Our research team spends hundreds of hours a week summarizing the latest news, and finding you the best opportunities to save time and earn more using AI.

🧙🏻‍♂️ Breaking Down the Prompt

🎨 Specify the Image Type:

Begin by defining the type of image you want, such as a photo, illustration, painting, etc.

For instance, instead of saying "photo of a woman," specify "modern photo of a woman."

🎨 Set the Environment:

Place your subject in a specific setting. You could choose a forest, beach, studio with a black background, etc.

This adds context and depth to your image.

🎨 Detail the Appearance:

Add details about the subject’s appearance, such as hair color, clothing, and accessories.

For example, "blonde woman in a white shirt."

🎨 Lighting and Mood:

Consider the lighting and mood you want to convey. Options include rim light, golden hour lighting, or a specific style like "cinematic fashion portrait."

🎨 Art Styles and Perspectives:

Experiment with different art styles and perspectives. Specify whether you want an oil painting, watercolor, pencil drawing, or a particular angle like a bird’s eye view or macro perspective.

🎨 Enhancing Prompts with Specificity

To illustrate the impact of specificity, let’s refine a simple prompt step by step:

  • Initial Prompt: "photo of a woman"

  • Refined Prompt: "modern photo of a blonde woman in a white shirt, standing in a forest, with golden hour lighting"

This refined prompt reduces ambiguity and guides the AI to generate an image closer to your vision.

🎨 Using Seeds for Consistency

A fixed seed ensures consistency across multiple generations. By using the same seed, you can maintain specific elements in your images while experimenting with variations.

This is particularly useful when fine-tuning details like hair color or clothing.

🎨 Negative Prompts

Negative prompts are a powerful tool to exclude unwanted elements.

 For instance: If you don’t want a police badge in your image, include "no police badge" in the negative prompt.

While not foolproof, this method helps steer the AI away from undesired features.

🔐 Techniques for Prompt Engineering

🗝️Using XYZ Plot for Variations

The XYZ plot is a feature that allows you to search and replace specific words in your prompt, generating variations of the image.

For example, you can change "blonde" to other hair colors like "dark," "purple," or "red."

 

This method provides a grid of images showing the variations side by side, making it easier to choose your favorite.

🗝️Weighting Words for Emphasis

To give more importance to certain words, use round brackets.

 For example, "(blue house:1.2)" will emphasize the blue color in the house. You can increase or decrease the weight by adding more brackets or adjusting the numerical value.

However, be cautious with extreme values as they can produce unrealistic results.

🗝️ Generating Subtle Variations

If you want subtle changes in your image, adjust the sampling steps or CFG (Classifier-Free Guidance) scale.

By setting different values, you can achieve slight variations in lighting, colors, or other details, allowing you to choose the best version or combine elements from multiple images.

🗝️ Utilizing ChatGPT for Prompt Assistance

ChatGPT can be an invaluable assistant for generating and refining prompts.

Simply describe your vision, and ChatGPT can provide detailed prompts tailored to different scenarios. This saves time and adds creativity to your process.

For example, you can ask ChatGPT to adapt a prompt for different professions, generating images of a doctor, chef, or policewoman with appropriate attire and settings.

Result:

Here is the result I received after entering the ChatGPT prompt

Tweet of the Day

💡 Practical Tips and Tricks

📌 Image-to-Image Generation

When you have a specific photo or illustration but struggle with prompting, use the image-to-image feature. Upload the image and let the system generate a prompt based on it.

While this method provides a starting point, further refinement may be necessary to achieve the desired result.

📌 Experimenting with ArtStyles

ArtStyles are pre-saved prompts that can be added to your main prompt to change the artistic style of the image. You can create your own ArtStyles or download them from the internet.

This is particularly useful when you want to maintain a consistent style across multiple images.

📌 Adding More Weight to Words

To emphasize certain elements in your prompt, use round brackets. 

For example, "(green-blue house)" will highlight the colors green and blue. You can add multiple brackets for more emphasis.

This technique helps you control the visual focus in the generated image.

📌 Generating Forever

If you want continuous image generation, right-click on the Generate button and choose Generate Forever. To stop it, right-click again and select Cancel Generate Forever.

This feature is useful for exploring numerous variations without manually initiating each generation.

Batch Generation

For a specific number of generations, adjust the batch slider to the desired value (between 1 and 100).

Alternatively, if you have multiple prompts, upload a text file with each prompt on a separate line, and the system will generate images for each prompt sequentially.

Bonus Prompts

🖌️Prompt: 

Photorealistic, visionary portrait of a dignified older man with weather-worn features, digitally enhanced, high contrast, chiaroscuro lighting technique, intimate, close-up, detailed, steady gaze, rendered in sepia tones, evoking rembrandt, timeless, expressive, highly detailed, sharp focus, high resolution.

🖌️Prompt:

Closeup portrait photo of beautiful goth woman, makeup, 8k uhd, high quality, dramatic, cinematic

🖌️Prompt:

Johnny depp photo portrait, film noir style, monochrome, high contrast, dramatic shadows, 1940s style, mysterious, cinematic

🖌️Prompt: 

Haunted house, pixel-art, low-res, blocky, pixel art style, 8-bit graphics, colorful

🖌️Prompt: 

A girl astronaut exploring the cosmos, floating among planets and stars, high quality detail, , anime screencap, studio ghibli style, illustration, high contrast, masterpiece, best quality

🖌️Prompt: 

A sleek, ultra-thin, high resolution bezel-less monitor mockup, realistic, modern, detailed, vibrant colors, glossy finish, floating design, lowlight, art by peter mohrbacher and donato giancola, digital illustration, trending on Artstation, high-tech, smooth, minimalist workstation background, crisp reflection on screen, soft lighting

🖌️Prompt: 

Extravagant high fashion show concept featuring elaborate costumes with feathered details and sparkling jewels, runway, fashion designer inspiration, style of gaultier and gianni versace, deep vibrant colors, strong directional light sources, catwalk, heavy diffusion of light, highly detailed, top trend in vogue, art by lois van baarle and loish and ross tran and rossdraws, Artstation, front row view, full scene, elegant, glamorous, intricate, sharp focus, haute couture

🖌️Prompt: 

Batman, cute modern disney style, Pixar 3d portrait, ultra detailed, gorgeous, 3d zbrush, trending on dribbble, 8k renderArtStyles are pre-saved prompts that can be added to your main prompt to change the artistic style of the image. You can create your own ArtStyles or download them from the internet. This is particularly useful when you want to maintain a consistent style across multiple images.

Thanks for reading!

If you enjoyed this, please help spread the love by forwarding this Newsletter to a friend or colleague.

How would you rate today's newsletter?

Vote below to help us improve the newsletter for you.

Login or Subscribe to participate in polls.

I hope to see you in the next one!

P.S. Whenever you’re ready, here's how I can help you:

  1. Get your product in front of 4000+ solopreneurs, business owners, and professionals. Sponsor this newsletter here.