Generating an image with a flow-matching model usually takes many small steps. At each step the network predicts which way to move from noise toward the image. A flow map learns to jump between two points on that path, sometimes going all the way from noise to an image in one step. I covered how that works in my earlier post on one-step generative models. This post is about making them faster to train.
Representation alignment (REPA) speeds up diffusion training by having early layers predict features from DINOv2, a pretrained image encoder. My goal was the same effect without the encoder, using features the flow map learns for itself. A flow map has a natural pair of views for self-supervision. One long jump should land where two shorter jumps land. Partway through, the image is still noisy, but more of its content is visible. The model already uses that relationship for self-distillation when it learns where to land.
My idea was to use the same pair to learn features. Given the noisier view, an early layer tries to predict a deeper layer's features for the cleaner view. I call this internal feature consistency (iFeCo). The cleaner view comes from a pass that training already runs, so iFeCo needs no pretrained encoder and no extra forward pass.
I tried this on three families of flow maps: Shortcut, Lagrangian self-distillation (LSD), and MeanFlow. It cuts training time on Shortcut and LSD. A comparison with LayerSync, where the deeper layer sees the same image, then made me question whether the cleaner view is what matters.
What I still don't understand is why asking an early layer to predict a later one helps the model generate better images. I'm now working on denoising embedding models, which I find a more elegant way to learn representations and generate images in the same model.
TL;DR: With iFeCo, the model learns to predict its own features on a cleaner view of the same image. On Shortcut and LSD, it reaches the vanilla model's final one-step FID in about a third to half as many training steps. Each step takes under 2% longer.
One-step samples




The representation alignment target
In Shortcut and LSD, the teacher is an exponential moving average (EMA) of the model's weights. Shortcut runs that teacher twice to take two half steps. I read its features at the start of the second step, when the image is already cleaner. LSD runs its teacher where the student's jump lands, so I take the features there.
MeanFlow estimates what the features would be a little farther along the path. Its training step already computes a Jacobian-vector product, which measures how fast the features change along that path. I use that rate for a first-order estimate and stop the gradient through it.1
A nearly free feature consistency loss
The loss itself is the same for all three models. The student still learns where its jump should land. A small predictor attached to an early block also learns to match the deeper features from the cleaner view.
One training step. The teacher's forward pass builds the flow-map target and, in the same pass, supplies the deep features that the student's early features learn to predict.
The predictor is a two-layer MLP. For each token, the loss is the cosine distance between its prediction and the teacher's features. The predictor is only used during training. Across all three families I used a loss weight of 0.25, a student block at a quarter of the depth (block 2 of 12 at B/2), and a teacher block at 70% (block 7 of 12).
Experiments and results
I trained Shortcut, LSD, and MeanFlow with and without iFeCo on ImageNet-1k at 256×256 resolution, using a batch size of 256.2 For the main comparison, I measured FID on 50,000 images generated in one sampling step each.
To measure training speed, I took the final one-step FID from each vanilla run and counted how many training steps iFeCo needed to reach it. On Shortcut and LSD, it took about a third to half as many steps, with under 2% extra time per step.3 The dashed curves include the feature loss on training examples without a jump. This costs no extra forward pass and helps most early on, especially on MeanFlow. On LSD the two settings finish about even.
| Frozen encoder | Encoder-free | ||||
|---|---|---|---|---|---|
| Model steps | Vanilla | REPA | LayerSync | iFeCo | All rows |
| Shortcut | |||||
| B/2 1.2M | 36.95 | 36.11 | 31.92 | 28.03 | 27.56 |
| XL/2 1.2M | 18.55 | · | · | 12.71 | · |
| LSD | |||||
| B/2 1.2M | 12.42 | 11.44 | · | 10.56 | 10.82 1.1M |
| XL/2 100k | 21.87 | · | · | 17.47 | · |
| MeanFlow | |||||
| B/2 400k | 9.79 | 7.36 | · | 8.03 | 7.80 |
| B/2 1.0M | 6.40 | 5.04 | · | · | 5.62 |
| XL/2 700k | 3.78 | · | · | 3.60 | · |
one-step FID-50k on ImageNet 256×256 (lower is better), at the latest training step of each model; bold is the best in each row. All rows: iFeCo with the loss also on the rows without a jump. LSD XL/2 and MeanFlow XL/2 are still training; at MeanFlow XL/2 iFeCo crosses the vanilla model (behind at 500k and 600k), so the gain there is not reliable.
Representation quality
FID measures the quality of the generated images. To see what changed inside the model, I tested how well a linear classifier could predict the ImageNet class from the features of each frozen block.
REPA's frozen DINOv2 target still does better on MeanFlow and when sampling takes several steps.4 Pretrained encoders give strong features, and some work leans on them even harder, generating directly in the encoder's feature space (representation autoencoders) or sampling the features before the image (representation generation). I wanted to see how far a flow map could get without one.
Cleaner-view ablation
I came across LayerSync after I'd started working on iFeCo. Like iFeCo, it trains an early block to predict a deeper one, but both blocks see exactly the same input. That made it a good test of how much the cleaner view mattered.5
| Model steps | Vanilla | LayerSync | iFeCo |
|---|---|---|---|
| Shortcut B/2 1.2M | 36.95 | 31.92 | 28.03 |
| Shortcut XL/2 700k | 20.87 | 13.45 | 14.52 |
| LSD B/2 900k | 13.80 | 10.37 | 11.02 |
| LSD XL/2 300k | 11.17 | 8.30 | 9.03 |
one-step FID-50k on ImageNet 256×256, latest step both models share; bold is the best in each row.
LayerSync improves one-step FID over vanilla in every row above. iFeCo does better on Shortcut B/2 and at four sampling steps on LSD and MeanFlow. On MeanFlow, I also tried giving the teacher the student's input. It worked just as well as the cleaner view.6
I started this project to see whether a flow map could learn useful features from its own training signal. That worked. What I hadn't expected was how well LayerSync would do with both layers seeing the same image. I don't have the compute to run the comparisons I'd want to do next, so I'm sharing what I have here.
In MeanFlow the teacher is the model itself with a stop-gradient, not an EMA copy, because only the model runs the Jacobian-vector product pass. ↩
Each family uses its reference optimizer, EMA decay and guidance settings, and trains for 1.2M steps. Shortcut's published budget is 800k steps; I continued it to 1.2M to see whether the vanilla model catches up. FID uses the ADM reference statistics and the EMA weights. ↩
Measured on one H100 at each family's training batch: +1.1% on MeanFlow, +1.7% on Shortcut and +1.1% on LSD at B/2, and at most +0.5% at XL/2. The predictor is under 1% of the model's parameters and is dropped after training. ↩
My REPA reference regresses DINOv2-B/14 features of the clean image at block 2 with REPA's cosine loss and weight 0.5. It is not tuned for flow maps and does not reproduce the published REPA numbers. ↩
Following the LayerSync paper, my reference aligns block 3 with a detached block 6 at B/2 (blocks 7 and 15 at XL/2), with a negative cosine loss on every row and weight 0.3 (0.2 at XL/2), counting blocks from 0. ↩
I trained each model once, so I'd read little into gaps under 1 FID. ↩