Reproduce “Demystifying Flux Architecture” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Or Greenberg

The paper reverse-engineers the internal architecture of FLUX.1, a leading text-to-image diffusion model, by analyzing its publicly available source code. This effort details the model's use of a 16-channel latent space, Rectified Flow training, dual text encoders (CLIP and T5), and a fully Transformer-based denoising backbone, revealing the design choices that contribute to its state-of-the-art generative performance.

Key insights

  • FLUX.1 operates in a 16-channel latent space and is trained using a Rectified Flow paradigm for deterministic velocity prediction.
  • The model employs a dual-encoder setup, utilizing both CLIP (pooled embeddings) and T5 (dense embeddings) for robust text conditioning.
  • Its core `v_theta` network is a fully Transformer-based architecture, combining Double-Stream blocks (separate weights, sequential attention-MLP) and Single-Stream blocks (shared weights, parallel attention-MLP), enhanced by Adaptive Layer Normalization (AdaLN) and Rotary Positional Embeddings (RoPE).

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.