Model Details
FLUX.1 Kontext [dev] edits an image you provide by following a plain-language instruction. You pass a source photo and a prompt describing the change — swap an object, restyle the scene, replace the background, alter text, or adjust color — and it re-renders the image with that edit applied while keeping everything you didn't mention consistent. Its strength is character and scene consistency across edits: faces, products, composition, and untouched regions stay stable instead of being regenerated from scratch, so iterative edits compound cleanly. It is the open-weights image editor from Black Forest Labs, tuned for precise local and global instruction-based editing.
## Best for - Instruction edits to a photo — "change the wooden floor to white marble", "make it nighttime", "remove the person on the left" - Restyling or relighting a scene while preserving the subject's identity and pose - Replacing or restyling backgrounds without regenerating the foreground - Editing or correcting text and signage inside an existing image - Iterative, multi-step edits where consistency must hold across rounds
## Choose another model when - You have no source photo and want to generate an image from a prompt alone — use a text-to-image model - You want the edited result animated or in motion — use an image-to-video model - You need a precisely masked inpaint of one region only — use a dedicated inpainting model
## Tips - Describe the change precisely and name what should stay the same — Kontext keeps unmentioned regions consistent, so specific instructions edit less of the image - Leave `resolution_mode` at `match_input` (the default) to preserve the source image's dimensions and keep the edit aligned with the original for before/after comparison - Raise `guidance_scale` toward the higher end of its range for stronger adherence to the instruction; lower it if the edit looks over-applied
## Advanced Configuration - `num_inference_steps` (10–50, default 28) trades speed for refinement; more steps can sharpen detail. - `guidance_scale` (1–20, default 2.5) controls how strongly the result follows the instruction; raise it for stronger edits. - `resolution_mode` (default `match_input`) sets the output resolution: `match_input` keeps the source dimensions, `auto` lets the model pick an optimal resolution for the input aspect, or force an aspect ratio such as `16:9`, `4:3`, or `9:16`. - `acceleration` (`none`, `regular`, `high`, default `none`) speeds up inference at a small quality trade-off; it does not change the price. - `output_format` selects `jpeg` (default) or `png`.
To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";
const result = await modelrunner.subscribe("black-forest-labs/flux-kontext/dev", { input: { prompt: "Change the wooden floor to white marble.", image_url: "https://media.modelrunner.ai/OnB0a9tFqLGcUP53RQ46n.png", resolution_mode: "match_input", }, }); ```



