Manuscript Offprint
arXiv:2608.26872Self-OPD: On-Policy Distillation for Flow Matching Models without Teacher
Abstract
On-policy distillation (OPD), which leverages a pre-trained, specialized teacher model to provide dense supervisory signals, has achieved significant success in Large Language Models (LLMs) and has recently been adapted to flow matching models. However, this paradigm suffers from two major issues: First, training a separate, task-specific teacher for every new objective incurs high computational costs. Second, the discrepancy between teacher and student distributions often leads to compounding errors along the generation trajectory. In this paper, we introduce Self-OPD, a teacher-free OPD framework for flow matching models that turns the student's own self-exploration into step-wise supervision. At each timestep, Self-OPD branches the deterministic next-state prediction into stochastic SDE candidates, rolls them out with the ODE sampler, and compares their rewards against a deterministic self-reference baseline to obtain normalized advantages. The velocity field is optimized with an all-branch pull-push objective, where high-advantage branches attract the student and low-advantage branches repel it under direction-aware attenuation and SDE-variance normalization. For multi-objective alignment, Self-OPD fuses normalized scores at the reward level, avoiding direct gradient conflict. Experiments on single and mixed reward benchmarks show that Self-OPD outperforms prior RL and OPD methods without task-specific teachers.
Github: https://github.com/Shiy-Zhang/Self-OPD
1 Introduction
Flow Matching (FM) models [6, 19, 23], which learn a continuous velocity field that transports noise to data, have become a dominant backbone for high-quality visual generation [3, 13, 24, 25]. Despite their generative strength, aligning FM models with downstream objectives such as text rendering [4, 36], compositional correctness, and human preference remains challenging.
Existing reinforcement learning (RL) approaches [2, 7, 20, 29, 30, 40] directly optimize reward signals by treating generation as a sequential decision process. As summarized in Fig. 1(a) and illustrated in Fig. 2, these methods can be teacher-free, but they often rely on terminal scores from full denoising trajectories. Consequently, reward credit must be assigned backward through many steps, which leads to high-variance gradients and makes multi-objective alignment fragile when different rewards favor different visual properties.
On-policy distillation (OPD) provides a more stable alternative by supplying dense, step-wise supervision on the student's own trajectory. Recent OPD methods for FM or diffusion models [8, 18] regress the student velocity toward a pretrained teacher prediction at each denoising step, thereby improving training stability.
| Flow-GRPO | Teacher-based OPD | Self-OPD | |
|---|---|---|---|
| Teacher-free | ✓ | ✕ | ✓ |
| Per-step supv. | ✕ | ✓ | ✓ |
| On-policy data | ✓ | ✓ | ✓ |
| Credit assign. | Terminal | Dense | Dense |
| Adapts to student | ✓ | ✕ | ✓ |
| Exploration | Full traj. | Teacher | Local |

(a) Comparison of alignment paradigms
(b) Single- and mixed-reward results

(c) Generated samples from a single Self-OPD model
Figure 1 Overview of Self-OPD.
and sample efficiency. Yet this teacher-dependent design introduces a different bottleneck: each new objective requires training or acquiring a specialized teacher, the student is upper-bounded by the quality and bias of that teacher, and field-level fusion of multiple teachers can create conflicting update directions [8, 18, 41]. In particular, some OPD methods handle multiple objectives by decoupling the problem into separately trained, task-specific teachers whose velocity fields are then routed and merged at the field level [18], which is fundamentally at odds with our aim of driving a single image to high reward across all objectives at once. This motivates a central question: Can we retain the dense per-step supervision of OPD while removing the need for any external teacher?
We answer this question with Self-OPD, a teacher-free on-policy distillation framework for flow matching models. The key idea is to replace teacher-provided velocity targets with reward-weighted targets discovered from the student's own local exploration. At each on-policy timestep , Self-OPD branches the deterministic next-state prediction into stochastic SDE candidates, rolls each candidate out deterministically to a clean image, and evaluates the resulting images with task rewards. In parallel, a deterministic ODE rollout from the same parent state provides a self-reference baseline, allowing terminal rewards to be converted into normalized branch advantages. Self-OPD then performs all-branch pull-push distillation: high-advantage branches pull the velocity field toward better local trajectories, while low-advantage branches push it away from poor directions. A direction-aware attenuation term stabilizes this signed objective by suppressing repulsion that would counteract the best branch, and an SDE-variance normalization yields a principled per-step alignment loss connected to reward-tilted KL minimization. This self-referenced formulation also changes how multi-objective alignment is handled. Instead of differentiating through a weighted sum of potentially conflicting objective losses, Self-OPD fuses normalized scalar scores at the reward level and uses the composite reward only to rank sampled branches. The actual regression target remains a concrete trajectory velocity sampled from the student's own neighborhood, which naturally supports black-box rewards and avoids direct gradient competition among objectives. Rather than partitioning capabilities across specialized teachers as in field-level decoupling, Self-OPD selects branches inside the joint high-reward region, so that a single image is directly optimized to score high on all rewards at once. As shown in Fig. 1, this lets a single generated image simultaneously satisfy multiple objectives—accurate text rendering, correct composition, and high aesthetic quality—rather than having different images each excel under a different reward; we return to this joint high-reward behavior in Sec. 3.4.

Figure 2 Comparison of alignment paradigms. (a) Flow-GRPO relies on trajectory-level policy gradients from terminal rewards. (b) Flow-OPD requires a pretrained teacher for step-wise MSE supervision. (c) Self-OPD (Ours) turns local stochastic branches and a self-reference baseline into dense pull-push supervision, without requiring any teacher.
Overall, our contributions are:
• We propose Self-OPD, a teacher-free on-policy distillation framework for flow matching models that converts reward-guided self-exploration and a self-reference baseline into dense step-wise supervision.
• We introduce an all-branch pull-push distillation objective with SDE-variance normalization and direction-aware attenuation, using both high- and low-advantage branches while maintaining stable optimization.
• We develop a reward-level fusion strategy for multi-objective alignment, enabling black-box composition without field-level teacher routing or gradient conflicts.
• We show empirically that Self-OPD outperforms prior RL and teacher-based OPD methods across single-reward and mixed-reward benchmarks.
On-Policy Distillation. On-policy distillation (OPD) [1, 8, 18, 31, 39] has demonstrated notable progress in large language models (LLMs), owing to its ability to mitigate exposure bias and improve training efficiency through student-generated sequences [1, 26]. GKD [1] established the canonical OPD framework by training the student model on its own generated outputs, effectively bridging the distribution gap between teacher and student. Building upon this, Flow-OPD [8] and Diffusion-OPD [18] extend OPD [9, 10] to flow matching and diffusion models, respectively, achieving competitive generation quality with significantly reduced sampling steps [37, 38]. D-OPSD [15] further leverages multi-modal features to distill rich cross-modal knowledge into a compact single-stream textual representation, enhancing semantic alignment in text-to-image generation. In contrast, our work extends OPD to a multi-task setting, enabling simultaneous optimization across diverse generation objectives without relying on a fixed teacher model.

Figure 3 Self-OPD pipeline. Top: The student branches its prediction into K SDE paths (blue), generates images via ODE rollouts (purple), and scores them . Bottom-left: Rewards define a self-referenced advantage that pulls toward high-reward velocities and pushes away from low-reward velocities . Bottom-right: A direction-aware coefficient gates the push to prevent it from counteracting the pull, resulting in the multi-branch loss .
3 Methodology
3.1 Preliminaries
Flow Matching and SDE Formulation. Flow Matching (FM) [19, 23] learns a continuous velocity field that transports a noise distribution to the data distribution along straight-line trajectories. Formally, the probability path is defined as for , where . The model parameterizes by minimizing the flow matching objective:
During inference, samples are generated by integrating the reverse-time ordinary differential equation (ODE) backward from to . Specifically, we discretize the trajectory into integration steps along a discrete schedule satisfying . The infinitesimal transition step is denoted as for .
To enable stochastic exploration, the reverse ODE can be augmented into a reverse-time stochastic differential equation (SDE) [8, 27]. Under the Euler-Maruyama discretization scheme, each transition step decomposes into a deterministic next-state prediction and an isotropic stochastic perturbation:
where represents the noise schedule parameterized by the coefficient . The drift of this reverse SDE is governed by the score function , which is inherently constrained by the velocity field. Conditioned on a data point , the conditional distribution is , which yields the conditional score . Averaging over the posterior establishes the marginal-score identity . By eliminating from the parameterized velocity target , we obtain the conditional expectation , which simplifies the score function to:
The reverse SDE transition follows the score-augmented drift [27]. Substituting Eq. 3 into this drift formulation scales the correction term to . Consequently, the deterministic next-state prediction is formulated as:
Setting naturally recovers the deterministic Euler ODE step . To explicitly reveal the dependence of the prediction on the learned velocity, we collect the terms in Eq. 4, yielding the coefficient . Substituting the schedule cancels the terms and , leaving a timestep-independent constant . Hence, the deterministic prediction displays an elegant affine relationship with the velocity field:
where aggregates all components independent of . This affine equivalence guarantees that any distillation objective formulated in transition space can be minimized with identical convergence properties in velocity space.
In this work, we propose Self-OPD, a teacher-free on-policy distillation framework that transforms self-generated rewards into dense, step-wise supervision. As illustrated in Fig. 3, Self-OPD first explores local trajectories around the student's on-policy path via stochastic SDE branching, evaluates these candidates against a deterministic self-reference baseline, and finally distills the collective feedback through an advantage-weighted pull-push objective.
3.2 Self-Referenced Evaluation and Self-Exploration
To retain dense supervision without a pretrained teacher, Self-OPD lets the student evaluate its own local alternatives. Given an on-policy latent , the method first samples K stochastic next states around the deterministic prediction and then compares their final rewards against the student's default ODE trajectory from the same state. This local, self-referenced comparison turns terminal rewards into low-variance per-step guidance.
SDE Branching Exploration. At timestep , we compute the deterministic next-state prediction with a single forward pass through the student transformer. Following the SDE transition in Eq. 2, we instantiate K candidate branches by drawing independent Gaussian perturbations:
where . All branches share the same base prediction , so the expensive transformer evaluation is performed only once; the additional diversity comes from lightweight SDE perturbations. The noise level , set by in our experiments, controls the exploration radius.
ODE Rollout and Self-Reference Evaluation. Each branch is completed to a clean latent by a deterministic ODE rollout ( ), decoded to pixel space, and scored by a task-specific reward model :
(7) where is the prompt and is the VAE decoder. To obtain a variance-reducing baseline without a teacher, we also run a fully deterministic ODE trajectory directly from the parent state and denote its reward as . The branch advantage is then normalized relative to this self-reference:
where positive advantages indicate local directions that outperform the student's default trajectory, while negative advantages identify directions to avoid. For multi-reward training, is the composite reward defined in Eq. 18; it is still used only as a non-differentiable branch-ranking signal inside Eq. 8.
3.3 All-Branch Pull-Push Distillation
Instead of regressing only to the best branch, Self-OPD uses the full exploration neighborhood. Positive-advantage branches should pull the deterministic prediction toward locally better trajectories, while negative-advantage branches should push it away from poor directions. This all-branch update reduces target switching and preserves the information contained in branches that Best-of-K selection would discard.
Not every negative branch is equally useful. If a low-reward branch points in nearly the same direction as the best branch, a strong repulsive update would counteract the desirable pull. We therefore introduce a direction-aware attenuation coefficient:
where and are measured from the deterministic prediction. The coefficient is bounded in : it keeps the full repulsion for negative branches that point opposite to the best direction, and suppresses repulsion when a negative branch is aligned with the best branch.
Because is affine in by Eq. 5, every branch can be associated with an effective branch velocity satisfying . Subtracting Eq. 5 from the branch definition Eq. 6 and dividing by gives the closed form
so injecting Gaussian noise in transition space is exactly a perturbation of the velocity target. Consequently the displacement factors as , so the squared transition distance equals the squared velocity distance scaled by . Dividing this by the transition-kernel variance normalization turns the constant into the prefactor below. Let , and define and as the effective velocities of positive and negative branches, respectively. The step-wise Self-OPD objective is:
The prefactor follows from the SDE transition variance and the affine change of variables from transition mean to velocity, matching the normalization used in OPD-style per-step regression [8, 18]. The first term pulls toward high-reward branch velocities, while the second term pushes it away from low-reward velocities after direction-aware attenuation.
Connection to Per-Step KL. The normalization above also admits a KL interpretation. Let denote the SDE transition kernel, and let be a reward-tilted target distribution, as in reward-weighted regression.
Proposition 1 (Per-step KL gradient) For fixed and fixed target , the gradient of the reverse KL with respect to the student transition mean is
Self-OPD approximates this expectation with the K sampled branches, using as the signed importance weight of each branch; we prove the Proposition next and then use it to explain the loss.
Proof of Prop. 1. Abbreviate the transition mean and the isotropic covariance . Since is the fixed regression target, differentiating the reverse KL with respect to acts only through the term. Splitting the two terms,
the first is independent of and vanishes under . For the Gaussian kernel,
only the quadratic form depends on , so . By linearity of expectation,
and substituting recovers Eq. 12.
From the gradient to the training loss. The gradient has a direct operational reading: the KL-optimal update moves the student mean toward samples of the reward-tilted target with a step size set by the transition precision . Because is intractable, Self-OPD replaces the expectation by a Monte Carlo estimate over the K SDE branches, importance-weighting each by its advantage and, for negative branches, the direction gate ; rewriting the mean-space target as a velocity-space target through the affine relation Eq. 5 then recovers Eq. 11, up to the constant from the change of variables. The transition-variance normalization is therefore not a free hyperparameter but the precision that makes every per-step regression an unbiased estimate of the same KL gradient; a timestep-independent scale would over- or under-weight steps along the trajectory.
To aggregate the step-wise losses across the entire denoising trajectory, we define the total training objective as:
where is the step-wise loss at timestep (Eq. 11), and is a timestep-dependent weight. Following the intuition that early-to-mid timesteps (near noise) establish the global semantic layout while late timesteps (near data) merely refine local details, we set to prioritize these early exploration phases, smoothly decaying its value as the trajectory approaches convergence, when .
3.4 Reward-Level Fusion for Multi-Objective Alignment
Simultaneous multi-objective alignment (e.g., text, aesthetics, preference) is challenging. Previous approaches [8, 18, 41] typically blend gradients in the shared parameter space by optimizing . However, conflicting objectives ( ) trigger destructive gradient interference, causing a “seesaw effect” where improving one metric degrades others. Self-OPD bypasses this by fusing objectives at the non-differentiable reward level, shifting the Pareto-front search from the parameter space to the simpler trajectory space:
Let be the step-j SDE transition kernel, and be the reward-tilted target for objective . Field-level fusion minimizes the weighted KL sum in parameter space, where objectives that disagree contribute opposing gradients. Consider instead the geometric mean of the per-objective tilts, i.e., the joint target
(17)
Each ratio has a normalizer that is independent of , so the product is a constant absorbed into . The separate tilts therefore collapse into a single tilt of by the composite advantage , i.e. a lone target rather than competing ones.
Since each is affine in its normalized reward (Eq. 8), this joint tilt is realized exactly by fusing the normalized scores into a composite reward for each branch :
where is the z-scored metric with weight : because an affine map preserves the branch ordering, ranking branches by induces the same positive/negative sets as tilting by . A per-scorer veto rejects branches falling significantly below the self-reference baseline.
Selector over trajectories, not objective over parameters. Crucially, the composite score enters training only through the branch ranking that defines the advantages ; it is never differentiated. Consequently, the training target in Eq. 11 remains a single, concrete trajectory velocity that already scores well across all metrics at once, rather than a sum of per-metric gradients. This is where the two paradigms diverge at convergence. Field-level fusion combines objectives before sampling, in the shared parameter space: when two objectives disagree their gradients point in opposing directions and each update is a compromise that fully satisfies neither, which in the teacher-based instantiation is realized by routing each prompt to the teacher whose objective it matches, so the aligned model carries high quality only on the prompt family that selected that teacher. Reward-level fusion combines objectives after sampling: the composite score ranks whole trajectories and the winning branch already lies in the region that scores well under all rewards simultaneously. The search for a joint optimum thus moves from the parameter space, where gradients interfere, to the trajectory space, where a single sample can satisfy every reward at once. This reward-level paradigm yields several practical advantages: (i) it obviates inter-objective gradient conflicts, preventing metric collapse; (ii) it accommodates black-box or non-differentiable scorers; (iii) adjusting trade-offs via requires zero model retraining, enabling runtime composability; and (iv) it bypasses the teacher ceiling through self-exploration, allowing the student to exceed any individual pre-trained teacher.
Per-task fusion in practice. We instantiate reward-level fusion through Eq. 18. Because OCR and GenEval prompts are not interchangeable, we fuse rewards per task: on the OCR task we set , and the GenEval variant replaces the task scorer analogously, both keeping PickScore and HPSv2 as shared prompt-agnostic quality guards against reward hacking. At each training step, every SDE-branch rollout image and the pure-ODE self-reference baseline are scored by all three reward models; each scorer is z-normalized across this joint set, and the weighted sum forms the per-branch composite score from which the advantage (Eq. 8) is computed to rank branches. This single teacher-free run stays jointly competitive across all metrics.
4 Experiments
4.1 Experimental Settings
Implementation Details. We use SD3.5-Medium [6] at resolution as the base model. We train with LoRA [14] applied to the transformer. We use branches, noise level , and training timesteps per step = 2. We use the AdamW [16] optimizer with learning rate .
Table 1 Main results of single-reward training. Best in bold, second best underlined among trained methods.
| Method | GenEval | OCR | PickScore | HPSv2 | |
|---|---|---|---|---|---|
| strict | cont. | ||||
| Base models (no alignment fine-tuning) | |||||
| SD3.5-Medium (base) | 0.5222 | 0.6219 | 0.5833 | 22.41 | 0.3004 |
| RL fine-tuning (teacher-free) | |||||
| + RM GenEval | 0.9005 | 0.9470 | 0.6519 | 22.53 | 0.2792 |
| + RM OCR | 0.5420 | 0.6529 | 0.9253 | 22.51 | 0.2999 |
| + RM PickScore | 0.5081 | 0.5293 | 0.7033 | 23.57 | 0.3396 |
| + RM GenEval | 0.9155 | 0.9502 | 0.7032 | 22.20 | 0.2586 |
| + RM OCR | 0.5402 | 0.6870 | 0.9348 | 22.44 | 0.2912 |
| + RM PickScore | 0.4602 | 0.4037 | 0.6563 | 23.98 | 0.3453 |
| Ours (teacher-free) | |||||
| + RM GenEval | 0.9536 | 0.9676 | 0.6120 | 22.46 | 0.2741 |
| + RM OCR | 0.4186 | 0.5565 | 0.9745 | 22.11 | 0.2719 |
| + RM PickScore | 0.5303 | 0.5863 | 0.7416 | 24.47 | 0.3357 |
| + RM HPSv2 | 0.4453 | 0.4722 | 0.7121 | 23.25 | 0.4099 |
Table 2 Main results of mixed-reward training. Each method produces a single model evaluated across all metrics.
| Method | Teacher-free | GenEval | OCR | Pref. (same test images) | Pref. (separate test set) | |||
|---|---|---|---|---|---|---|---|---|
| strict | cont. | PickScore | HPSv2 | PickScore | HPSv2 | |||
| Base models (no alignment fine-tuning) | ||||||||
| SD3.5-Medium (base) | — | 0.5222 | 0.6219 | 0.5833 | 22.66 | 0.2824 | 22.41 | 0.3004 |
| Teacher-based OPD | ||||||||
| Flow-OPD | ✕ | 0.8594 | 0.9203 | 0.9392 | 23.43 | 0.3042 | 23.13 | 0.3334 |
| DiffusionOPD | ✕ | 0.9150 | 0.9479 | 0.9464 | 22.72 | 0.2676 | 23.95 | 0.3729 |
| Mixed reward (teacher-free) | ||||||||
| DiffusionNFT | ✓ | 0.8888 | 0.9277 | 0.9229 | 23.67 | 0.3206 | 23.18 | 0.3482 |
| Self-OPD(Ours) | ✓ | 0.9521 | 0.9691 | 0.9597 | 23.87 | 0.3214 | 23.39 | 0.3415 |
Tasks and Rewards. We evaluate three tasks with corresponding reward models: (1) text rendering, scored by OCR character-level accuracy between the generated and target text; (2) compositional generation, scored by GenEval [11]; and (3) aesthetic and human-preference alignment, scored by PickScore [17] and HPSv2 [32]. We also train mixed-reward variants fusing each task scorer.
Baselines. We compare against three groups. Base models: SD3.5-Medium [6]. Teacher-free RL fine-tuning: Flow-GRPO [20], GRPO-Guard [30], and DiffusionNFT [40]. Teacher-based OPD: Flow-OPD [8] and DiffusionOPD [18].
4.2 Main Results
Quantitative Results. We evaluate all methods across two distinct setups, namely single-reward training in Tab. 1 and mixed-reward, multi-capability training in Tab. 2. The assessment encompasses compositional generation via GenEval, text rendering via OCR, and human/AI preferences measured by PickScore and HPSv2. For GenEval, we report both the strict mode, which binary-scores generations only when all sub-requirements are met, and the continuous mode, which allows for partial credit. Similarly, preference metrics are assessed under two protocols: the same test images protocol that evaluates directly on the GenEval and OCR benchmarks, and the separate test set protocol that utilizes a held-out aesthetic benchmark.
Reward-level fusion (Self-OPD) keeps preference high on task prompts; field-level fusion (DiffusionOPD) drops

images generated on aesthetic / preference prompts
images generated on GenEval / OCR prompts
Figure 4 Field-level fusion couples preference quality to the prompt family; reward-level fusion does not. For each approach, we contrast the preference-reward distribution of images generated on aesthetic/preference prompts (orange) against that of images generated on the GenEval/OCR task prompts (blue). The distribution peaks are placed at the measured means from Tab. 2 (the “separate test set” and “same test images” columns, respectively); the spread is illustrative and only serves to visualize the shift between the two prompt families. For DiffusionOPD, the preference distribution shifts sharply when moving to the task prompts, whereas for Self-OPD, the two distributions nearly coincide.
Self-OPD emerges as the sole teacher-free method that remains highly competitive across all evaluation dimensions simultaneously. In Tab. 1, among all single-reward methods, Self-OPD achieves top performance with a GenEval score of 0.95, OCR accuracy of 97.5%, PickScore of 24.79, and HPSv2 score of 0.3665. Notably, Self-OPD consistently outperforms both Flow-GRPO and GRPO-Guard on every task despite utilizing identical base models and reward signals, validating the superiority of step-wise self-distillation over terminal policy gradient optimization.
In Tab. 2, the unified mixed-reward Self-OPD model shares the highest GenEval score of 0.95, delivers the best OCR accuracy of 96.0%, and under the same test images protocol, outperforms the teacher-based DiffusionOPD on both PickScore, with a score of 23.87 compared to DiffusionOPD's 22.72, and HPSv2, with 0.3214 compared to 0.2676, despite requiring no teacher supervision. This performance gap empirically validates the reward-level versus field-level fusion paradigm. Specifically, the core objective of multi-metric alignment requires each individual generation to satisfy all criteria simultaneously, rather than having different subsets of images excel under different evaluators. By selecting candidate SDE branches within the joint high-reward region, Self-OPD ensures that the same GenEval and OCR test images also exhibit superior aesthetic quality. Conversely, field-level fusion in DiffusionOPD routes each prompt to a specialized teacher, generating images that satisfy the isolated target objective but fail to jointly optimize general preferences. Consequently, its preference evaluations on the GenEval and OCR test images, yielding a PickScore of 22.72 and HPSv2 of 0.2676, fall below those of Flow-OPD, which scores 23.43 and 0.3042, respectively.
Fig. 4 makes this difference explicit. Reading each method as a distribution of preference rewards over two prompt populations, DiffusionOPD's PickScore distribution shifts down by and its HPSv2 distribution by when the images are generated on the GenEval/OCR task prompts rather than on aesthetic prompts. This is exactly the signature of field-level fusion described above: blending per-teacher gradients in parameter space yields images that score well only on the prompt family matched to the selected teacher, so preference quality is effectively decoupled from the task prompts. For Self-OPD the two distributions almost overlap ( for PickScore and for HPSv2), because reward-level fusion selects trajectories inside the joint high-reward region rather than compromising between competing gradients. This is precisely why we treat the same test images protocol as the primary preference comparison: it measures whether the same generations that satisfy the task also carry high aesthetic quality, the property multi-objective alignment actually targets.
Qualitative Results. Fig. 5 qualitatively compares all methods on six prompts spanning text rendering,
Self-OPD(Ours)
Flow-GRPO
GRPO-Guard
DiffusionNFT
Flow-OPD
Diffusion-OPD
.. sign that reads "No Liquids Allowed", with travelers and security..

A laptop on top of a teddy bear.
A storefront with 'Google Brain Toronto' written on it.
A photo of a vase right of a horse.
.. displays a hand-painted sign reading "Organic Moon Vegetables". Vibrant, otherworldly...
Figure 5 Qualitative comparison. Each method uses its mixed-reward model if available, or the prompt-specific reward model (e.g., OCR for text prompts). Self-OPD achieves superior performance in both accuracy and aesthetics.
spatial relations, and counting. First, among mixed-reward baselines including DiffusionNFT, Flow-OPD, and DiffusionOPD, Self-OPD renders text with higher fidelity, precisely spelling challenging phrases such as “No Liquids Allowed” and “Google Brain Toronto”. It also accurately executes complex spatial layouts, such as placing a laptop on a teddy bear or a vase right of a horse, and strictly satisfies counting constraints like generating exactly four benches, yielding more coherent overall compositions. Second, compared to single-reward specialists like Flow-GRPO and GRPO-Guard at their optimal checkpoints. Self-OPD exhibits superior control across all three axes. Driven by joint preference optimization, it concurrently enhances scene richness and aesthetic quality. These qualitative advantages closely align with the quantitative improvements in Tab. 1 and Tab. 2.
4.3 Ablation Study
Effect of Branch Selection Strategy. Regressing solely to the top-performing branch (Best-of-K, red) yields unstable, non-monotonic training that barely surpasses the baseline. This failure stems from high gradient variance caused by abrupt target switching and the complete absence of negative feedback. Conversely, our all-branch advantage-weighted distillation (green) stabilizes training by utilizing the entire exploration neighborhood. Adding -aligned KL normalization (blue; full Self-OPD, Proposition 1) further accelerates convergence and maximizes performance, validating our theoretical step-wise loss scaling.
Effect of Repulsion Bounding. The scaling factor in Eq. 9 bounds the coefficient at , ensuring the repulsive push never overpowers the attractive pull. Under an unbounded formulation (red), strong repulsive gradients from opposing branches eventually dominate, destabilizing training and triggering a sharp

(a) Branch selection strategy.

(b) Bounded vs. unbounded.
Figure 6 Ablation of core designs. (a) Branch handling: Best-of-K (red), all-branch pull-push distillation (green), and Self-OPD with -aligned KL (blue). (b) Gradient gating: Bounded (blue) vs. unbounded (red).


Figure 7 Training efficiency: OCR (left) and GenEval (right) vs. wall-clock time. Blue: Self-OPD mix from scratch. Green: Self-OPD mix warm-start. Red: DiffusionOPD student phase. The green shaded region indicates the time spent training warm-start checkpoints (37 h). The red shaded region indicates DiffusionOPD's teacher training phase (85.75 h), during which the student model is idle. The dotted horizontal line marks DiffusionOPD's final performance level. All training times for DiffusionOPD are taken from the original report.
performance collapse. Our bounded gating (blue) maintains stable, monotonic improvement, confirming that the direction-aware coefficient must act purely as an attenuation gate rather than a gradient amplifier.
Effect of Timestep Weighting. While uniform timestep weighting eventually matches our weighted scheme in final performance, our proposed weighting accelerates convergence by concentrating training signals on early timesteps, where branching yields more diverse semantic alternatives. Conversely, a timestep importance sampling (TIS) variant that oversamples early steps degrades performance below the base model, demonstrating that continuous exposure to all trajectory stages is essential even when loss weighting prioritizes early exploration phases.
Analysis of Training Time. Fig. 7 makes Self-OPD's wall-clock advantage concrete on OCR and GenEval. DiffusionOPD [18] requires three separate teacher models (GenEval: 46.9 h, OCR: 33.2 h, Aesthetics: 85.8 h) trained in parallel, followed by 11.3 h of student distillation, for a total wall-clock time of h.
During the entire teacher-training phase (red shaded region), the student remains at the base level and cannot begin learning. Self-OPD eliminates this bottleneck entirely, in two configurations:
• From scratch (blue): a single tri-reward run that begins improving immediately. It reaches DiffusionOPD-level OCR (0.946) in ~62 h and GenEval (0.915) in ~90 h, both strictly faster than DiffusionOPD's 97 h.
• Warm-start (green): first trains single-reward specialists in parallel (GenEval: 27 h, OCR: 37 h; wall-clock: 37 h, green shaded region), then launches the tri-reward mixed run which converges to 0.946 OCR in ~11 h and 0.915 GenEval in ~7 h, for a total wall-clock of ~48 h and ~44 h respectively. This is roughly 2× faster than DiffusionOPD on both metrics, while achieving higher final performance.
5 Conclusion
In this paper, we introduce Self-OPD, a teacher-free on-policy distillation framework for flow matching models. By branching the student's own trajectory, scoring each branch with task rewards, and applying all-branch advantage-weighted regression with direction-aware modulation, Self-OPD turns self-exploration into dense per-step supervision. Experiments across text rendering, compositional generation, and preference alignment show that this formulation can match or surpass teacher-based OPD while avoiding task-specific teacher training and enabling reward-level multi-objective fusion.
References
[1] Rishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos Garea, Matthieu Geist, and Olivier Bachem. On-policy distillation of language models: Learning from self-generated mistakes. In ICLR, pages 21246–21263, 2024.
[2] Kevin Black, Michael Janner, Yilun Du, Ilya Kostrikov, and Sergey Levine. Training diffusion models with reinforcement learning. In ICLR, pages 4965–4987, 2024.
[3] Black Forest Labs. FLUX.1. https://github.com/black-forest-labs/flux, 2024. Accessed: 2025-01-15.
[4] Jingye Chen, Yupan Huang, Tengchao Lv, Lei Cui, Qifeng Chen, and Furu Wei. Textdiffuser: Diffusion models as text painters. Advances in Neural Information Processing Systems, 36:9353–9387, 2023.
[5] Kevin Clark, Paul Vicol, Kevin Swersky, and David Fleet. Directly fine-tuning diffusion models on differentiable rewards. In ICLR, pages 4793–4822, 2024.
[6] Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, et al. Scaling rectified flow transformers for high-resolution image synthesis. In ICML, 2024.
[7] Ying Fan, Olivia Watkins, Yuqing Du, Hao Liu, Moonkyung Ryu, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, Kangwook Lee, and Kimin Lee. Dpok: Reinforcement learning for fine-tuning text-to-image diffusion models. In NeurIPS, pages 79858–79885, 2023.
[8] Zhen Fang, Wenxuan Huang, Yu Zeng, Yiming Zhao, Shuang Chen, Kaituo Feng, Yunlong Lin, Lin Chen, Zehui Chen, Shaosheng Cao, et al. Flow-opd: On-policy distillation for flow matching models. arXiv preprint arXiv:2605.08063, 2026.
[9] Siming Fu, Zheming Fu, Ruizhe He, Hualiang Wang, Jie Huang, Xiaoxiao Ma, Mingchen Zhong, Weihu Huang, Xiaoxuan He, and Haojun Xu. Any-opd: Heterogeneous on-policy distillation for flow-matching models via representation-space bridging. arXiv preprint arXiv:2608.03316, 2026.
[10] Siming Fu, Haojun Xu, Ruizhe He, Zheming Fu, Hualiang Wang, Jie Huang, Xiaoxiao Ma, Mingchen Zhong, Weihu Huang, Xiaoxuan He, et al. Poly-opd: Heterogeneous multi-teacher on-policy distillation for capability-selectable flow models. arXiv preprint arXiv:2608.04349, 2026.
[11] Dhruba Ghosh, Hannaneh Hajishirzi, and Ludwig Schmidt. Geneval: An object-focused framework for evaluating text-to-image alignment. In NeurIPS, pages 52132–52152, 2023.
[12] Xiaoxuan He, Siming Fu, Yuke Zhao, Wanli Li, Jian Yang, Dacheng Yin, Fengyun Rao, and Bo Zhang. Tempflow-grpo: When timing matters for grpo in flow models. In International Conference on Learning Representations, volume 2026, pages 132869–132895, 2026.
[13] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020.
[14] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
[15] Dengyang Jiang, Xin Jin, Dongyang Liu, Zanyi Wang, Mingzhe Zheng, Ruoyi Du, Xiangpeng Yang, Qilong Wu, Zhen Li, Peng Gao, et al. D-opsd: On-policy self-distillation for continuously tuning step-distilled diffusion models. arXiv preprint arXiv:2605.05204, 2026.
[16] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
[17] Yuval Kirstain, Adam Polyak, Uriel Singer, Shahbuland Matiana, Joe Penna, and Omer Levy. Pick-a-pic: An open dataset of user preferences for text-to-image generation. In NeurIPS, pages 36652–36663, 2023.
[18] Quanhao Li, Junqiu Yu, Kaixun Jiang, Yujie Wei, Zhen Xing, Pandeng Li, Ruihang Chu, Shiwei Zhang, Yu Liu, and Zuxuan Wu. Diffusionopd: A unified perspective of on-policy distillation in diffusion models. arXiv preprint arXiv:2605.15055, 2026.
[19] Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le. Flow matching for generative modeling. arXiv preprint arXiv:2210.02747, 2022.
[20] Jie Liu, Gongye Liu, Jiajun Liang, Yangguang Li, Jiaheng Liu, Xintao Wang, Pengfei Wan, Di Zhang, and Wanli Ouyang. Flow-grpo: Training flow matching models via online rl. In NeurIPS, pages 40783–40818, 2026.
[21] Mushui Liu, Yuhang Ma, Yang Zhen, Jun Dan, Yunlong Yu, Zeng Zhao, Zhipeng Hu, Bai Liu, and Changjie Fan. Llm4gen: Leveraging semantic representation of llms for text-to-image generation. In AAAI, 2025.
[22] Mushui Liu, Dong She, Jingxuan Pang, Qihan Huang, Jiacheng Ying, Wanggui He, Yuanlei Hou, and Siming Fu. Tfcustom: Customized image generation with time-aware frequency feature guidance. In CVPR, 2025.
[23] Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.03003, 2022.
[24] Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach. Sdxl: Improving latent diffusion models for high-resolution image synthesis. In International Conference on Learning Representations, volume 2024, pages 1862–1874, 2024.
[25] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In 2022 IEEE/CVF conference on computer vision and pattern recognition (CVPR), pages 10674–10685. ieee, 2022.
[26] Avi Singh, John D Co-Reyes, Rishabh Agarwal, Ankesh Anand, Piyush Patil, Xavier Garcia, Peter J Liu, James Harrison, Jaehoon Lee, Kelvin Xu, et al. Beyond human data: Scaling self-training for problem-solving with language models. arXiv preprint arXiv:2312.06585, 2023.
[27] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020.
[28] Yunze Tong, Mushui Liu, Canyu Zhao, Wanggui He, Shiyi Zhang, Hongwei Zhang, Peng Zhang, Jinlong Liu, Ju Huang, Jiamang Wang, et al. Alleviating sparse rewards by modeling step-wise and long-term sampling effects in flow-based grpo. arXiv preprint arXiv:2602.06422, 2026.
[29] Bram Wallace, Meihua Dang, Rafael Rafailov, Linqi Zhou, Aaron Lou, Senthil Purushwalkam, Stefano Ermon, Caiming Xiong, Shafiq Joty, and Nikhil Naik. Diffusion model alignment using direct preference optimization. In CVPR, pages 8228–8238, 2024.
[30] Jing Wang, Jiajun Liang, Jie Liu, Henglin Liu, Gongye Liu, Jun Zheng, Wanyuan Pang, Ao Ma, Zhenyu Xie, Xintao Wang, et al. Grpo-guard: Mitigating implicit over-optimization in flow matching via regulated clipping. In CVPR, pages 5988–5998, 2026.
[31] Fangtai Wu, Hailong Guo, Shijie Huang, Jiayi Song, Yubo Huang, Mushui Liu, Zhao Wang, Yunlong Yu, Jiaming Liu, and Ruihua Huang. Collectionlora: Collecting 50 effects in 1 lora via multi-teacher on-policy distillation. arXiv preprint arXiv:2605.25378, 2026.
[32] Xiaoshi Wu, Yiming Hao, Keqiang Sun, Yixiong Chen, Feng Zhu, Rui Zhao, and Hongsheng Li. Human preference score v2: A solid benchmark for evaluating human preferences of text-to-image synthesis. arXiv preprint arXiv:2306.09341, 2023.
[33] Jiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong, Qinkai Li, Ming Ding, Jie Tang, and Yuxiao Dong. Imagereward: Learning and evaluating human preferences for text-to-image generation. In NeurIPS, pages 15903–15935, 2023.
[34] Shuchen Xue, Chongjian Ge, Shilong Zhang, Yichen Li, and Zhi-Ming Ma. Advantage weighted matching: Aligning rl with pretraining in diffusion models. arXiv preprint arXiv:2509.25050, 2025.
[35] Zeyue Xue, Jie Wu, Yu Gao, Fangyuan Kong, Lingting Zhu, Mengzhao Chen, Zhiheng Liu, Wei Liu, Qiushan Guo, Weilin Huang, et al. Dancegrpo: Unleashing grpo on visual generation. arXiv preprint arXiv:2505.07818, 2025.
[36] Yukang Yang, Dongnan Gui, Yuhui Yuan, Weicong Liang, Haisong Ding, Han Hu, and Kai Chen. Glyphcontrol: Glyph conditional control for visual text generation. Advances in Neural Information Processing Systems, 36:44050–44066, 2023.
[37] Tianwei Yin, Michaël Gharbi, Taesung Park, Richard Zhang, Eli Shechtman, Fredo Durand, and William T Freeman. Improved distribution matching distillation for fast image synthesis. In NeurIPS, pages 47455–47487, 2024.
[38] Tianwei Yin, Michaël Gharbi, Richard Zhang, Eli Shechtman, Fredo Durand, William T Freeman, and Taesung Park. One-step diffusion with distribution matching distillation. In CVPR, pages 6613–6623. IEEE, 2024.
[39] Qianhao Yuan, Jie Lou, Xing Yu, Hongyu Lin, Le Sun, Xianpei Han, and Yaojie Lu. Vision-opd: Learning to see fine details for multimodal llms via on-policy self-distillation. arXiv preprint arXiv:2605.18740, 2026.
[40] Kaiwen Zheng, Huayu Chen, Haotian Ye, Haoxiang Wang, Qinsheng Zhang, Kai Jiang, Hang Su, Stefano Ermon, Jun Zhu, and Ming-Yu Liu. Diffusionnft: Online diffusion reinforcement with forward process. In ICLR, pages 134129–134150, 2026.
[41] Wei Zhou, Xiongwei Zhu, Zelin Xu, Bo Dong, Lixue Gong, Yongyuan Liang, Meng Chu, Leigang Qu, Lingdong Kong, Wei Liu, et al. Danceopd: On-policy generative field distillation. arXiv preprint arXiv:2606.27377, 2026.
(a)

(b)
Figure 8 Strict vs. continuous scoring on “a photo of a white handbag and a red giraffe”. (a) base; (b) Self-OPD.
| Model | Strict | Continuous |
|---|---|---|
| SD3.5-Medium (base) | 0 | 0.5 |
| Self-OPD | 1 | 1.0 |
Table 3 Strict and continuous GenEval scores for the two images in Fig. 8. The prompt has two sub-requirements (one per colored object).
This supplementary material provides additional evaluation details, a theoretical proof, extended analysis, and qualitative results referenced in the main paper. The contents are organized as follows:
-
Appendix A documents the evaluation metrics, including the two GenEval scoring modes and the two preference evaluation protocols.
-
Appendix B gives additional qualitative results demonstrating the aesthetic advantage of Self-OPD on the task-specific prompts.
A Evaluation Metrics
A.1 GenEval: Strict vs. Continuous Scoring
GenEval [11] evaluates compositional generation by checking whether generated images satisfy a set of sub-requirements (e.g., correct object count, spatial relation, color attribute). We report two scoring modes:
-
Strict scoring. A binary per-image metric: the score is 1 only if all sub-requirements for that prompt are satisfied, and 0 otherwise. The reported number is the average over all test prompts. This is a demanding metric that penalizes any partial failure.
-
Continuous scoring. A partial-credit metric: for each image, the score is the fraction of sub-requirements satisfied (ranging from 0 to 1). The reported number is again averaged over all test prompts. This gives credit to images that partially fulfill the prompt.
Fig. 8 illustrates both modes on the color-attribution prompt “a photo of a white handbag and a red giraffe”, which has two sub-requirements, one per colored object. The SD3.5-Medium base (Fig. 8a) renders the white handbag correctly but colors the giraffe orange rather than red, satisfying one of the two sub-requirements: its strict score is 0 while its continuous score is 0.5. Self-OPD (Fig. 8b) renders both the white handbag and the red giraffe, satisfying both sub-requirements for a strict score of 1 and a continuous score of 1.0 (Tab. 3). Continuous scoring better captures incremental improvements, while strict scoring reflects end-to-end correctness.
A.2 Preference Protocols: Same Test Images vs. Separate Test Set
We evaluate preference-based metrics (PickScore [17] and HPSv2 [32]) under two complementary protocols:
Self-OPD(Ours)
Flow-GRPO
GRPO-Guard
DiffusionNFT
Flow-OPD
Diffusion-OPD
A photo of an orange toaster.

A photo of a cow right of a laptop.
A photo of three pizzas.
A photo of four donuts.
A photo of four hot dogs.
Figure 9 Aesthetic quality on GenEval prompts. Each method uses its mixed-reward model if available, or its GenEval-trained model otherwise (Flow-GRPO, GRPO-Guard). Self-OPD satisfies the compositional requirements (counting, spatial relations, attributes) while generating images with higher aesthetic quality, consistent with its higher PickScore/HPSv2 in Tab. 2.
-
Same test images. PickScore and HPSv2 are computed on the same images generated for the GenEval and OCR test prompts. Specifically, for each model we generate images for the GenEval test suite and the OCR test suite, then score all these images with PickScore and HPSv2. The final score is the unweighted average of the GenEval-prompt score and the OCR-prompt score (1:1 averaging). This protocol measures whether a model maintains aesthetic quality and human preference on the task it was trained for, without introducing any distribution shift from additional prompts.
-
Separate test set. PickScore and HPSv2 are computed on a held-out set of aesthetic-oriented prompts (DrawBench) that are disjoint from the training and GenEval/OCR evaluation prompts. This measures preference quality on a general-purpose prompt distribution.
The “same test images” protocol gives a more controlled cross-metric comparison because it evaluates all metrics on the same set of generations, separating model quality from prompt distribution. A model with high preference scores under this protocol improves aesthetic quality without sacrificing task performance. The “separate test set” protocol can instead favor models that overfit to aesthetic-leaning prompts while degrading on structured tasks. For image generation we care about the overall quality of every generated image rather than separate high scores on different task sets, so we treat the “same test images” protocol as the primary preference comparison. Fig. 4 in Appendix B makes this concrete: DiffusionOPD’s lead on the separate set does not carry over to the GenEval and OCR test images, because its field-level fusion couples preference quality to the prompt family, whereas Self-OPD stays high on both.
Self-OPD(Ours)
Flow-GRPO
A vast desert landscape under a scorching sun, where a mirage forms the shimmering letters "Water This Way" on the distant horizon, creating an illusion of hope in an otherwise barren and arid environment.
GRPO-Guard
DiffusionNFT
Flow-OPD
Diffusion-OPD

A modern highway scene with a large billboard prominently displaying the text "Gas Next Exit 2 Miles" against a backdrop of rolling hills and clear blue sky.
A close-up of a sleek smartphone screen, prominently displaying a notification that reads "New Message Received", with a subtle background of a blurred, modern desk setting.
A fast food drive-thru menu board at dusk, featuring a bold and colorful advertisement that reads "Try Our New Burger" with an appetizing image of the burger below, set against the backdrop of a busy suburban street.
A realistic photograph of a mountain trail, featuring a weathered wooden signpost with "Summit 12km" carved into it, surrounded by rugged terrain and dense forest, with a hiker's boot visible in the foreground.
Figure 10 Aesthetic quality on OCR prompts. Each method uses its mixed-reward model if available, or its OCR-trained model otherwise (Flow-GRPO, GRPO-Guard). Self-OPD renders the target text accurately while producing more visually appealing scenes with richer backgrounds and realistic details.
B Additional Qualitative Results
Fig. 9 and Fig. 10 visualize the aesthetic quality gap on task-specific prompts, comparing Self-OPD against Flow-GRPO, GRPO-Guard, DiffusionNFT, Flow-OPD, and DiffusionOPD. Under the same test images protocol, Self-OPD attains the highest PickScore and HPSv2 among all methods (Tab. 2); these figures illustrate why. On GenEval prompts (Fig. 9), Self-OPD produces images with richer lighting, more natural textures, and better composition while satisfying the compositional requirements.
As shown in Fig. 10, Self-OPD renders text accurately and simultaneously generates more visually appealing scenes with coherent backgrounds and realistic details, whereas other methods tend to produce flatter or overly simplistic images. Given identical prompts, Self-OPD maintains high aesthetic quality, while DiffusionOPD and the RL baselines exhibit visible degradation, e.g., over-saturation and loss of detail.