Manuscript Offprint

arXiv:2609.39692

GFD-OPD: Guidance-Folded On-Policy Distillation of Diffusion Models Across Scales

Zhenxing Zhang, Jiayan Teng, Wenxu Wu, Zhuoyi Yang, Jiazheng Xu, Wendi Zheng, Jie Tang, Dan Guo, Meng Wang

ABSTRACT

On-policy distillation (OPD) has demonstrated two important capabilities in language models: compressing large teachers into smaller students and merging expert models into a single model. Existing diffusion OPD, however, mostly focus on the latter, with teachers and students sharing the same backbone and scale. We investigate large-to-small diffusion opd from large teachers to a small student and find that the standard recipe fails. To find the underlying cause, we propose Fixed-State KL, an effective and fair way to measure the distribution gap between student and teacher during OPD training for diffusion models. We are the first to clarify why large-to-small OPD is challenging for diffusion models: a smaller student struggles to perfectly match the distribution of a larger teacher, while classifier-free guidance can accumulate and amplify the distributional discrepancies between the student's conditional and unconditional branches and those of the teacher. To solve this problem, we propose GFD-OPD, a simple yet effective method that reduces the student-teacher gap while avoiding the error amplification of the CFG composition. Across numerous experiments, GFD outperforms previous baselines in both training efficiency and final performance, achieving state-of-the-art results on all benchmarks. The code and checkpoints for this study are available at here.

(a)

Figure

GFD L→M_{L \rightarrow M} (ours) DiffusionOPD L→M_{L \rightarrow M} DiffusionOPD M→M_{M \rightarrow M} Student RL Large Teacher Medium Teacher Base (t=0)

(b)

SD3.5-M (base) PDM L→M_{L \rightarrow M} PDM L→M_{L \rightarrow M} DiffusionOPD L→M_{L \rightarrow M} DiffusionOPD L→M_{L \rightarrow M} GFD L→M_{L \rightarrow M} (ours)

Figure 1: GFD-OPD distills SD3.5-Large into SD3.5-Medium. (a) Score versus training compute (GPU hours) on OCR, PickScore, and GenEval: GFD-OPD overtakes all baselines within 10 GPU-hours. (b) GFD-OPD ranks first on all seven evaluation dimensions, covering both task rewards and image quality.

∗^{*}Equal contribution.

†^{\dagger}Work done during internship at Zhipu AI.

∗^{*}Technical lead.

§ Corresponding author: eric.mengwang@gmail.com

1 INTRODUCTION

On-policy distillation (OPD) has recently emerged as a powerful post-training recipe for large language models. Like reinforcement learning (RL), OPD trains the student on trajectories sampled from its own policy and therefore optimizes the student's own distribution; unlike RL, which has to work with sparse and delayed rewards, OPD lets a teacher provide dense supervision at every step of the student-generated trajectory. This fine-grained feedback largely removes the credit-assignment difficulty of RL, so OPD enjoys a more stable optimization and a much better sample efficiency at a comparable final quality.

In language models OPD is primarily applied in two paradigms. The first is strong-to-weak distillation, where the capability of a large teacher is transferred to a small student that is cheap to deploy (Lu & Lab, 2025). The second is capability merging, where several specialist models derived from the same base model are merged into a single student without conflicts (Zeng et al., 2026). Diffusion models have begun to adopt OPD as a post-training method as well (Li et al., 2026b; Fang et al., 2026), but the existing diffusion work mostly focus on the second paradigm. The first paradigm, distilling a large diffusion model into a small one, remains unexplored. It is also important: a compact model that inherits capabilities of a larger teacher can achieve near-teacher quality at inference while retaining a low cost close to that of the smaller model.

Our goal is to investigate effective approaches for distilling the capabilities of large diffusion models into smaller ones. Although DiffusionOPD performs effectively when merging models with the same architecture, we find directly extending it to large-to-small distillation leads to severe degradation. As shown in Fig. 4, generated images exhibit artifacts, such as corrupted regions, loss of fine-grained textures and so on.

To understand the source of this degradation, we propose Fixed-State KL for measuring the distributional discrepancy between the student and teacher. Specifically, we compute KL divergence on states sampled from normal teacher trajectories and noise-corrupted trajectories constructed from real images, providing a fair and well-behaved evaluation distribution for all methods.

Under this evaluation metric, we find that large-to-small DiffusionOPD produces a substantially larger distributional discrepancy between the student and teacher than its same-architecture counterpart. Furthermore, we quantitatively characterize models' final sampling result through spectral energy analysis of the final latent representations and high-pass texture analysis of the decoded images, which quantify the deviation from the teacher at both coarse-grained (e.g., global tone) and fine-grained (e.g., local texture) levels.

Through extensive analysis, we indicate that a smaller-capacity student consistently struggles to perfectly match the distribution of a larger teacher. Besides, classifier-free guidance (CFG), used during diffusion sampling, can accumulate and amplify the distributional discrepancies between the student's conditional and unconditional branches and those of the teacher, causing a larger deviation in the final generation trajectory.

Motivated by these observations, we propose a simple yet effective method, Guidance Folding Distillation (GFD). GFD reduces the distributional discrepancy between the student and teacher while avoiding the error amplification introduced by CFG composition, enabling effective large-to-small OPD for diffusion models.

Our contributions are as follows.

• We propose Fixed-State KL, an effective and fair way to measure the distribution gap between student and teacher during OPD training for diffusion models.

• Through multifaceted analysis, we are the first to clarify why large-to-small OPD is challenging for diffusion models. To address these challenges, we propose GFD, a simple and effective method that reduces the student–teacher gap while avoiding the error amplification of the CFG composition.

• Through multiple experiments, combined with quantitative and qualitative analysis, we show the effectiveness of GFD. GFD removes the artifacts in cross-scale DiffusionOPD and outperforms previous baselines in both training efficiency and final performance.

METHOD

2.1 PRELIMINARY: ON-POLICY DISTILLATION IN LANGUAGE MODELS AND DIFFUSION MODELS

On-policy distillation (OPD) trains the student on trajectories sampled from its own policy, while the teacher provides dense supervision on every visited state. In language models, OPD minimizes the reverse KL between the student policy πθ\pi_{\theta} and the frozen teacher π⋆\pi^{\star} along student-generated sequences:

LOPDLLM(θ)=Ey∼πθ[∑t=1∣y∣KL(πθ(⋅∣y<t)∥π⋆(⋅∣y<t))].(1)\mathcal{L}_{\mathrm{O P D}}^{\mathrm{L L M}}(\boldsymbol{\theta})=\mathbb{E}_{\boldsymbol{y}\sim\pi_{\boldsymbol{\theta}}}\Big[\sum_{t=1}^{|\boldsymbol{y}|}\mathrm{K L}\big(\pi_{\boldsymbol{\theta}}(\cdot\mid\boldsymbol{y}_{<t})\parallel\pi^{\star}(\cdot\mid\boldsymbol{y}_{<t})\big)\Big]. \tag{1}

DiffusionOPD transfers the same idea to diffusion and flow-matching samplers. At each denoising step jj, the student and teacher induce Gaussian transition kernels pS(xtj+1∣xtj)p_S(x_{t_{j+1}} \mid x_{t_j}) and pT(xtj+1∣xtj)p_T(x_{t_{j+1}} \mid x_{t_j}) whose covariance σj2I\sigma_j^2 I is fixed by the shared sampler, so the per-step reverse KL has the closed form ∥μS(xtj;θ)−μT(xtj)∥22/(2σj2)\|\mu_S(x_{t_j}; \boldsymbol{\theta}) - \mu_T(x_{t_j})\|_2^2 / (2\sigma_j^2). Since the transition mean is affine in the velocity field with sampler-fixed coefficients, and sampling deploys the CFG-guided velocity, DiffusionOPD matches the CFG-guided output to the teacher's:

LOPDdiff(θ)=Ex0:N∼pS,θ[∑j=0N−1ωj∥vSg(xtj,tj,c)−vTg(xtj,tj,c)∥22],(2)\mathcal{L}_{\mathrm{O P D}}^{\mathrm{d i f f}}(\boldsymbol{\theta})=\mathbb{E}_{x_{0:N}\sim p_{S,\boldsymbol{\theta}}}\left[\sum_{j=0}^{N-1}\omega_{j}\big\|v_{S}^{g}(x_{t_{j}},t_{j},\boldsymbol{c})-v_{T}^{g}(x_{t_{j}},t_{j},\boldsymbol{c})\big\|_{2}^{2}\right], \tag{2}

where v⋆g=v⋆u+w(v⋆c−v⋆u)v_{\star}^g = v_{\star}^u + w(v_{\star}^c - v_{\star}^u), with ⋆∈{S,T}\star \in \{S, T\} indexing the student and the teacher, is the guided velocity composed from the conditional and unconditional branches v⋆cv_{\star}^c, v⋆uv_{\star}^u at guidance scale ww, and ωj=ηj2/(2σj2)\omega_j = \eta_j^2 / (2\sigma_j^2) is fixed by the sampler, with ηj\eta_j the coefficient of the velocity in the transition mean and σj2\sigma_j^2 the per-step variance; ηj=(1+σtj2(1−tj)/(2tj))Δtj\eta_j = (1 + \sigma_{t_j}^2 (1 - t_j) / (2t_j)) \Delta t_j and σj2=σtj2Δtj\sigma_j^2 = \sigma_{t_j}^2 \Delta t_j. In both SDE and ODE settings, DiffusionOPD is thus a pathwise, closed-form velocity-matching problem along the student's rollout.

References (30)