FLUX.1 Kontext is Black Forest Labs' latest AI image editing model that lets you edit photos with simple text commands. Here's your complete guide to downloading and setting it up.
Select the best installation approach for FLUX.1 Kontext based on your technical experience and requirements
FLUX.1 Kontext is a 12 billion parameter AI model that edits images using plain English instructions. Released in January 2025, it's available in multiple formats depending on your technical needs and use case.
The easiest way to start using FLUX.1 Kontext is through API services. No installation, no technical setup:
Pros: Instant access, no hardware requirements, always updated Cons: Requires internet, potential usage costs, less customization
# Install diffusers from main branch
pip install git+https://github.com/huggingface/diffusers.git
# Install additional requirements
pip install torch torchvision torchaudio
pip install transformers accelerate
Visit https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev
from diffusers import FluxKontextPipeline
import torch
# This will automatically download the model
pipe = FluxKontextPipeline.from_pretrained(
"black-forest-labs/FLUX.1-Kontext-dev",
torch_dtype=torch.bfloat16
)
from diffusers.utils import load_image
pipe.to("cuda")
input_image = load_image("your_image.png")
image = pipe(
image=input_image,
prompt="Add a hat to the cat",
guidance_scale=2.5
).images[0]
image.save("edited_image.png")
ComfyUI/models/diffusion_models/
For developers wanting the complete implementation:
git clone <https://github.com/black-forest-labs/flux>
cd flux
pip install -r requirements.txt
Install the official safety checker:
pip install git+https://github.com/black-forest-labs/flux.git
For lower VRAM systems:
# Enable CPU offload
pipe.enable_model_cpu_offload()
# Use lower precision
pipe = FluxKontextPipeline.from_pretrained(
"black-forest-labs/FLUX.1-Kontext-dev",
torch_dtype=torch.float16 # instead of bfloat16
)
huggingface-cli login
torch_dtype=torch.float16
to reduce memory usagelow_cpu_mem_usage=True
during loadingpython -c "import torch; print(torch.cuda.is_available())"
The model is now ready for use. Start with simple edits like "add sunglasses" or "change the background color" to get familiar with the prompt format and capabilities.