How to write an image prompt from a picture you like
The short answer
A prompt made from a picture describes what is in it: the subject, the kind of picture, the light, the shot, the mood and the colors. Write it as sentences for Midjourney, DALL·E 3, Flux and Stable Diffusion 3, as short comma-separated phrases for Stable Diffusion 1.5 and XL, and as Danbooru tags for anime checkpoints. Ask for a size close to the shape of the picture. It will give you a picture like the original in subject and mood, not the same picture, and if the original was made by a generator, its real prompt may be saved inside the file.
You see a picture and want to make something like it: the same kind of scene, the same mood, the same colors. A generator needs words, and finding the words is the hard part. This guide shows how a prompt is built, so that you can write one yourself or check one that a tool wrote for you.
First check whether the prompt is already there
If the picture was made with Stable Diffusion, ComfyUI or a similar tool, the prompt, the seed and the settings are often saved inside the file. Image to Prompt shows that prompt in a box of its own when the file still has it, and the Image Metadata Viewer shows everything else saved in the file. Our guide on reading the prompt from a Stable Diffusion image shows where it is stored and why it disappears when a picture is posted on many sites. If it is there, it is better than anything written from the pixels.
The parts of a prompt
Whatever the generator, a useful prompt covers the same few things, roughly in this order of importance:
| Part | What to write | Example |
|---|---|---|
| Subject | What is in the picture, and what it is doing. | a lake surrounded by snow-capped mountains |
| Setting | Where, what is around it. | trees in the foreground, a clear blue sky |
| Kind of picture | Photograph, oil painting, pencil sketch, 3D render, anime. | an oil painting of... |
| Light | Time of day, quality of light. | soft light, golden hour, overcast |
| Shot | Close-up, wide, from above, shallow depth of field. | wide shot |
| Mood and colors | The feel and the main colors. | cool tones, pale blue and dark teal |
A picture tells you the subject and setting by looking, and tone and color by measuring. The kind of picture is something you choose: a generator will draw a lake as a photo, a watercolor or a cartoon, whichever you ask for. Our own attempt to have software guess the kind of picture automatically was wrong more often than it was right on a test of 88 pictures, so our Image to Prompt tool leaves that choice to you.
Words for light, angle and framing
A description names the things in a picture. The tone words our tool adds cover brightness, contrast, warmth and color, and nothing about the camera. Framing, camera angle, lens and the direction of the light are yours to add, and photographers already have a compact vocabulary for them. Look at the picture with this table next to it:
| Words | What they describe | How to spot it in the picture |
|---|---|---|
| close-up, medium shot, full shot, wide shot | How much of the subject fills the frame | A face filling the frame is a close-up; waist up is a medium shot; head to toe is a full shot; a person small in a landscape is a wide shot |
| eye level, low angle, high angle | Where the camera was relative to the subject | From below, a subject looms over you; from above, it looks smaller and you see the ground around it |
| overhead shot, flat lay | Camera pointing straight down | Food on a table or objects laid out, with no horizon |
| tilted angle (Dutch angle) | A deliberately crooked horizon | Verticals lean to one side |
| wide-angle lens | A short focal length that takes in a lot | Near things look big, far things small, and straight lines near the edges lean or stretch |
| telephoto lens | A long focal length from far away | Distances look squeezed: the background seems close behind the subject and large |
| macro | A very close shot of something small | An insect, a drop of water or the texture of a leaf fills the frame |
| shallow depth of field, bokeh | A sharp subject against a soft background | Background lights turn into soft discs; see our guide to blurring a photo's background |
| golden hour | Sunlight shortly after sunrise or before sunset | Low, warm light, long shadows, glowing edges |
| blue hour | Twilight after sunset or before sunrise | Even, cool light, a deep blue sky, artificial lights already on |
| overcast, soft light | Light from a large, diffuse source | Faint, blurry shadows or none at all |
| hard light | Direct sun or a bare flash | Crisp, dark shadows with sharp edges |
| backlit, rim light | Light from behind the subject | A bright outline around hair or edges, the front darker |
| centered, symmetrical, rule of thirds, negative space | Where things sit in the frame | Subject in the middle; mirror-like halves; subject a third of the way in; a large empty area around a small subject |
Two or three of these words, chosen because the picture really shows them, do more than a long list. Adding "golden hour" to a picture taken at noon asks for a different picture.
Sentences, keywords or tags?
Generators were trained on different kinds of text, and they read prompts differently:
- Sentences suit Midjourney, DALL·E 3, Flux and Stable Diffusion 3. Write a description the way you would explain the picture to a person: "An old red barn at the edge of a wheat field at sunset, with long shadows across a gravel road."
- Short phrases separated by commas suit Stable Diffusion 1.5 and XL: "oil painting, a mountain range reflected in a lake, cool tones, pale blue and dark teal colors". Stable Diffusion 1.x reads about 75 tokens (roughly 55 words) at a time, so a long paragraph is partly ignored or split.
- Danbooru tags suit anime checkpoints that were trained on tagged pictures: "1girl, solo, black hair, red eyes, school uniform, looking at viewer". See our guides on Danbooru tags and on tags versus sentences.
These are conventions, and you can break them. If a prompt gives poor results, try another layout before you rewrite it.
Brackets, weights and escapes in Stable Diffusion
Stable Diffusion front ends in the AUTOMATIC1111 family give round and square brackets a meaning, and that changes how you write a prompt made from a picture. The rules, from the AUTOMATIC1111 feature documentation:
| You write | Effect |
|---|---|
(turquoise lake) | More attention to those words, by a factor of 1.1 |
((turquoise lake)) | 1.21 (1.1 × 1.1) |
(turquoise lake:1.4) | Exactly 1.4 |
[clouds] | Less attention, divided by 1.1 |
watercolor (medium) | The brackets are typed as plain characters, because of the backslashes |
BREAK (in capitals) | Ends the current 75-token chunk and starts a new one |
The escape matters for tags. Many Danbooru tags contain brackets, such as watercolor_(medium) or a character's name followed by the series in brackets. Pasted as they are, the brackets would be read as emphasis and disappear from the text, so our tool writes them with backslashes in its anime-tag layout. NovelAI follows an older version of the same idea with curly braces and a smaller step: its {word} equals (word:1.05) in AUTOMATIC1111.
Long prompts are not cut off in these front ends: they are split into chunks of 75 tokens that are encoded separately and joined. A phrase that happens to fall across the border between two chunks is split in half, which is what BREAK is for. Our guide on tags versus sentences shows how many words fit in 75 tokens. For generators that read sentences, the surer way to stress something is to put it first and describe it more fully.
A worked example
For this photo our tool wrote, as sentences: A stunning view of a lake surrounded by snow-capped mountains, with trees in the foreground and a clear blue sky in the background. Cool tones, pale blue and dark teal colors. As keywords: a mountain range is reflected in the water of a lake, cool tones, pale blue and dark teal colors. As anime-style tags: scenery, outdoors, no humans, mountain, sky, day, blue sky, water, reflection, landscape, cloud, nature, lake, river, building, tree. Note that the tags are only suggestions: "river" and "building" do not look right for this picture. Delete tags and phrases that do not match before you use them.
Editing the draft against the picture
A drafted prompt is worth a two-minute check, and the errors fall into a few kinds you can look for one at a time:
- Where things are. In front of or behind, on top of or next to: the plainest mistake we saw was a position (the lighthouse and the fence, further down). Read every "on", "behind" and "in the foreground" against the picture.
- Names it cannot know. Long descriptions like to name a species or a model. Our tests produced a confident "hedge sparrow", and a "Rolls Royce Silver Cloud II" for a car whose number plate read "CLASSIC S1": the plate was read correctly, and the model name was a guess we could not check. If you cannot confirm a name, replace it with what you see ("a small brown bird", "a classic car").
- Tags made for drawings. Anime tags come from a model trained on illustrations. On photos it called a red-roofed lighthouse
scarlet_devil_mansion(a location from a video game) and fishing boatsmilitary_vehicleandwarship. Keep the tags that are plainly right and drop the rest. - What it left out. Look for the one thing that makes the picture yours: the color of the water, a pose, a reflection. In the lake photo above, the color words say "pale blue and dark teal", but most people would call that water turquoise, and the sentence version never mentions the mirror image of the peaks (only the keyword version does).
- Mood filler. Long descriptions end sentences with "creating a sense of calm" and add sentences that only say the picture is peaceful. Our tool's "Cut the sentences that only say how the picture feels" option removes those: on the medium and long descriptions of 88 test pictures it dropped 58 of 698 sentences, shortened 88 more, and took the text from 11,007 to 9,708 words, 12% shorter.
After that pass, the lake prompt for a generator that reads sentences could become: A wide photograph of a turquoise lake surrounded by snow-capped mountains, the peaks reflected in the water, trees in the foreground, a clear blue sky. Cool tones, pale blue and dark teal colors. Every phrase in it can be checked against the photo.
Ask for the right size
A generator draws best at the sizes it was trained on, and a wrong shape often gives odd crops or doubled subjects. Stable Diffusion 1.5 wants about 512 × 512 pixels in area, and larger sizes tend to repeat the subject. Stable Diffusion XL was trained on nine sizes around one megapixel. DALL·E 3 offers three. Midjourney takes a ratio at the end of the prompt with --ar, and Stable Diffusion 3 and Flux are safe at about one megapixel with both sides a multiple of 64. Here is what our tool works out for common picture shapes:
| Your picture | Midjourney | SD 1.5 | SDXL | About 1 MP (SD 3, Flux) | DALL·E 3 |
|---|---|---|---|---|---|
| Phone photo, 4032 × 3024 | --ar 4:3 | 576 × 448 | 1152 × 896 | 1152 × 896 | 1792 × 1024 |
| Phone photo upright, 3024 × 4032 | --ar 3:4 | 448 × 576 | 896 × 1152 | 896 × 1152 | 1024 × 1792 |
| Camera photo, 6000 × 4000 | --ar 3:2 | 640 × 384 | 1216 × 832 | 1280 × 832 | 1792 × 1024 |
| Widescreen, 1920 × 1080 | --ar 16:9 | 704 × 384 | 1344 × 768 | 1344 × 768 | 1792 × 1024 |
| Portrait post, 1080 × 1350 | --ar 4:5 | 448 × 576 | 896 × 1152 | 896 × 1152 | 1024 × 1024 |
| Phone wallpaper, 1080 × 1920 | --ar 9:16 | 384 × 704 | 768 × 1344 | 768 × 1344 | 1024 × 1792 |
| Ultrawide, 2560 × 1080 | --ar 19:8 | 768 × 320 | 1536 × 640 | 1600 × 640 | 1792 × 1024 |
A few things show up in the table. DALL·E 3's three sizes fit few pictures well: a 4:5 portrait gets a square, and a 4:3 photo gets a frame of 7:4, noticeably wider, so keep the subject in the middle and crop afterward. SDXL's fixed sizes bend the shape a little (3:2 becomes 1216 × 832, which is 1.46 to 1), while the one-megapixel column can follow the shape more closely because any multiple of 64 is allowed. For Midjourney the tool looks for the smallest whole numbers, up to 21, that are within 1% of the picture's shape. That is why the ultrawide screen comes out as 19:8: the familiar "21:9" is 1.6% off its real shape of 2.37 to 1.
When you need a bigger file, generate at these sizes and enlarge the result afterward, for example 2 to 4 times with our image upscaler, rather than asking the generator for a size it was not trained on.
Negative prompts
Stable Diffusion front ends have a second box for things to avoid ("blurry, low quality, watermark, text, signature"). Midjourney takes --no followed by words. DALL·E 3 has no negative prompt, and some newer models give them little or no effect. A short, general list is a starting point, not a recipe; it does not come from your picture.
When words are not enough: img2img and ControlNet
A prompt carries the subject, the look and the mood. It carries the layout only loosely: "mountains behind a lake" can be drawn a thousand ways. When you want the composition of the original as well, Stable Diffusion front ends let you hand over the picture's structure alongside the words:
- img2img starts the generation from the picture itself instead of from noise. The denoising strength setting decides how far the result may move away from it: low values keep colors and layout and change surface detail, high values keep little more than the rough arrangement.
- ControlNet steers the drawing with a map made from the picture while the prompt decides what fills it. An edges map (Canny) holds the outlines in place, a line art map suits drawings, and a depth map keeps what is near and far while leaving shapes and textures free to change.
Our ControlNet Maps tool makes those three maps from any picture, at the 512-pixel shorter side that ControlNet's own tools use by default, with Canny edges that match OpenCV's pixel for pixel. You load a map into the ControlNet unit of your front end together with the prompt from this guide. For the lake photo, a depth map would hold the layout of shore, water and peaks, and the prompt could still turn the scene into a watercolor or a winter night.
Troubleshooting the pictures you get
| What you get | Likely cause | What to change |
|---|---|---|
| The subject appears twice, or limbs multiply | The size is far above what the model was trained on (common with SD 1.5) | Use the size from the table above and enlarge the result afterward |
| You asked for an oil painting and got a photo | The kind of picture sits at the end of a long prompt | Put it first: "An oil painting of..." (Image to Prompt's Kind of picture does this) |
| Colors land on the wrong objects | A keyword list does not say which color belongs to which thing | Write that part as a sentence: "a red door in a white wall". Our guide on tags versus sentences explains why |
| Letters or a fake signature appear | Generators often draw signs and captions | Add "text, signature, watermark" to the negative prompt, or --no text in Midjourney |
| The end of a long keyword list seems ignored | Too many words compete for attention, or a phrase is split across a 75-token chunk | Cut to the strongest phrases. The tool warns when the Keywords layout passes 55 words |
| The pictures are pleasant but generic | The prompt describes any lake, not this one | Add the detail that makes the original distinctive, from the editing pass above |
| Right content, wrong layout | A prompt cannot fix positions precisely | Use img2img or a ControlNet map from the original |
What a prompt cannot do
- It cannot give you the same picture. A prompt is a description. Words cannot carry the exact face, light or brushwork, and a generator makes a new picture each time.
- The description may be wrong. A small model can misplace objects, invent details and read an outfit or an age wrongly. In our tests it put a lighthouse on top of a fence that was in front of it.
- It does not name an art style. Describe the look in plain words (soft brush strokes, flat colors, thick outlines) rather than the name of a living artist, whose work you would be trying to copy.
- Other people's pictures. Describing a picture you did not make to generate a close copy can still be a copy of someone's work. Use it for inspiration, and change what you make.
- Pictures of real people. A description of a person's looks can be wrong and should not be used to identify them or to make pictures that pass as them.
A quick routine
- Look in the file's metadata first (Image to Prompt shows a saved prompt as soon as you add the picture). If a prompt is there, use it.
- Make a description with Image to Prompt, choose the layout for your generator, and the kind of picture you want.
- Do the five-point editing pass above, and add two or three words for light and framing from the vocabulary table.
- Ask for the size from the table, generate a few pictures, and change one thing at a time.
Describe a picture as a prompt for Midjourney, Stable Diffusion, Flux or DALL·E: sentences, keywords or anime tags, with the tone, colors and the size to ask for. It runs in your browser. Open the Image to Prompt.
Frequently asked questions
Can I get the exact prompt that made an image?
Only if it was saved inside the file. Stable Diffusion and ComfyUI often save it; many websites remove it when you upload. Check the file in the metadata viewer. A prompt written from the pixels is a description of the picture, which can differ a lot from the original prompt.
Will the prompt give me the same picture?
No. It will give you a picture with a similar subject and mood. The exact details change every time because a generator makes a new picture from the words and a random seed.
Which format is best: sentences, keywords or tags?
Sentences for Midjourney, DALL·E 3, Flux and Stable Diffusion 3. Short phrases for Stable Diffusion 1.5 and XL. Danbooru tags for anime checkpoints trained on tags. If one gives poor results, try the next.
How long should a prompt be?
Long enough to cover the subject, setting, kind of picture, light and mood, and no longer. Stable Diffusion 1.x reads about 75 tokens at a time, so shorter is better there; sentence-based generators handle a paragraph.
Why does the tool suggest a square for my portrait photo in DALL·E 3?
DALL·E 3 offers only three sizes: 1024 × 1024, 1792 × 1024 and 1024 × 1792. A 4:5 portrait is closer in shape to the square than to the tall 4:7 frame, so the square is the nearest fit. Crop the result to 4:5 afterward.
Can I use the anime tags for a photo?
You can, but check them carefully. The tagger was trained on illustrations, and on photos it sometimes reaches for drawing vocabulary or names from games and anime. For a photographic generator, the sentence or keyword layout usually suits a photo better.
Can I use these prompts as captions for training a LoRA?
They are a reasonable first draft, but training captions follow different rules: they should describe what varies between your pictures and leave out what the LoRA should learn as a whole, and quality words and negative prompts do not belong in them. Our guide to LoRA dataset captions covers how to write them.
Should I put an artist's name in the prompt?
We recommend describing the look in words instead. Using a living artist's name asks the generator to imitate their work, and many artists object.