Scaffold Then Internalize: Representation Injection for Diffusion Transformers

Han Fu, Jiacheng Chen, Baoquan Zhao, Weidong Chen, Wei Liu, Qing Li, Xudong MaoarXiv 2026

TL;DR

Researchers have introduced REPI (REPresentation Injection), a training framework that slashes Diffusion Transformer (DiT) training time by up to 43.5×. By using pretrained visual encoders as a temporary "scaffold" during training and then "internalizing" that knowledge, REPI allows models to achieve state-of-the-art sample quality with a fraction of the compute.

What Problem Does This Paper Address?

Diffusion Transformers (DiTs) are the backbone of modern high-quality image generation, but they are notoriously expensive to train, often requiring millions of iterations to learn semantically coherent structures.

A recent approach called REPA (REpresentation Alignment) tried to speed this up by forcing the transformer’s hidden states to look like the features of a pretrained vision encoder (like DINOv2). However, REPA only provides a "supervisory" signal—the transformer still has to figure out how to build those features from scratch. The authors of REPI asked a clever follow-up: instead of just telling the transformer what its features should look like, why not let it "borrow" the encoder's features directly during training?

Methods

REPI introduces a two-stage scaffold-to-internalization strategy:

  1. The Scaffold Phase: During early training, the model takes a clean version of the image and passes it through a frozen visual encoder. The resulting features are projected and injected directly into a specific layer of the Diffusion Transformer, replacing its native Key (K) and Value (V) representations in the attention block. This acts as a "scaffold," giving the model a perfect semantic map to work with while it learns to denoise.
  2. The Internalization Phase: Once the model has learned to use these high-quality features, the scaffold is removed. To ensure the model doesn't collapse, an internalization objective (a simple MSE loss) encourages the transformer's native K and V layers to mimic the projected encoder features it was previously "borrowing."
Overview of the REPI framework showing the Scaffold and Internalization phases.

Crucially, at inference time, the visual encoder is discarded entirely. The final model is architecturally identical to a standard DiT, meaning there is zero overhead for generating images.

Datasets

The authors evaluated REPI across several standard benchmarks:

  • ImageNet 256×256 & 512×512: The primary benchmark for class-conditional image generation.
  • MS-COCO: Used to test text-to-image generation performance.
  • Visual Encoders: They tested ten different pretrained encoders, including DINOv2, CLIP, MAE, and MoCoV3, to prove the method's generality.

Key Insights and Ideas

  • Preserving the Noisy Stream: A "naive" injection—simply overwriting a whole transformer block's output—fails catastrophically because it severs the connection to the noisy input. By injecting only into the Key and Value components of the attention mechanism, the model maintains its "Native Query" (Q) path, allowing it to remain grounded in the actual noisy data it needs to denoise.
  • Scaffolding as Initialization: Even a very short scaffold period (e.g., 20k steps) provides a massive head start. It essentially "teaches" the other layers of the network how to process high-quality semantic information before they have to generate that information themselves.
  • Complementarity: REPI (encoder-to-diffusion injection) and REPA (diffusion-to-encoder alignment) are not rivals; they are teammates. Combining them leads to significantly better results than using either alone.
FID curves showing REPI consistently outperforming REPA across different model scales.

Key Results

The quantitative gains are staggering:

  • 43.5× Speedup: On the SiT-XL model, REPI + REPA reached the same quality (FID) in just 160K steps that a vanilla model took 7M steps to achieve.
  • State-of-the-Art Efficiency: At 100K steps, REPI achieved an FID of 14.51, compared to 19.40 for REPA and 39.4 for the vanilla baseline.
  • Robustness: As shown in Figure 5, the method is highly robust to the choice of injection layer and the duration of the scaffold phase.
Qualitative comparison showing REPI producing more coherent semantic structures than iREPA.

Limitations and Future Work

While highly effective, the paper notes a few areas for further exploration:

  • Domain Expansion: The current work focuses on image generation. The authors suggest that extending REPI to video generation is a promising next step, where temporal consistency is even harder to learn.
  • Optimal Injection: While Layer 8 worked best for their SiT-XL experiments, the "sweet spot" for injection might vary depending on the specific architecture or task.
  • Clean Image Requirement: The scaffold phase requires access to clean images during training (to pass through the encoder), which is standard for diffusion training but worth noting for specialized setups.

Summary updated

BibTeX
@misc{fu2026scaffold,
  author = {Han Fu and Jiacheng Chen and Baoquan Zhao and Weidong Chen and Wei Liu and Qing Li and Xudong Mao},
  title = {{Scaffold Then Internalize: Representation Injection for Diffusion Transformers}},
  year = {2026},
  eprint = {2609.35292},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.35292},
}
Figure