Technology

Prompt in Stable Diffusion: How to write commands to create beautiful and high-quality images

2024-11-14 09:30:01


Stable Diffusion is an AI model for generating images from text commands called "prompts." These commands are crucial factors that determine the appearance and details of the resulting images. Writing good prompts is an essential skill that helps us obtain beautiful, high-quality photos that meet our needs. In this article, we will understand the basics of prompts and introduce techniques for writing prompts to achieve the desired images.




Get to know Prompt and its basic structure.

A prompt is a command that users input into the AI model, which can be either short or long, depending on the details we want to include in the image. These commands guide the model in creating an image with various elements such as colors, components, poses of the subject, or background.

The basic structure of an effective prompt may include:

  • Main Subject: such as "portrait of a woman" or "landscape of a mountain at sunset"
  • Additional details (Attributes): such as color, facial features, pose of the subject, location
  • Specific Styles: such as "realistic," "fantasy," or "cyberpunk"
  • Aesthetic Filters: such as "highly detailed," "cinematic lighting," or "HDR"

Example prompt:

"portrait of a beautiful woman, wearing a blue dress, looking at the camera, hyper-realistic, cinematic lighting, detailed face, soft focus background"


Tips for writing prompts to get beautiful and high-quality images

Emphasizing important keywords

You can use descriptive keywords to emphasize what you want to make clear. Words like "ultra-realistic," "4K resolution," "highly detailed," or "artistic lighting" help enhance the details and quality of the image.

Use style and tone to define characteristics.

Stable Diffusion supports a variety of styles, whether it's "fantasy," "cyberpunk," "medieval," or "anime style." This will help set the tone of the image and create the desired atmosphere to better match the theme.

Add descriptions related to light and shadow.

Light and shadow play a crucial role in creating the atmosphere of an image. Terms like "soft lighting," "dramatic shadows," "golden hour lighting," or "backlit" can add interesting dimensions and depth to the image.

Controlling the details of the subject

If you want your model to have high detail, add words like "highly detailed," "intricate details," or "textured" into the prompt to make the model focus on the details in the areas you want, such as the model's face, skin, clothing, etc.

Setting the background and atmosphere

If you want the image to have a beautiful background or an interesting atmosphere, you can add descriptions to specify the background, such as "in a lush forest," "at a busy city street," or "sunset by the beach," etc.

Example of a prompt tailored to produce high-quality images

"portrait of a young woman, ethereal, dreamy, soft focus, gentle backlighting, bokeh background, ultra-realistic, 4K resolution, cinematic lighting"

"majestic mountain landscape, sunset, glowing orange and pink skies, high resolution, detailed textures, photorealistic, HDR effect, cinematic"

"futuristic cityscape, cyberpunk style, neon lights, rain-soaked streets, dark and moody atmosphere, intricate details, high resolution, hyper-realistic"


Precautions for Writing Prompts

  • Avoid overly long prompts, as prompts with excessive detail may cause the model to generate complex images that lack focus.
  • Using confusing or ambiguous vocabulary, unclear terms may cause the model to misunderstand the desired image.
  • Trying multiple prompts because sometimes a slight adjustment in the description can yield different results.




Writing prompts for Stable Diffusion is a skill that requires continuous practice and experimentation to find a style you like and achieve satisfactory results. Using keywords that focus on the desired details and atmosphere is crucial. Additionally, specifying tone and particular characteristics helps enhance the quality and appeal of the images.

Leave a comment :