Manuscript Offprint

arXiv:2609.35292

Scaffold Then Internalize: Representation Injection for Diffusion Transformers

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

ABSTRACT

Recent representation alignment (REPA) methods accelerate diffusion transformer training by aligning projections of the transformer's hidden states with representations from pretrained visual encoders. In this work, we explore a reverse and complementary direction to REPA: rather than projecting diffusion representations into the encoder's space, we inject encoder representations into the diffusion transformer, allowing them to actively participate in the denoising process. To this end, we introduce REPresentation Injection (REPI), a training framework based on a scaffold-to-internalization strategy, in which projected encoder representations initially serve as a temporary scaffold and are then progressively internalized by the diffusion transformer. REPI outperforms REPA across a wide range of backbones and is highly complementary to it: combining the two yields substantial gains over either alone. Notably, with only 160K training steps, REPI + REPA matches vanilla SiT trained for 7M steps, a speedup of over 43.5×. Code will be available at https://jeneveuxpas.github.io/REPI.

Figure

Figure

Figure 1: REPI accelerates diffusion transformer training across model scales. Compared with REPA, REPI consistently achieves lower FID on SiT-B, SiT-L, and SiT-XL, and combining the two yields further gains. Notably, on SiT-XL, REPI + REPA at 200K training steps already outperforms REPA trained for 400K steps.

1 INTRODUCTION

Diffusion Transformers (DiTs) (Peebles & Xie, 2023; Ma et al., 2024; Esser et al., 2024) exhibit strong scalability for visual generation, but achieving high sample quality still requires extensive training. Representation Alignment (REPA) (Yu et al., 2025) attributes this inefficiency to the difficulty DiTs face in learning semantically structured visual representations, and addresses it by distilling knowledge from a pretrained visual encoder: the diffusion transformer's hidden states are projected and aligned with the encoder's representations via an auxiliary objective (Singh et al., 2026; Wang et al., 2025c). In this paper, we explore a reverse and complementary direction: rather than

∗^{*}Corresponding author.

projecting diffusion representations into the encoder’s space, can encoder representations instead be projected into the diffusion transformer and actively participate in denoising during training?

We begin with a naive design that directly reverses REPA: the encoder output is projected through a lightweight projection layer, and the resulting projection entirely replaces the hidden state at an intermediate layer of the diffusion transformer. However, since this hidden state is the output of a transformer block (see Figure 8 for an illustration), overwriting it discards all prior computation on the noisy input. As a result, subsequent blocks can no longer condition their predictions on the noisy input, causing training to collapse and generated samples to remain pure noise.

This observation motivates moving the injection point inside the transformer block: rather than overwriting the block output, we replace an intermediate quantity within the block, such as the attention output or the key/value (KV) representations. This preserves the flow of information from the noisy input to the block output. For instance, replacing the KV representations still allows the preceding computation to reach subsequent blocks through the query (Q) representations and the residual shortcut. To investigate the potential of this injection strategy, we first consider an idealized oracle setting with access to encoder representations at inference time. Within only 30K training steps, this oracle injection method achieves a lower FID than vanilla SiT (Ma et al., 2024) trained for 7M steps, indicating that encoder representations can provide a useful signal for denoising.

However, this oracle setting relies on encoder representations extracted from clean images at inference time, which are unavailable in standard generation. To close this gap, we introduce REPresentation Injection (REPI), which adopts a scaffold-to-internalization training strategy that eliminates the need for encoder representations at inference time. REPI treats the injected encoder representations as a scaffold: during early training, the internal representations at one layer of the diffusion transformer are replaced by projections of the encoder representations; the scaffold is then removed, and the diffusion transformer resumes computing its own representations at that layer. To facilitate this internalization, we introduce an internalization objective that encourages the self-computed representations to match the injected encoder representations. This process allows the model to first learn to exploit the semantically structured representations provided by the scaffold, and then to learn to reproduce compatible representations on its own. After training, the visual encoder is discarded, and the resulting model is architecturally identical to the original diffusion transformer at inference.

Complementarity with REPA. REPI is highly complementary to REPA, as the two methods leverage encoder representations through different mechanisms: REPA encourages the diffusion transformer to learn the structure of encoder representations through an auxiliary alignment loss, while REPI injects and internalizes these representations into the denoising computation, adapting their structure to the denoising task. Empirically, on SiT-XL (Ma et al., 2024), REPI alone achieves an FID of 14.51 at 100K training steps, compared with 19.40 for REPA, and combining both methods further reduces FID to 11.78, substantially outperforming either method alone.

We conduct extensive experiments on class-conditional ImageNet (Deng et al., 2009) generation across multiple model scales to demonstrate the effectiveness of our method. Our approach achieves superior generation quality and training efficiency compared with several state-of-the-art baselines. Notably, on SiT-XL, REPI combined with REPA achieves an FID of 8.22 within only 160K training steps, matching the FID of 8.30 obtained by vanilla SiT after 7M steps, a training speedup of over 43.5×. Furthermore, our method at 200K steps already outperforms REPA trained for 400K steps.

Our main contributions are summarized as follows:

• We explore a direction that is reverse and complementary to REPA: rather than projecting diffusion representations into the encoder’s space, we inject encoder representations into the diffusion transformer, allowing them to actively participate in the denoising process.

• We introduce REPI, a training framework that internalizes semantically structured representations from pretrained visual encoders into the diffusion transformer via a scaffold-to-internalization strategy.

• We show that REPI alone outperforms REPA, while the two remain highly complementary. Combined with REPA, our model trained for only 160K steps surpasses vanilla SiT trained for 7M steps, a speedup of over 43.5×.

References (69)