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.
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
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.
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
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
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
When working on style transfer prompts, follow those principles:
Input image
Converted to pencil sketch
Transformed to oil painting
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
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
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. The prompts used for each edit are shown in the captions below each image.
Input image
Remove the object from her face
She is now taking a selfie in the streets of Freiburg, it’s a lovely day out.
It’s now snowing, everything is covered in snow.
For Character consistency, you can follow this framework to keep the same character across edits:
Common mistake: Using vague references like “her” instead of “The woman with short black hair”
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 'FREIBURG'
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
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.”
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.
Input image
Vague prompt result
Detailed prompt result
Focused prompt result
Vague prompts replace identity:
Detailed prompts preserve identity:
Focused prompts change only what’s needed:
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.
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:
Input image
Simple beach prompt
Put on beach prompt
Precise prompts maintain exact positioning:
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:
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:
Precise style prompts maintain structure:
Input image
Basic sketch prompt
Precise sketch prompt
Replace 'joy' with 'BFL'
works better than general text descriptions.Remember: Making things more explicit never hurts if the number of instructions per edit isn’t too complicated.