FLUX.2 is the official inference repository provided by Black Forest Labs, containing minimal code for running FLUX.2 open-weight models for image generation and editing.
Purpose This repository is aimed at developers and researchers who want to directly call FLUX.2 models for text-to-image generation, image editing, and multi-reference image generation. All models support text-to-image, single-reference image editing, and multi-reference image editing.
Main models and capabilities FLUX.2 [klein] is the fastest model series, focused on sub-second generation and editing, targeting real-time applications, creative iteration, and consumer-grade hardware deployment. The Klein 4B model requires approximately 8GB of VRAM and can run on RTX 3090/4070 and above; the 4B model uses the Apache 2.0 license, supporting open source, fine-tuning, and customization; the 9B model uses the FLUX.2-dev non-commercial license. The Klein series is divided into Distilled (4 steps) and Base (50 steps) versions: Distilled is suitable for production applications and real-time generation, while Base is suitable for fine-tuning, LoRA training, and maximum flexibility. FLUX.2 [dev] is a 32B-parameter flow-matching Transformer model supporting text-to-image and single/multi-reference image editing, released under the FLUX.2-dev non-commercial license. A full run requires H100-class VRAM; in collaboration with Hugging Face, official quantized versions are provided that can run on consumer-grade hardware (such as an RTX 4090 with a remote text encoder).
Usage This repository provides local installation and command-line interaction. The inference code was tested on GB200, CUDA 12.9, and Python 3.12. Before running, weights can be downloaded from the specified location and environment variables set; if not set, weights will be downloaded automatically. Text-to-image generation and single-image or multi-image editing can be performed through an interactive session. FLUX.2 [dev] supports prompt upsampling, either using a local Mistral-Small-3.2-24B-Instruct-2506 model or calling any model on OpenRouter via API. The repository also offers the option to embed invisible watermarks in generated images via the invisible watermark library, and recommends adding markers such as C2PA to output metadata.
Applicable scenarios Suitable for real-time image generation and editing applications, creative iteration, consumer-grade GPU deployment, model fine-tuning and LoRA training, as well as research and development work requiring multireference image editing.
Limitations The full FLUX.2 [dev] model has high VRAM requirements and needs an H100-equivalent GPU; consumer-grade hardware requires quantized versions. The 4B model is under the Apache 2.0 license, while the 9B model and FLUX.2 [dev] are under non-commercial licenses, so license terms should be noted for commercial use. The repository does not provide information such as specific pricing, platform services, or performance guarantees.