What is Flux.1 Kontext?

Flux.1 Kontext is an instruction-based image editing model based on Flux.1.

There's no doubt this was the model that kicked off the AI image editing boom that nano banana and others followed.

Like Flux.1, it comes in three variants, pro, max, and dev, but only dev can be run locally.


What is Instruction-based Image Editing?

On this site, a model that takes an image plus a text instruction and edits the image to follow that instruction is called an instruction-based image editing model.

Say you want to make the hair of a woman in a photo red. Until now, you'd mask the hair, add ControlNet Canny so the hairstyle wouldn't change, and then inpaint with a prompt like "photo of a woman with red hair."

With instruction-based image editing, it's easy. Just pass the image to the model and instruct it, "Make the woman's hair red," the way a producer would ask a designer.

Changing facial expressions, removing objects that get in the way, converting the art style.

You can do all of it with a single model and a prompt.


Model Download

Kontext uses basically the same set of models as regular Flux.1.

📂ComfyUI/
└── 📂models/
    ├── 📂diffusion_models/
    │   └── flux1-dev-kontext_fp8_scaled.safetensors
    ├── 📂clip/
    │   ├── clip_l.safetensors
    │   └── t5xxl_fp8_e4m3fn_scaled.safetensors
    ├── 📂vae/
    │   └── ae.safetensors
    └── 📂unet/
        └── flux1-kontext-dev.gguf      ← Only when using gguf

Workflow (Basic)

The Kontext workflow itself is simple: it's just the regular Flux.1 workflow with ReferenceLatent added.

flux_1_kontext.json
  • 🟪 Load flux1-dev-kontext_fp8_scaled.safetensors.
  • 🟩 Resize the input image to a resolution suitable for Kontext with the FluxKontextImageScale node.
    • Flux has a set of recommended resolutions, and the one with the closest aspect ratio is picked automatically.
  • 🟩 Convert the resized image to a latent and connect it to ReferenceLatent.

How to write prompts

In general, follow the official prompting guide.

That said, there's no special syntax. Just write what you want in plain English, along the lines of "Make ◯◯ △△," and it'll usually work.

If things you wanted left alone change too (e.g., you only wanted a new hairstyle but the background changed), spell out what should stay the same, like this:

  • e.g. Keep the person's pose, position, and size the same.

That said, the model itself often doesn't follow instructions very well. Don't expect too much from it just yet.


Capabilities

Deep diveCapabilities

Image Editing

Change the hair to a messy blonde bob.

Style Transfer

This character is made out of Lego blocks.

Object Removal

Remove the woman

Text Replacement

Replace [OPEN] with [FLUX]

Subject Transfer

A photo of a girl who received a stuffed elephant as a Christmas present.

Positioning by Guide

Add a sailing ship to the box position.

Refine Collage

An edit that blends in a collage you put together by hand.

Transform the flat duck sticker into a realistic plush duck toy with the same blue hat and place it in the woman’s arms so she is naturally hugging it. Also turn the outlined pendant lamp into a realistic lamp, removing the white sticker edges and matching the scene’s lighting, color, and perspective.

There's also a LoRA that improves this ability.