Prompting Guide - Image-to-Image
Maximum prompt token is 512 tokens.
Kontext makes editing images easy! Specify what you want to change and Kontext will follow. It is capable of understanding the context of the image, making it easier to edit them without having to describe in details what you want to do.
Basic Object Modifications
Kontext is really good at straightforward object modification, for example if we want to change the colour of an object, we can prompt it.
Input image
Output: Car changed to red
Prompt Precision: From Basic to Comprehensive
As a rule of thumb, making things more explicitly never hurts if the number of instructions per edit is not too complicated.
If you want to edit the image with more modifications, it is useful to be more explicit in your prompts to make sure you get the result you want.
Quick Edits
While using very simple prompts might yield some good results, it can also change the style of the input image.
Prompt: “Change to daytime”
Input image
Output 1
Output 2
Controlled Edits
If we add more instructions to our prompt, we can have results which are really similar to the input image.
Prompt: “Change to daytime while maintaining the same style of the painting”
Input image
Output image
Complex Transformations
If you want to change multiple things on the input image, it is generally good to add as many details as possible as long as the instructions per edit aren’t too complicated.
Prompt: “change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting”
Input image
Output image
Style transfer
Using prompts
When working on style transfer prompts, follow those principles:
- Name the specific style: Instead of vague terms like “make it artistic,” specify exactly what style you want (“Transform to Bauhaus art style,” “Convert to watercolor painting”)
- Reference known artists or movements: For more precise results, include recognizable style references (“Renaissance painting style”, “like a 1960s pop art poster”)
- Detail the key characteristics: If naming the style doesn’t work, it might be good to describe the visual elements that define the style:
- “Transform to oil painting with visible brushstrokes, thick paint texture, and rich color depth”
- Preserve what matters: Explicitly state what elements shouldn’t change:
- “Change to Bauhaus art style while maintaining the original composition and object placement”
Input image
Converted to pencil sketch
Transformed to oil painting
Using Input image
Note: This technique works best with FLUX.1 Kontext pro. FLUX.1 Kontext dev may produce less consistent style matching when using input images as style references.
You can also use input images as style references to generate new images. For example with the prompt: “Using this style, a bunny, a dog and a cat are having a tea party seated around a small white table” we get:
Style reference 1
Tea party output 1
Style reference 2
Tea party output 2
Style reference 3
Tea party output 3
Transform images into different styles
Kontext lets you transform images in creative ways. On the example below, we restyle our photo into different visual styles and also doing different activities.
If your goal is to dramatically change the input image, it is generally a good idea to do it step by step like the sequence below.
Input image
Restyled to Claymation
Character picking up weeds
Iterative editing with Prompts while keeping Character Consistency
Kontext excels at character consistency, even after multiple edits. Starting from a reference picture, we can see that the character is consistent throughout the sequence.
Input image
Taking a selfie in Freiburg
Thing removed from face
Snowing scene
For Character consistency, you can follow this framework to keep the same character across edits:
- Establish the reference: Begin by clearly identifying your character
- “This person…” or “The woman with short black hair…”
- Specify the transformation: Clearly state what aspects are changing
- Environment: “…now in a tropical beach setting”
- Activity: “…now picking up weeds in a garden”
- Style: “Transform to Claymation style while keeping the same person”
- Preserve identity markers: Explicitly mention what should remain consistent
- “…while maintaining the same facial features, hairstyle, and expression”
- “…keeping the same identity and personality”
- “…preserving their distinctive appearance”
Common mistake: Using vague references like “her” instead of “The woman with short black hair”
Text Editing
Kontext can directly edit text that appears in images, making it easy to update signs, posters, labels, and more without recreating the entire image.
The most effective way to edit text is using quotation marks around the specific text you want to change:
Prompt Structure: Replace '[original text]' with '[new text]'
Example - We can see below where we have an input image with “Choose joy” written, and we replace “joy” with “BFL” - note the upper case format for BFL.
Input image
JOY replaced with BFL
Input image
Sync & Bloom changed to 'FLUX & JOY'
Input image
'Montreal' replaced with 'FLUX'
Text Editing Best Practices
- Use clear, readable fonts when possible. Complex or stylized fonts may be harder to edit
- Specify preservation when needed. For example: “Replace ‘joy’ with ‘BFL’ while maintaining the same font style and color”
- Keep text length similar - Dramatically longer or shorter text may affect layout
Visual Cues
It is also possible to use Visual cues to suggest to the model where to make edits. This can be particularly helpful when you want to make targeted changes to specific areas of an image. By providing visual markers or reference points, you can guide the model to focus on particular regions.
Example:: “Add hats in the boxes”
Input image
Add hats in the boxes
When Results Don’t Match Expectations
General Troubleshooting Tip
If the model is changing elements you want to keep unchanged, be explicit about preservation in your prompt. For example: “everything else should stay black and white” or “maintain all other aspects of the original image.”
Character identity changes too much
When transforming a person (changing their clothing, style, or context), it’s easy to lose their unique identity features if prompts aren’t specific enough.
- Try to be more specific about identity markers (“maintain the exact same face, hairstyle, and distinctive features”)
- Example: “Transform the man into a viking warrior while preserving his exact facial features, eye color, and facial expression”
Input image
Vague prompt result
Detailed prompt result
Focused prompt result
Vague prompts replace identity:
- Prompt: “Transform the person into a Viking” → Complete replacement of facial features, hair, and expression
Detailed prompts preserve identity:
- Prompt: “Transform the man into a viking warrior while preserving his exact facial features, eye color, and facial expression” → Maintains core identity while changing context
Focused prompts change only what’s needed:
- Prompt: “Change the clothes to be a viking warrior” → Keeps perfect identity while only modifying the specified element
Why this happens?
The verb “transform” without qualifiers often signals to Kontext that a complete change is desired. It might be useful to use other words for example in this context if you want to maintain specific aspects of the original image.
Composition Control
When editing backgrounds or scenes, you often want to keep the subject in exactly the same position, scale, and pose. Simple prompts can sometimes change some of those aspects.
Simple prompts causing unwanted changes:
- Prompt: “He’s now on a sunny beach” → Subject position and scale shift
- Prompt: “Put him on a beach” → Camera angle and framing change
Input image
Simple beach prompt
Put on beach prompt
Precise prompts maintain exact positioning:
- Prompt: “Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them” → Better preservation of subject
Input image
Precise positioning result
Why this happens?
Vague instructions like “put him on a beach” leave too much to interpretation. Kontext might choose to:
- Adjust the framing to match typical beach photos
- Change the camera angle to show more of the beach
- Reposition the subject to better fit the new setting
Style isn’t applying correctly
When applying certain styles, simple prompts might create inconsistent results or lose important elements of the original composition. We could see that in the example above.
Basic style prompts can lose important elements:
- Prompt: “Make it a sketch” → While the artistic style is applied, some details are lost.
Precise style prompts maintain structure:
- Prompt: “Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture” → Preserves the scene while applying the style. You can see more details in the background, more cars are also appearing on the image.
Input image
Basic sketch prompt
Precise sketch prompt
Best Practices Summary
- Be specific: Precise language gives better results. Use exact color names, detailed descriptions, and clear action verbs instead of vague terms.
- Start simple: Begin with core changes before adding complexity. Test basic edits first, then build upon successful results. Kontext can handle very well iterative editing, use it.
- Preserve intentionally: Explicitly state what should remain unchanged. Use phrases like “while maintaining the same [facial features/composition/lighting]” to protect important elements.
- Iterate when needed: Complex transformations often require multiple steps. Break dramatic changes into sequential edits for better control.
- Name subjects directly: Use “the woman with short black hair” or “the red car” instead of pronouns like “her”, “it,” or “this” for clearer results.
- Use quotation marks for text: Quote the exact text you want to change:
Replace 'joy' with 'BFL'
works better than general text descriptions. - Control composition explicitly: When changing backgrounds or settings, specify “keep the exact camera angle, position, and framing” to prevent unwanted repositioning.
- Choose verbs carefully: “Transform” might imply complete change, while “change the clothes” or “replace the background” gives you more control over what actually changes.
Remember: Making things more explicit never hurts if the number of instructions per edit isn’t too complicated.