Model reference · open weights
FLUX.1-Kontext-dev is an open-weight image model from Black Forest Labs. FLUX.1-Kontext-dev (BF16) weighs 33.7 GB; the smallest configuration that runs it is RTX 5090 32 GB.
Summary of the black-forest-labs/FLUX.1-Kontext-dev model card, 2026-10-01
What it is
| Released by | Black Forest Labs |
|---|---|
| Released | 2025-05-28 |
| Parameters | 11.9B |
| VRAM | 33.7 GB for the weights |
What it runs on
| Card | One image | Memory |
|---|---|---|
| RTX 3060 12 GB … RTX 4090 24 GB | does not fit | |
| RTX 5090 32 GB | tight (encoders offloaded) | 31.0 GB |
| L40S 48 GB | tight | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| FLUX.1-Kontext-dev (above) ↗ | 11.9B | BF16 | 33.7 GB | RTX 5090 32 GB |
| FLUX.1-Kontext-dev-NVFP4 ↗ the transformer alone, to use with the text encoders and VAE |
— | NVFP4 | 9.2 GB | RTX 4060 Ti 16 GB |
| FLUX.1-Kontext-dev-GGUF ↗ packaged by unsloth 15 builds: Q2_K 4.0 GB … F16 23.8 GB the transformer alone, to use with the text encoders and VAE |
— | GGUF | 6.9 GB | RTX 4060 Ti 16 GB |
| FLUX.1-Kontext-dev ↗ packaged by unsloth |
11.9B | BF16 | 33.7 GB | RTX 5090 32 GB |
From the model card
GGUF files for black-forest-labs/FLUX.1-Kontext-dev. Original license still applies.
A huge thanks to @doublemathew and @hrsvrn for help with conversion. GGUFs were created with city96/ComfyUI-GGUF and llama.cpp.
To run, use ComfyUI-GGUF and place the model files in the ComfyUI/models/unet directory. For more instructions, go to the README.
FLUX.1 Kontext [dev] is a 12 billion parameter rectified flow transformer capable of editing images based on text instructions.
For more information, please read our blog post and our technical report. You can find information about the [pro] version in here.
FLUX.1 Kontext [dev] more efficient.We provide a reference implementation of FLUX.1 Kontext [dev], as well as sampling code, in a dedicated github repository.
Developers and creatives looking to build on top of FLUX.1 Kontext [dev] are encouraged to use this as a starting point.
FLUX.1 Kontext [dev] is also available in both ComfyUI and Diffusers.
# Install diffusers from the main branch until future stable release
pip install git+https://github.com/huggingface/diffusers.git
Image editing:
import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16)
pipe.to("cuda")
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(
image=input_image,
prompt="Add a hat to the cat",
guidance_scale=2.5
).images[0]
Flux Kontext comes with an integrity checker, which should be run after the image generation step. To run the safety checker, install the official repository from black-forest-labs/flux and add the following code:
import torch
import numpy as np
from flux.content_filters import PixtralContentFilter
integrity_checker = PixtralContentFilter(torch.device("cuda"))
image_ = np.array(image) / 255.0
image_ = 2 * image_ - 1
image_ = torch.from_numpy(image_).to("cuda", dtype=torch.float32).unsqueeze(0).permute(0, 3, 1, 2)
if integrity_checker.test_image(image_):
raise ValueError("Your image has been flagged. Choose another prompt/image or try again.")
For VRAM saving measures and speed ups check out the diffusers docs
Black Forest Labs is committed to the responsible development of generative AI technology. Prior to releasing FLUX.1 Kontext, we evaluated and mitigated a number of risks in our models and services, including the generation of unlawful content. We implemented a series of pre-release mitigations to help prevent misuse by third parties, with additional post-release mitigations to help address residual risks:
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
Running it yourself
Rent a machine by the hour. ComfyUI is installed on it. Open ComfyUI through the tunnel, then Templates → Flux Kontext Dev Image Edit: it loads ComfyUI's own build of this model, the files above.
# on your rented machine (the ssh line is on its page in the console)
# get REPO FILE FOLDER: one file into /workspace/models/FOLDER, where ComfyUI loads it from
get() { hf download "$1" "$2" --local-dir /workspace/hf-files && mkdir -p "/workspace/models/$3" && mv "/workspace/hf-files/$2" "/workspace/models/$3/$4"; }
# the files of the template “Flux Kontext Dev Image Edit” (16.4 GB)
get Comfy-Org/Lumina_Image_2.0_Repackaged split_files/vae/ae.safetensors vae
get comfyanonymous/flux_text_encoders clip_l.safetensors text_encoders
get comfyanonymous/flux_text_encoders t5xxl_fp8_e4m3fn_scaled.safetensors text_encoders
get Comfy-Org/flux1-kontext-dev_ComfyUI split_files/diffusion_models/flux1-dev-kontext_fp8_scaled.safetensors diffusion_models
start-comfyui
# on your computer, in a second terminal: ComfyUI in your browser at http://localhost:8188
# HOST and PORT are your machine's, from its page in the console
ssh -L 8188:localhost:8188 dev@HOST -p PORT