Black Forest Labs ships a Swiss Army knife for local image generation
Minimal inference code that wraps an expanding zoo of open-weight diffusion models, with a licensing tracker that knows if you monetize.

What it does This repo is the official inference harness for Black Forest Labs’ FLUX.1 family. It lets you run text-to-image, inpainting, outpainting, depth-aware and canny-edge-conditioned generation, image variation, and in-context editing locally. The code is deliberately minimal—clone, install, point at HuggingFace weights, and generate.
The interesting bit
Most model vendors hide their commercial licensing behind lawyers; BFL embeds a usage tracker directly in the CLI. Pass --track_usage and the tool phones home to meter your monthly consumption, which is how they price commercial licenses. It is either refreshingly honest or quietly dystopian, depending on your coffee intake.
Key highlights
- Supports ten open-weight variants, from the Apache-2.0
schnellspeed model to the newerKontextin-context editor andKreatext-to-image model - Optional TensorRT path via NVIDIA’s enroot containers for faster inference
- Autoencoder weights are Apache-2.0 even when the diffusion weights are non-commercial
- CLI-first:
python -m flux kontext --prompt "replace the logo..."is the intended interface - API docs and hosted Pro-tier models live separately at docs.bfl.ai
Caveats
- The “dev” models carry a non-commercial license; only
schnelland the autoencoder are truly open - TensorRT setup requires swapping your entire PyTorch environment for an NVIDIA container, not a quick pip install
- The README calls the code “minimal,” so expect to bring your own orchestration, UI, or batching logic
Verdict Worth cloning if you want a clean, vendor-supported baseline for FLUX.1 experimentation or need the built-in commercial metering. Skip it if you are looking for a batteries-included Stable Diffusion WebUI replacement; this is scaffolding, not a house.