Prompt 101: Generate Cool Stable Diffusion Images with this Guide

Prompt 101: Generate Cool Stable Diffusion Images with this Guide

Featured on Hashnode

Hey there, if you have tried using Stable Diffusion and are unsure of how others are able to generate such impressive images, then this is the perfect place for you to learn the secret behind creating impressive images using AI.

You may have generated amazing images using AI and you felt like it was a result of chance. However, there is a technique behind this seemingly random process. It's called prompt engineering, and it's not just magic, it's science!

What is Prompt

Prompt engineering is a technique used to guide AI to generate high-quality and relevant text, and by experimenting with different prompt structures and formats, you can improve the output of your own prompts.

Sure, creating effective prompts for AI may be a challenge, especially for those new to prompt engineering. They may struggle to get the desired results from their AI, causing frustration and disappointment. But the good news is that anyone can learn how to talk to AI and generate impressive images.

Getting Started

I'll use Lexica.art to make things easy. It's a Stable Diffusion search engine that also allows you to quickly and easily generate impressive images using prompts directly on the site.

To create a super duper image using Lexica.art, just follow these simple steps:

  1. Open Lexica.art in your web browser.

  2. On the homepage, click on the 'Generate' button.

  3. You will be presented with a blank canvas where you can input your prompt.

  4. To create your prompt, you can type in natural language (e.g. "a red apple on a white table, an astronaut riding a horse").

  5. In the 'Generate' page, click on the icon next to the prompter and set the guidance scale to 10 and the image size to 864x512.

  6. Click on the 'Generate' button to generate the SD image.

  7. The generated image will be displayed on the page, and when you're happy, you can "Download" it or share it using the options provided.

  8. You can also adjust the other settings on the page to customize the generated image, but we'll leave that for another time.

By following these, you can quickly and easily generate an SD image using Lexica.art.

To generate the best images using AI, it is important to break down the prompt into clear and concise instructions.

Here's the prompt for the above image:

illustration of an astronaut lounging in a tropical resort in space by dan seagrave, spiral clouds falling, highly detailed, surrealism, triadic color scheme, smooth, sharp focus, matte, elegant, dark, gloomy, octane render, 8k, 4k, washed colors, sharp, dramatic lighting, beautiful, post processing, ambient lighting, epic composition

Let’s look at the POV of the prompt formula.

illustration (this is my style choice) of

an astronaut lounging in a tropical resort in space (the thing I want in the image) + by dan seagrave (artist style),

spiral clouds falling (more stuff I want in the image),

and the rest are all details on how I would like the image to look.

Great, now you have everything you need to create some amazing images!

TL;DR: Prompt Formula

TL;DR: Prompt Formula

Art Medium + The actual things you want in the image + Art Styles (could be an artist or an actual style like Anime, ) + Modifications (extra details on how the image should look)  Good Image.

To generate images that match your imagination, it may take several attempts to get a result you like. Repeat the process a few times using the same prompt before tweaking the prompt or adjusting the settings to make it more specific or detailed.

After trying a few times, you can start to adjust the prompt to create the exact image you want. Practice is key to developing a strong understanding of how AI works and how to use it as an artistic tool.

Generate multiple images using the same prompt to see how the results vary. You may find that the same prompt produces different results each time, so it's worth trying several times to see which image you like best.

Ready to take your image-making skills to the next level? Try experimenting with different prompts and AI tools, like Midjourney, to create some truly stunning images. The possibilities are endless, so get creative and have fun! 🎉

P.S.: I'm using a Hashnode WYSIWYG editor -- called Neptune.


Share This Tutorial

👉 Please share my posts with the community at daily.dev / social media by adding the article's URL to the feed.

By adding my article, I can share my insights and knowledge with other tech enthusiasts and contribute to the passionate community.

Cheers✨

Did you find this article valuable?

Support Amirah Nasihah by becoming a sponsor. Any amount is appreciated!