Image generationApache-2.0Python

FLUX (reference code)

Official inference code for Black Forest Labs’ FLUX models.

Stars
26K
Forks
1.9K
Open issues
221
Last commit
2025-07-31

Live from the GitHub API · updated 2026-10-15

What is FLUX (reference code)?

The official repository for FLUX provides minimal inference code, a CLI and demos for the open-weight FLUX models, plus pointers to the Kontext editing models. Most users run FLUX through ComfyUI, Forge or Diffusers, but this repo is the canonical reference.

Key features

  • Reference sampling code for FLUX [schnell] and [dev]
  • Command-line and Gradio/Streamlit demos
  • Links to model cards and licenses

System requirements

Platforms
Linux · Windows
GPU
NVIDIA
VRAM
16–24 GB for full precision; less with quantized variants elsewhere

How to install FLUX (reference code)

Summarized from the project’s README. Projects change quickly — check the GitHub page for the latest instructions.

Local install

  1. 1
    Clone and install in a virtual environment.
    git clone https://github.com/black-forest-labs/flux
    cd flux
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -e ".[all]"
  2. 2
    Follow the README to run the CLI or demo; weights download from Hugging Face (accept the model license there first).

Strengths

  • Canonical implementation
  • Small, readable codebase

Limitations

  • Bare-bones compared to ComfyUI
  • FLUX [dev] weights are non-commercial

FLUX (reference code) alternatives compared

SoftwareStarsLicensePlatformsVRAM
FLUX (reference code)

Official inference code for Black Forest Labs’ FLUX models.

26KApache-2.016–24 GB for full precision; less with quantized variants elsewhere
ComfyUI

Node-based interface for diffusion models — images, video and audio.

137.6KGPL-3.04 GB minimum for SD1.5; 12 GB+ recommended for FLUX and video models
Diffusers

Hugging Face’s Python library for diffusion models.

34.7KApache-2.0—
Stable Diffusion WebUI Forge

A faster, leaner fork of the A1111 WebUI with FLUX support.

13.1KAGPL-3.06 GB+ (FLUX NF4/GGUF variants run on 6–8 GB)
Stable Diffusion WebUI (AUTOMATIC1111)

The classic browser UI for Stable Diffusion with a massive extension ecosystem.

165.1KAGPL-3.04 GB minimum (with --medvram/--lowvram), 8 GB+ recommended
Fooocus

Midjourney-like simplicity for SDXL: type a prompt and press Generate.

53.4KGPL-3.04 GB minimum, 6 GB+ recommended

Related models

FAQ

Is FLUX (reference code) free?

Yes — FLUX (reference code) is open-source software released under the Apache-2.0 license. Check the license (and any model weight licenses) before commercial use.

Does FLUX (reference code) run on Windows, Mac and Linux?

FLUX (reference code) supports: Linux, Windows.

What hardware do I need for FLUX (reference code)?

NVIDIA. VRAM: 16–24 GB for full precision; less with quantized variants elsewhere

How do I install FLUX (reference code)?

1. Clone and install in a virtual environment. 2. Follow the README to run the CLI or demo; weights download from Hugging Face (accept the model license there first).

What are the best FLUX (reference code) alternatives?

Popular alternatives include ComfyUI, Diffusers, Stable Diffusion WebUI Forge, Stable Diffusion WebUI (AUTOMATIC1111). See the comparison table on this page.

Can I use FLUX (reference code) online without installing it?

If you just want results, AiLoft runs top image models such as GPT Image 2.5 and Nano Banana Pro in the browser — no GPU or setup required.

Skip the install — generate images in your browser

No GPU, drivers or Python needed. Use GPT Image 2.5 and Nano Banana Pro online and compare them side by side.