Image Generation Prompts: Techniques and Best Practices

Within the llmnet.nl community, we see a clear trend: developers who are masters at guiding large language models (LLMs) often get stuck when transitioning to image generation. Where a text model asks for context, logic, and step-by-step instructions, an image model (such as Midjourney, DALL-E, or Stable Diffusion) requires a completely different approach.

Writing a prompt for image generation is less like having a conversation and more like directing a movie scene in a single sentence. You must simultaneously take on the role of director, camera operator, lighting technician, and set dresser. In this article, we dissect the fundamental differences between text and image prompts, discuss the anatomy of a perfect image prompt, and look at advanced iteration techniques.

The Fundamental Difference: Logic versus Aesthetics

When working with an LLM like GPT-4 or Claude, you use natural language and often structure the prompt using specific prompting techniques such as Chain-of-Thought or Few-Shot. You give the model room to reason. Image generators work fundamentally differently. Although DALL-E 3 has become much better at understanding natural language, models like Midjourney and Stable Diffusion operate primarily on the basis of "token weights" and conceptual associations in the latent space.

Image models scan your text for recognizable keywords (tokens) and look for the visual representation associated with those tokens in their training data. Grammar is often secondary to word placement. In many architectures (such as CLIP, the commonly used text encoder), words at the beginning of the prompt carry more weight than words at the end. To truly understand how these models go from noise to an image, you can read more on our learning platform about what exactly diffusion models are.

Empirical assumption: Although the exact weighting of tokens in closed models like Midjourney v6 is not public, extensive community research suggests that the first 5 to 10 words in your prompt determine 70% of what the main subject of the image will be. Save details for later parts of your prompt.

The Anatomy of a Perfect Image Prompt

A robust image prompt is built from several layers. Just like an onion, you start at the core and then add layers of detail. By maintaining a fixed structure, you significantly increase the predictability of your results.

1. The Main Subject (Subject & Action)

This is the core of your image. Who or what is central, and what is it doing? Be as specific as possible. Instead of "a dog", use "a golden retriever puppy". Instead of "a man", say "an old fisherman with a weathered face". Also add the action, even if it is a portrait (for example: "looks directly into the camera", or "runs through a field").

2. The Medium and Style (Medium & Style)

Without specifying the medium, the model will guess based on the subject. Define exactly what you want to see. Is it a polaroid photo, an oil painting, a 3D render (Unreal Engine 5), or a pencil sketch? Add style elements here as well. Think of art movements (Cyberpunk, Art Deco, Renaissance) or the style of specific artists or directors (provided this is ethical and within the model's guidelines).

3. Lighting and Mood (Lighting & Mood)

Lighting makes or breaks an image. Developers often forget this step, whereas photographers know that light is the most important element. Use terms like:

4. Composition and Camera Technique (Framing & Camera)

If you are going for photorealism, use terms from photography. Determine the framing: Extreme close-up, medium shot, wide angle, drone view, or isometric view. You can even simulate specific lenses and film types by adding terms like 35mm lens, f/1.8 aperture (for a blurry background/bokeh) or Kodak Portra 400 for a specific color film look.

5. Quality and Resolution Modifiers

Although these are less necessary in modern models (like Midjourney v6) than they used to be, they can still help nudge the model in a certain direction. Terms like 8k resolution, highly detailed, masterpiece, sharp focus, and award-winning guide the model toward the part of the training data labeled as high quality.

Negative Prompts: Guiding by Omission

In addition to telling the model what you do want, it is often crucial to tell it what you do not want. We call this negative prompting. Especially in Stable Diffusion, this is an essential part of the workflow. It forces the mathematical calculation in the latent space away from certain concepts.

In Midjourney, you often achieve this with the --no parameter at the end of your prompt. For example, if you generate a street scene but do not want to see cars, you add --no cars. Negative prompts are also widely used to suppress common generation errors. A standard negative prompt in Stable Diffusion often looks like this:

ugly, deformed, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, text, watermark, signature

Note: DALL-E 3 does not support direct negative prompts via a separate input field, but requires you to specify in natural language what should be omitted (e.g., "Make sure there is absolutely no text in the image").

Iterating: From First Concept to Masterpiece

A perfect image is rarely created on the first try. While we iterate with text models via follow-up questions, image generation requires a different cycle. If you do not apply the basic techniques correctly, this often results in hours of frustration, one of the most common prompting errors.

  1. Fix the Seed: Every generated image has a unique 'seed' number (the starting value of the noise). If you want to perform iterations that resemble your previous result, you need to find this seed number and add it to your next prompt. Otherwise, you start with a completely new composition every time.
  2. Adjust Weights (Prompt Weighting): In many systems, you can increase the emphasis on certain words. In Midjourney, you do this with `::` (e.g., `cyberpunk::2`), in Stable Diffusion with parentheses (e.g., `(cyberpunk:1.5)`). This tells the model which element has priority when there are conceptual conflicts.
  3. Inpainting and Outpainting: Accept that a prompt will get you 90% of the way to where you want to be. Then use 'inpainting' (regenerating only a specific part of the image, such as a hand) to fix errors, rather than endlessly tweaking the entire prompt.

Common Mistakes in Image Generation

When we review prompts from newcomers in the community, we often see the same patterns leading to suboptimal results:

Practical Examples and Prompt Breakdown

Let's put the theory into practice with two examples that you can save directly to your own prompt library.

Example 1: Photorealistic Portrait

A medium shot portrait of an elderly female mechanic with dirt on her face, wearing worn-out blue overalls. She is holding a large silver wrench. Lighting: warm golden hour light coming from the left, deep shadows on the right. Camera: 85mm lens, f/1.4 aperture, shallow depth of field, blurred background of a cluttered garage. Highly detailed, photorealistic, Kodak Portra film grain. --ar 16:9 --v 6.0

Why this works: The prompt is structured. First the subject (elderly mechanic, clothing, dirt, tools). Then the lighting (golden hour, direction-specific). Finally, the camera (lens, aperture for the blurry background) and the overall aesthetic (Kodak film grain).

Example 2: Abstract Concept Art

Isometric 3D render of a futuristic floating coffee shop. Cyberpunk aesthetic, neon pink and cyan colors. The coffee shop is surrounded by floating glowing coffee beans. Volumetric fog in the background. Clean minimalist design mixed with high-tech cables. Created in Unreal Engine 5, octane render, ray tracing, ultra-detailed --no humans, text, typography

Why this works: Here we strongly guide the medium (Isometric 3D render). The colors and aesthetics (Cyberpunk, neon) are clearly named. The negative prompt (--no humans, text) ensures that the architecture remains central and prevents the common error of gibberish text on signs.

The Practice Routine for Developers

Writing image prompts is a skill you need to train. Just as you learn to debug by reading a lot of code, you learn to prompt through targeted experimentation. We recommend the following daily practice routine:

  1. Reverse Engineering: Find an image you find impressive on platforms like Civitai or the Midjourney Gallery. Study the original prompt. Which words surprise you?
  2. The A/B Test: Take a simple prompt (e.g., "a cat on a table"). Generate it. Now add exactly one word for the lighting (e.g., "volumetric lighting"). Generate again. Document the visual difference. This builds your understanding of token behavior.
  3. Mixing Styles: Combine two totally different aesthetics (e.g., "Darth Vader in the style of Vincent van Gogh's Starry Night"). This helps you understand how the model handles conflicting conceptual spaces.

By following this structured approach, you move away from blindly guessing keywords and evolve into a methodical 'prompt engineer' for image generation. Experiment with the structure, guide the output via negative prompts, and be prepared to work iteratively. The perfect image is always just one small prompt adjustment away.