Skip to content
,

FLUX.1 Kontext Dev in ComfyUI: Complete Image Editing Guide

7–11 minutes
Surprised woman editing a photo by typing on her laptop, KONTEXT card, hook edit with words FLUX Kontext

If you searched for flux1-dev-kontext_fp8_scaled.safetensors, you probably have a workflow asking for that file and want to know where it goes and what else you need.

This guide answers that first, then covers the rest of FLUX.1 Kontext [dev] in ComfyUI: every model file and folder, the node chain, settings that work, prompt rules for clean edits, multi-image editing, GGUF and fast options for smaller GPUs, and fixes for the common problems.

Kontext is Black Forest Labs’ 12-billion-parameter image editing model. You give it a picture and a plain-English instruction (“change the car to red”, “make it a watercolour”, “replace the sign text with OPEN”), and it edits the picture while keeping the rest intact.

It is from mid-2025, so newer editors exist, but it is still one of the most-used local edit models.

TL;DR

  • Main file: flux1-dev-kontext_fp8_scaled.safetensors goes in ComfyUI/models/diffusion_models/ (from Comfy-Org/flux1-kontext-dev_ComfyUI).
  • Also needed: clip_l.safetensors and t5xxl_fp8_e4m3fn_scaled.safetensors (or t5xxl_fp16) in text_encoders/, and ae.safetensors in vae/.
  • Template: flux_kontext_dev_basic in ComfyUI’s template browser.
  • Settings: guidance 2.5 (Black Forest Labs’ value), CFG 1, and a good start of 20 steps with euler / simple.
  • Prompts: English only, up to 512 tokens. Be specific and say what must stay the same.
  • Licence: FLUX.1 [dev] Non-Commercial License. Read it before using outputs commercially.

What FLUX.1 Kontext Dev Is

FLUX.1 Kontext is a family of image models from Black Forest Labs that take text and an image together. The paper behind it was published on 17 June 2025 (arXiv 2506.15742).

Version Where it runs Notes
Kontext [dev] Your own PC 12B open weights, non-commercial licence
Kontext [pro] API (ComfyUI Partner Nodes) Paid, needs credits
Kontext [max] API (ComfyUI Partner Nodes) Paid, highest quality

The ComfyUI docs list four things it is good at: character consistency, targeted local edits, style reference and fast, interactive editing. This guide is about [dev], the version you can run locally.

Every File and Folder

All folders are inside ComfyUI/models/.

File Folder Download
flux1-dev-kontext_fp8_scaled.safetensors diffusion_models/ Comfy-Org/flux1-kontext-dev_ComfyUI (split_files/diffusion_models)
clip_l.safetensors text_encoders/ comfyanonymous/flux_text_encoders
t5xxl_fp8_e4m3fn_scaled.safetensors (smaller) or t5xxl_fp16.safetensors text_encoders/ comfyanonymous/flux_text_encoders
ae.safetensors vae/ Comfy-Org/Lumina_Image_2.0_Repackaged (split_files/vae)

A few notes:

  • If you already run FLUX.1 [dev] or Schnell, you have clip_l, the T5 encoder and ae.safetensors. Only the Kontext diffusion model is new.
  • The fp8 T5 encoder saves memory with little quality loss. Use fp16 if you have 24 GB or more.
  • Black Forest Labs’ original full-precision file is flux1-kontext-dev.safetensors in the black-forest-labs/FLUX.1-Kontext-dev repo. It also goes in diffusion_models/. The ComfyUI Wiki says fp8_scaled shows minimal quality loss against it.
  • The ComfyUI docs’ folder tree spells the VAE ae.safetensor. That is a typo: the file is ae.safetensors.

The VAE link pointing at a Lumina repo is not a mistake. Comfy-Org repackages the same FLUX autoencoder there.

Setup: The Basic Template

  1. Update ComfyUI. The Kontext template and nodes need a recent build. See our ComfyUI install guide if you need to update.
  2. Put the four files in the folders above.
  3. Open Workflow, Browse Templates, and load flux_kontext_dev_basic.
  4. Check Load Diffusion Model shows flux1-dev-kontext_fp8_scaled.safetensors.
  5. Check DualCLIP Load shows clip_l.safetensors and your T5 file, with type set to flux.
  6. Check Load VAE shows ae.safetensors.
  7. Load your picture in the Load Image (from output) node.
  8. Type your edit in CLIP Text Encode, in English.
  9. Press Queue or Ctrl/Cmd + Enter.

The template uses Load Image (from output) instead of the normal Load Image on purpose. After each run, click its refresh button to pick up the image you just made, and edit it again. That makes step-by-step editing easy.

How the Node Chain Works

Kontext feeds the picture into the model as extra context. A typical Kontext graph wires it like this:

  1. Load Image brings in the picture.
  2. FluxKontextImageScale resizes it to a size Kontext was trained on.
  3. VAE Encode turns it into a latent.
  4. ReferenceLatent attaches that latent to your text conditioning.
  5. FluxGuidance sets the guidance value.
  6. KSampler runs at CFG 1, with the negative side zeroed out by ConditioningZeroOut.
  7. VAE Decode and Save Image.

Knowing this chain helps when you build your own graph or debug one. The key idea: the input image goes in through ReferenceLatent, not as the starting latent the way img2img works.

Settings

Setting Value Note
Guidance (FluxGuidance) 2.5 Black Forest Labs’ value in its own example
CFG (KSampler) 1.0 Kontext dev is guidance-distilled; keep CFG at 1
Steps 20 to start Raise to 28 to 30 for fine detail
Sampler / scheduler euler / simple A safe default for FLUX models
Denoise 1.0 The image comes in through ReferenceLatent
Prompt length Up to 512 tokens English only

Only the guidance value comes from Black Forest Labs directly. The step and sampler values are a common starting point rather than an official rule, so adjust them to taste. Our samplers and schedulers guide explains the options.

If an edit is too weak, raise guidance a little (3 to 4). If it changes too much of the image, lower it toward 2.

How to Write Edit Prompts

Kontext follows instructions well, but vague prompts give vague edits. These rules come from the ComfyUI docs’ prompt guide:

  • Be specific. “Change the woman’s jacket to a red leather jacket” beats “make her look cooler”.
  • Say what stays the same. Add “keep her face, pose and the background unchanged”.
  • Edit in steps. Do one change per run and feed the result back in, rather than five changes at once.
  • Prefer “change” or “replace” over “transform”. “Transform” invites the model to redo the whole picture.
  • Name people by description, not pronouns. “The man with the grey beard”, not “him”.
  • For text, quote both strings. Replace “SALE” with “OPEN”, keep the same font style.
  • For style transfer, name the style, describe its traits and say to keep the composition: “Convert to a watercolour painting with soft edges and paper texture, keep the composition”.
  • To move a subject, change the background around it instead of asking it to move.

Editing With Two or More Images

You can combine pictures, for example putting a character from one image into the scene of another. There are two ways:

Method How Best for
Image Stitch Join the pictures side by side into one image, then feed that in. Set the output size with EmptySD3LatentImage. Multiple subjects; simpler and usually better
ReferenceLatent chaining Encode each picture separately and chain the ReferenceLatent nodes Two references; with many subjects, features can blend or a character can vanish

With Image Stitch, keep the subjects at sensible relative sizes and give the main reference the biggest share of the stitched image.

To mark an area to edit, you can paint a semi-transparent red mask over it. The ComfyUI Wiki notes that red boxes work better in Pro and Max than in [dev].

GGUF, Nunchaku and TeaCache for Smaller GPUs

The fp8 model is about 12 GB on its own, so 16 GB cards are comfortable and 12 GB cards are tight. For less VRAM or more speed:

  • GGUF: quantised files such as flux1-kontext-dev-Q4_K_M.gguf from bullerwins/FLUX.1-Kontext-dev-GGUF go in ComfyUI/models/unet/ and load with the Unet Loader (GGUF) node from city96/ComfyUI-GGUF. Some quality is lost, but VRAM drops a lot. Our ComfyUI-GGUF guide covers the install and which quant to pick.
  • Nunchaku: SVDQuant 4-bit builds, svdq-fp4_r32 for RTX 50 series cards and svdq-int4_r32 for others, in diffusion_models/. Install ComfyUI-nunchaku, run its wheel installer node once, then restart.
  • TeaCache: install ComfyUI-TeaCache for faster runs. The Wiki advises leaving its defaults alone.

Not sure what your card can handle? See how much VRAM ComfyUI needs.

Kontext vs Newer Edit Models

Model Strength Licence
FLUX.1 Kontext [dev] Mature, huge community, many LoRAs and guides Non-commercial
Qwen-Image 2.1 Edit Strong multi-image edits and text rendering See its guide
FLUX 3 Image Klein Newer BFL model, runs on 8 GB See its guide

If you are starting fresh in late 2026, compare the Qwen-Image edit options in our Qwen Image Edit versions guide. If your workflow or LoRAs are built around Kontext, it is still a solid choice.

Licence

Kontext [dev] is released under the FLUX.1 [dev] Non-Commercial License.

The model card is a little confusing: it says the model is under a non-commercial licence, but its feature list says outputs can be used for “personal, scientific, and commercial purposes, as described in” the licence. Read the licence text itself before using results in paid work.

The model card also recommends running an integrity check on outputs using the PixtralContentFilter from Black Forest Labs’ flux repository.

Troubleshooting

The Kontext template is missing

Update ComfyUI. Desktop and Cloud users only get new templates with stable releases, so they may need to wait or switch to the latest build.

FluxKontextImageScale or ReferenceLatent is red

Your ComfyUI is too old for these core nodes. Update, or check the console for a node that failed to import at startup.

The output looks exactly like the input

The ComfyUI Wiki notes that [dev] sometimes ignores a prompt. Rewrite it more directly (“change X to Y”), and check CFG is 1 and guidance around 2.5.

The whole image changed, not just the part I asked for

Add “keep everything else unchanged”, lower guidance slightly, and use “change” or “replace” instead of “transform”.

Out of memory

Use the fp8 T5 encoder, switch to a GGUF Q4 or Q5 model, or try Nunchaku. Close other GPU apps.

Only the last group runs in a multi-step workflow

Each group’s seed is fixed, so ComfyUI caches the earlier groups. Change the seed to rerun them.

The next edit uses the old image

Click refresh on the Load Image (from output) node to pick up the newest result.

FAQ

Where does flux1-dev-kontext_fp8_scaled.safetensors go?

In ComfyUI/models/diffusion_models/. Load it with the Load Diffusion Model node, not Load Checkpoint.

Can I use my existing FLUX text encoders and VAE?

Yes. Kontext uses the same clip_l, T5 and ae.safetensors as FLUX.1 [dev].

How much VRAM does Kontext dev need?

The fp8 model is about 12 GB, so 16 GB is comfortable. The ComfyUI Wiki says the full version runs on an RTX 4090, but more slowly. Use GGUF or Nunchaku on 8 to 12 GB cards.

Can I write prompts in other languages?

No. The docs say English only.

Is Kontext dev free for commercial use?

It is under the FLUX.1 [dev] Non-Commercial License. Check the licence text before commercial use.

What is the difference between Kontext dev, pro and max?

Dev is the open 12B model you run locally. Pro and Max are paid API models, available in ComfyUI as Partner Nodes.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Surprised woman editing a photo by typing on her laptop, KONTEXT card, hook edit with words FLUX Kontext