📈 GH Trending Explorer 🎲 Surprise me

← all repos

black-forest-labs / flux-3-image-klein

git clone https://github.com/black-forest-labs/flux-3-image-klein.git

FLUX 3 Image Klein: reference inference code

—
stars, 24h
+117
stars, 7 days · #436
+117
stars, 30 days · #1,971
117
★ total · +117% this week
6
forks · 1 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguagePython
LicenseApache-2.0
Created2026-10-15 (5d ago)
Last push3d ago
Watchers0
OwnerOrganization

Links

README excerpt
# FLUX 3 Image Klein
 Model page •
 Weights •
 Demo 
This repository contains the reference inference code for FLUX 3 Image Klein, the 5.6B open weights image model
from Black Forest Labs: text-to-image, editing with up to 10 reference images, and layout control
with bounding boxes, through one model. It ships with a prompt upsampler; do not use the model
without it.
## Performance
Leads in quality and speed among open weights models: the Pareto frontier of Elo rating against latency, for text-to-image and for image editing.
 Elo from our internal evaluations; median API latency for a 1 MP image. 
## Model overview
| Name | Steps | Guidance | Resolution | Text-to-image | Editing (up to 10 references) | Bounding boxes | License |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| FLUX 3 Image Klein | 16 | none | up to 4K | ✅ | ✅ | ✅ | FLUX Kommunity License |
| FLUX 3 Image Klein Base | 50 | CFG 4 | up to 4K | ✅ | ✅ | ✅ | FLUX Kommunity License |
| FLUX 3 Image Klein Prompt Upsampler | | | | | | | Apache 2.0 |
## Which model should I use?
| Need | Recommended |
|------|-------------|
| Generation and editing, self-hosting | FLUX 3 Image Klein (distilled): the same model in 16 steps without CFG, about 6x faster |
| Fine-tuning, LoRA training, research | FLUX 3 Image Klein Base |
| An 8 GB GPU (RTX 3070 class) | the int8 files in ComfyUI |
> [!IMPORTANT]
> Do not use either model without the prompt upsampler. The model is trained on the captions it
> writes; a prompt sent as typed gives noticeably weaker results. It is on by default in the CLI, the demo and the
> Python API.
### Text-to-image examples
### Editing examples
### Layout examples
### Typography
### Base vs distilled
Same prompt, same seed: distilled (16 steps) left, base (50 steps, CFG) right. On one H200 at 1 MP: about 3 s against 12 s per image.
## Local installation
To run FLUX 3 Image Klein in BF16 and FP8:
 [code] 
To run FLUX 3 Image Klein in BF16, FP8 and NVFP4 (NVFP4 needs a Blackwell GPU):
 [code] 
The installation was tested on B200; see Memory for other GPUs.
### Weights
The fast model with its prompt upsampler, 52 GB:
 [code] 
Everything, 107 GB:
 [code] 
`WEIGHTS_DIR` points at another root (default `./weights`). The quantized DiTs live under `variants/fp8r` and
`variants/nvfp4` in each repository; the text encoder and autoencoder ship with both. `weights/pup` is the
prompt upsampler, which the model needs.
## Run the CLI
> [!IMPORTANT]
> The commands below send the prompt through the upsampler before the model. Do not pass
> `--no-pup` unless the prompt already is an upsampler caption (Smaller GPUs).
### Text to image
 [code] 
Each generated image comes with a `.json` containing the prompt, size, number of steps, guidance value and seed; examples/README.md has the command behind every
image in this README.
### Edit an image
 [code] 
Up to 10 references; the first one sets the output size:
 [code] 
### Place elements with bounding boxes
 [code] 
Format in Bou