DEV Community

Daisuke Majima
Daisuke Majima

Posted on • Originally published at qiita.com

Prompt tips for realistic human images with Stable Diffusion

Tips for generating good images

Stable Diffusion is the talk of the town, but generating the kind of high-quality, realistic portraits you often see on social media takes a bit of know-how. In this article I'll show, with examples, which words help you generate high-quality images.

The Web UI is the convenient way to try Stable Diffusion. You can learn how to use it here:

https://qiita.com/john-rocky/items/1b6dd780d38c63bb64cd

https://github.com/AUTOMATIC1111/stable-diffusion-webui

Just typing the text of the image you want isn't enough

Say you want an image of a girl. If you just type girl, you get something like this. It's not bad, but it looks a little CG-ish — we want something more photographic.

girl
Enter fullscreen mode Exit fullscreen mode

Add words that evoke high quality

Now, pile in words that evoke high quality — best quality, high resolution, and so on — almost to an absurd degree. It might surprise you, but stuffing in lots of comma-separated words like this is the first tip.

girl, RAW photo, best quality, realistic, photo-realistic, best quality, masterpiece, an extremely delicate and beautiful, extremely detailed, 2k wallpaper, Amazing, finely detail, 8k wallpaper, huge filesize, ultra-detailed, highres, extremely detailed, realistic, 8K, Ultra-High Definition, highest quality, ultra high resolution, (realistic:1.4), High quality texture,
Enter fullscreen mode Exit fullscreen mode

Now you get a crisp, realistic image like the one above. But it still looks a bit like a painting.

Add negative words

Add words you do not want in the image. This time, we want to remove the painterly feel and get closer to a photo, so we put painting-evoking words into the negative prompt.

Negative prompt

EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)),
Enter fullscreen mode Exit fullscreen mode

This gets you much closer to a photo. The negative prompt is really important.

Add words for fine detail

(extremely detailed eyes and face)
Enter fullscreen mode Exit fullscreen mode

Add low-quality terms to the negative prompt

Drive the point home by adding words meaning the opposite of high quality to the negative prompt.

Negative prompt

worst quality, low quality, normal quality, jpegartifacts, signature, watermark, blurry, cropped, poorly draw, poorly draw, worst quality, low quality, lowres,
Enter fullscreen mode Exit fullscreen mode

Weight specific words

You can give emphasis to a word by weighting it like this:

(detailed clothes:1.2)
Enter fullscreen mode Exit fullscreen mode

Originally published in Japanese on Qiita. I build apps with machine learning and AR, and write about both. GitHub / X

Top comments (0)