↑↓ move Enter open ⌘K find from any page 256 of 256 tabs
Loading the recording…

What FLUX.1-schnell is

FLUX.1 is Black Forest Labs' family of text-to-image models, a rectified-flow transformer in the line of Stable Diffusion 3: images live in a 16-channel autoencoder latent, the transformer learns the velocity of a straight path from image to noise, and text and image tokens meet in joint attention. FLUX.1 extends SD 3's MMDiT in two ways, described in the FLUX.1 Kontext report: after 19 double-stream blocks, which keep separate weights per modality, come 38 single-stream blocks, which treat text and image as one sequence; and positions enter through rotary embeddings rather than added vectors. schnell is the version distilled to sample in one to four steps without guidance.

The transformer has 12 B parameters, 24 GB in bf16, too large to run whole on the Mac that records these tabs. So the page records only its first double-stream and first single-stream block, fetched by HTTP range requests, on a real photo's latent noised to , the input schnell gets at strength 0.5 in image-to-image. Nothing is generated: the blocks' attention is real, but no velocity is recorded.

Text and image tokens

The Text conditioning card shows FLUX using its two encoders differently from SD 3.5. T5-XXL's 256 token states, 4096 wide, are the whole text stream. CLIP-L contributes only its pooled vector, 768 numbers, which joins the timestep in the conditioning vector ; no CLIP tokens enter the transformer.

On the image side, the 16-channel VAE latent is shifted by 0.1159 and scaled by 0.3611, then cut into 2 × 2 patches, each packed into numbers and projected to 3072 by one Linear. Nothing is added for position. The text comes first, so the 256 × 256 photo's 32 × 32 latent gives a sequence of 256 text tokens followed by 16 × 16 = 256 image tokens.

Rotary positions in two dimensions

Rotary position embedding (RoPE, Su et al.) encodes position by rotating queries and keys rather than adding to the tokens. A head's dimensions are taken in pairs, and pair of a token at position is turned by the angle :

Rotating both at position and at position leaves their dot product depending only on the offset . FLUX factorises this over three axes: each 128-dimension head is 64 pairs, of which 8 turn with an index that is always 0 for a single image, 28 with the token's row and 28 with its column, each axis with frequencies over its own width (16, 56 and 56 dimensions). Text tokens sit at (0, 0, 0) and never turn, so between two image tokens depends on how many rows and columns apart they are.

Double-stream blocks

A double-stream block is SD 3's MMDiT block: per stream, adaLN-Zero modulation from , Q, K and V projections, an output projection and an MLP; between them, one softmax over the concatenated text and image tokens. Before the dot product each head's queries and keys are RMS-normalised and scaled by a learned (QK-norm), then rotated by RoPE.

The page's columns follow the block: adaLN(x) per stream, Q · K · V, Joint attention (one softmax over text + image), Output, and Where it looks, which shows how much of the selected token's weight lands on the 256 image tokens, drawn as dots on the photo, and how much on the text. Double block 1 reads its real input: the packed noisy latent, the T5 tokens through the text Linear, and .

Single-stream blocks

After block 19 the two streams are concatenated and handled as one sequence with one set of weights. A single-stream block computes one modulated input and runs attention and an MLP on it side by side, as parallel layers, then concatenates their outputs and maps them back with one Linear:

Fusing the two into larger matrix products uses the GPU better; Dehghani et al. used the same parallel layout to train ViT-22B. The Attention ‖ MLP column shows the heads before the shared Linear. In the full model single block 1 reads double block 19's output; the 18 blocks between are not downloaded, so here it reads double block 1's output instead, with the model's own weights and arithmetic.

Four steps without guidance

FLUX is trained like SD 3.5: a latent on the line and a velocity target , sampled with Euler steps . schnell takes four of them, at , one model pass each and no classifier-free guidance. The Flow-matching path card shows the line itself: the photo's latent mixed with noise at those four values and decoded; the outlined is the input both recorded blocks read.

Four unguided steps come from latent adversarial diffusion distillation (LADD, Sauer et al.), as the model card says. A discriminator built on a pretrained diffusion model's own features judges the student's few-step samples, and the student learns to make them indistinguishable from real images; Sauer et al. used it to make SD3-Turbo from SD 3. The Turbo tab shows the earlier pixel-space version of the idea on SDXL.

Papers

  1. FLUX.1 Kontext: Flow Matching for In-Context Image Generation and Editing in Latent Space Black Forest Labs et al. · arXiv 2025 Black Forest Labs' report; its section on FLUX.1 describes the base model: the 16-channel autoencoder, double- and single-stream blocks, fused feed-forward and factorised 3D RoPE.
  2. Scaling Rectified Flow Transformers for High-Resolution Image Synthesis Patrick Esser et al. · ICML 2024 Stable Diffusion 3's MMDiT and rectified-flow training, which FLUX's double-stream blocks keep.
  3. Fast High-Resolution Image Synthesis with Latent Adversarial Diffusion Distillation Axel Sauer et al. · arXiv 2024 LADD, the distillation that lets schnell sample in four unguided steps.
  4. RoFormer: Enhanced Transformer with Rotary Position Embedding Jianlin Su et al. · arXiv 2021 Rotary position embedding, which FLUX applies per axis to rows and columns.
  5. Scaling Vision Transformers to 22 Billion Parameters Mostafa Dehghani et al. · ICML 2023 QK normalisation and parallel attention and MLP layers, both in FLUX's blocks.
  6. Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow Xingchao Liu, Chengyue Gong, Qiang Liu · ICLR 2023 Rectified flow: straight paths between noise and data, the objective FLUX is trained with.

See also