DualHeads

Reward-tilted few-step diffusion made simple

1LIX, École Polytechnique, CNRS, IPP 2Inria at Univ. Grenoble Alpes, CNRS, LJK *Equal contribution
Four-step samples from Z-Image-Turbo fine-tuned with DualHeads on HPSv3.

Reward fine-tuning and diffusion distillation
do not fit together naturally.

Multi-step RL

Relies on what distillation removes.

  • Stochastic multi-step rolloutsDDPO, Flow-GRPO
  • A score or velocity fieldDiffusionNFT, AWM, CRD
Few-step methods

Pay for the step limit elsewhere.

  • Reward gradientsLuo (2025)
  • The teacher's score and a fake scoreRTDMD, TDM-R1
  • A flow-map generatorMeanFlowNFT

Both need more than samples and black-box scores.

The first principle of reward fine-tuning.

Raise the reward, stay close to the reference.

𝒥c(θ)=KL(pθ‖pref)−1βEx∼pθ[r(x,c)]

The objective for a prompt c

p∗(x|c)∝pref(x|c)exp⁡(r(x,c)β)

Its minimizer: the reference, tilted by the reward

What is the minimal requirement
for a reward-tilted few-step generator?

  • Scores

    From any black-box reward r(x,c).

  • References

    Prompt-paired images from pref(x|c).

Two classifier heads are enough.

Z-Image-Turbo4 steps
Reference head Dϕ
Reward head Rψ
+ DualHeads4 steps, HPSv3 reward

Each term becomes a classifier.

Reference head Dϕ

Reference image, or generated?

D∗(xt,c,t)=log⁡pref,t(xt|c)pθ,tpred(xt|c)

Its logit is a log density ratio: the KL term.

Reward head Rψ

Which sample of a prompt scores higher?

R∗(xt,c,t)=log⁡p(o=1|xt,c,t)p(o=0|xt,c,t)

Its logit is the log-odds of being optimal: a reward with gradients.

The generator ascends their weighted sum.

s=λDDϕ+λRRψ

The utility the generator maximizes

pt∗(xt|c)∝pref,t(xt|c)exp⁡(λRλDRψ(xt,c,t))

With optimal heads, its optimum: the reference, tilted by the learned reward

One training iteration.

Pipeline of one DualHeads iteration. The generator rolls out from noise without gradient; the endpoint is scored by the reward and re-noised; the generator predicts the clean image in one differentiable step; the prediction is noised and passed through a frozen backbone to a reference head and a reward head; their weighted logits form the utility s, whose gradient flows back to the generator. 𝜖 Generator 𝑓𝜃 𝑇 steps, no gradient ×𝑇 𝑥1 Reward 𝑟 black box labels 𝑦𝑖 one per sample, from group-relative advantages 𝜖′ 𝑥𝑡𝑖 Generator 𝑓𝜃 one step, trainable 𝑥̂1 𝜖 𝑥𝑡 Backbone 𝐹 frozen, shared Reference head 𝐷𝜙 Reward head 𝑅𝜓 BCE: 𝑥ref → 1, 𝑥̂1 → 0 (heads update, generator fixed) BCE: 𝑥1 → soft label 𝑦 𝑠 𝑠 = 𝜆𝐷 𝐷𝜙 + 𝜆𝑅 𝑅𝜓 ∇𝜃 𝑠 through heads, backbone (both held fixed) and 𝑥̂1 Heads and backbone are discarded. Sampling is the plain four-step loop. no gradient differentiable gradient update

Roll out from noise.

Draw K images per prompt with the few-step sampler.
No gradients yet.

xti+1=𝒩ti+1(fθ(xti,c,ti);ϵi+1)
𝒩t(x1;ϵ)=tx1+(1−t)ϵ

With an optimal reference head,
the update is exact.

The reference logit is a log density ratio

Ext∼pθ,tpred[D∗(xt,c,t)]=−KL(pθ,tpred‖pref,t)

so the generator minimizes a KL-regularized reward objective

ℒf,c,t∗(θ)=λDKL(pθ,tpred‖pref,t)−λRExt∼pθ,tpred[Rψ(xt,c,t)]
Proposition 1

The generator update is exactly the gradient of this objective.

∇θℒf,c,t∗(θ)=∇θE[−s(xt,c,t)]

A pathwise gradient through one generator call.
No trajectory likelihood, no policy-gradient estimator.

Experimental setup.

  • Models

    SD3.5‑M and Z‑Image, from their few‑step students.

  • Rewards

    OCR, GenEval, HPSv3, and a three‑score preference mix.

  • References

    Curated base‑model or Nano Banana samples, or Pick‑a‑Pic images.

  • Training

    LoRA rank 32, 24 samples per prompt, four steps, no CFG.

92.5M
head parameters
On SD3.5‑M. Discarded at inference.
≈ 20
H100-hours
One OCR run.
128k
reward queries
Over the same run.

Large gains on all three rewards.

0.51→0.92
OCR accuracy
Text rendering, SD3.5-M
0.61→0.90
GenEval
Composition, SD3.5-M
11.95→13.93
HPSv3
Human preference, Z-Image at 512²

From each run's distilled starting student to four‑step DualHeads.

High task reward without losing image quality.

Text rendering

Composition

  • DualHeads
  • Multi-step RL, 40 to 80 NFE
  • Few-step RL, 4 to 8 NFE
  • Base and distilled models
  • Shaded: better than the base model on both

The best HPSv3 on Z‑Image, at both resolutions.

512²

Z-Image 100 NFE9.03
Z-Image-Turbo 8 NFE11.95
TDM-R1 4 NFE13.33
DualHeads 4 NFE13.93

1024²

Z-Image 100 NFE9.92
Z-Image-Turbo 8 NFE11.23
TDM-R1 4 NFE12.67
DualHeads 4 NFE13.17

HPSv3 on 200 DrawBench prompts. It is also the training reward. Z-Image-Turbo is scored with its native 8-step sampler; the sample pages show it at four steps.

Side by side: text rendering

OCR test prompts. NB pool: Nano Banana references.

Side by side: composition

GenEval test prompts. NB pool: Nano Banana references.

Side by side: Z-Image

DrawBench prompts, trained on HPSv3.

Four steps or two

4 steps
2 steps

Trained with four steps. Sampling with two costs 0.01 on OCR and on GenEval.

The design space of DualHeads.

Pipeline of one DualHeads iteration. The generator rolls out from noise without gradient; the endpoint is scored by the reward and re-noised; the generator predicts the clean image in one differentiable step; the prediction is noised and passed through a frozen backbone to a reference head and a reward head; their weighted logits form the utility s, whose gradient flows back to the generator. 𝜖 Generator 𝑓𝜃 𝑇 steps, no gradient ×𝑇 𝑥1 Reward 𝑟 black box labels 𝑦𝑖 𝜖′ 𝑥𝑡𝑖 Generator 𝑓𝜃 one step, trainable 𝑥̂1 𝜖 𝑥𝑡 Backbone 𝐹 frozen, shared references 𝑥ref Reference head 𝐷𝜙 Reward head 𝑅𝜓 𝑠 𝑠 = 𝜆𝐷 𝐷𝜙 + 𝜆𝑅 𝑅𝜓 ∇𝜃 𝑠 through heads, backbone (both held fixed) and 𝑥̂1 no gradient differentiable gradient update
  • Heads

    Reference, reward, or both.

  • Weight ratio

    λR/λD, reward against reference.

  • Reference pool

    Where the references come from.

  • Starting point

    The generator we fine-tune.

Both heads are needed.

Starting student four-step TDM LoRA0.51
SFT on the references no heads0.10
Reference head only0.71
Reward head only0.00collapses after reaching 0.85
DualHeads both heads0.91

Held-out OCR accuracy on SD3.5-M, same budget in every row.

The weight ratio sets the reward strength.

Held-out OCR reward over training time for four weight settings; a larger reward weight gives higher OCR throughout.
0.86→0.91
OCR accuracy
As the reward weight goes from 2.5 to 25.
0.67→0.62
Diversity (LPIPS)
It falls as the reward weight grows.

The reference pool sets the style.

Samples for ten prompts from generators trained with base-model references and with Nano Banana references.
DualHeads samples. Top: trained with base-model references. Bottom: with Nano Banana references.
0.92→0.92
OCR
The text survives.
5.46→5.62
Aesthetic
More photographic.
0.90→0.73
GenEval
Pick the pool for the task.

It works from every starting point we tried.

0.51→0.91
TDM-SD3.5-M
Public four-step LoRA
0.34→0.93
TensorArt Turbo
Community four-step LoRA
0.01→0.92
No distillation
The base model at four steps

Held-out OCR accuracy on SD3.5-M.

Limitations.

  • Idealized analysis

    Optimal heads and a fixed reward head are assumed. Convergence is not guaranteed.

  • Learned reward

    The generator follows the reward head, errors included.

  • Reference pool

    It sets the style, and can shift reward-relevant content.

A practical simplification.

  • Two classifiers

    One frozen backbone, one utility.

  • Scores and references

    No likelihoods, score field, reward gradients or teacher score.

  • Four steps

    OCR 0.92, GenEval 0.90, the best HPSv3 on Z-Image.

  • Nothing added at inference

    The heads are discarded after training.

BibTeX
@article{zhu2026dualheads,
  title   = {DualHeads: Reward-tilted few-step diffusion made simple},
  author  = {Zhu, Yuanzhi and Tsonis, Eleftherios and Alami Chehboune, Simo
             and Wang, Xi and Lathuili{\`e}re, St{\'e}phane and Kalogeiton, Vicky},
  journal = {arXiv preprint arXiv:2610.28858},
  year    = {2026}
}

Supported by Hi! Paris, ANR/France 2030 (ANR-23-IACL-0005), ANR JCJC “REEL-WORLD” and a Google DeepMind academic gift. Computing by GENCI–IDRIS (2026-AD011014300R3, 2025-A0190616899, 2026-AD011015894R1) and Google Gemini. Thanks to Julie Mordacq and David Loiseaux.

What each family needs

FamilyNeeds from the generatorRewardTeacher or extra modelLearned reward model
Policy-gradient RL DDPO, Flow-GRPO, DanceGRPOtrajectory likelihoodsblack-box––
Forward-process RL DiffusionNFT, AWM, CRD, MeanFlowNFTscore or velocity fieldblack-box––
Reward backpropagation e.g. Luo (2025)–differentiable––
Reward with distribution matching RTDMD, DMDR––teacher score, fake score–
TDM-R1–black-boxteacher score, fake scoreonline
REST–black-boxRL-trained 40-step teacher–
Reward Lightning–preference pairsteacherpretrained, frozen
Classifier guidancescore, multi-step samplerdifferentiable classifier––
DualHeads–black-box–online

DualHeads also needs reference samples and a frozen backbone. Only classifier guidance adds network evaluations at inference.

Visual text rendering

Compositional generation

Z-Image, trained on HPSv3

Multi-reward training

GenEval by category

Which head produces the gains

VariantOCR [95% CI]ΔHPSv3ΔImgRwdΔAes.Diversity
Starting student (TDM-SD3.5-M, 4 NFE)0.511 [0.488, 0.534]–––0.700
DualHeads (two runs)0.903 / 0.914+0.49 / +1.04−0.02 / +0.03−0.13 / −0.030.617 / 0.615
Reference head only (reward weight 0)0.711 [0.697, 0.726]+1.14+0.14−0.130.641
Reference head only, unfiltered pool0.574 [0.557, 0.590]+1.13+0.16−0.130.673
DualHeads, unfiltered pool0.899 [0.892, 0.905]+0.50+0.07−0.100.594
Reward head frozen after warm-up0.916 [0.910, 0.921]+0.44+0.06−0.090.664
Reward head frozen after a short warm-up (100 updates)0.722 [0.708, 0.735]+0.62+0.16−0.100.670
Reward head only (reference weight 0)0.000 (0.847 at step 500)collapsed: the same output for every prompt
SFT on the same references0.102 [0.091, 0.114]−16.32−1.60−0.76n/a
Curated pool itself0.976––––

OCR on 1,018 held-out prompts, mean of the last four EMA checkpoints. Δ: paired difference to the starting student on DrawBench. Diversity: mean pairwise LPIPS over 8 samples per prompt.

Reward weight and early training

(λD,λR)OCRΔHPSv3ΔImgRwdΔAes.LPIPS
Starting student0.511–––0.700
(1, 2.5)0.855+1.27+0.115−0.120.665
(1, 5)0.855+1.20+0.141−0.120.688
(1, 10)0.891+1.41+0.126−0.090.664
(0.5, 5)0.881+1.23+0.127−0.130.646
(1, 25), run 10.903+0.49−0.015−0.130.617
(1, 25), run 20.914+1.04+0.027−0.030.615
(1, 100)0.474−3.67−0.993−0.280.604
(λD,λR), reward headStep 5001,0001,5002,0002,5003,000ΔHPSv3 range
(1, 25), warmed up0.8720.8980.9080.8980.8960.912+0.58 to +1.99
(1, 25), fresh0.4080.6000.7490.8130.8670.889+0.57 to +2.61
(1, 2.5), warmed up0.8060.8000.8250.8150.8540.852+1.37 to +2.44
(1, 2.5), fresh0.3460.4690.5630.7010.7620.814+1.58 to +2.01

Held-out OCR on SD3.5-M. Top: final checkpoints. Bottom: the first 3,000 generator steps.

Other starting students

Starting point (OCR at start)(λD,λR)OCR [95% CI]ΔHPSv3ΔImgRwdΔAes.LPIPS, start → end
TDM-SD3.5-M (0.511)(1, 25), run 10.903 [0.897, 0.910]+0.49−0.015−0.130.700 → 0.617
(1, 25), run 20.914 [0.908, 0.920]+1.04+0.027−0.030.700 → 0.615
TensorArt SD3.5-M Turbo (0.341)(1, 25)0.929 [0.924, 0.934]+2.33+0.263−0.070.660 → 0.673
Random LoRA, i.e. the base model (0.006)(1, 10)0.885 [0.878, 0.893]+1.45*+0.116*−0.09*– → 0.654
(1, 25)0.924 [0.918, 0.929]+1.05*+0.048*−0.12*– → 0.637

Δ: paired DrawBench difference to the run's own starting point; * against the TDM student.

Evidence for Proposition 1.

Its objective is defined on recomputed predictions, not on deployed samples. That gap can be measured.

1.04–1.06
Fréchet-distance ratio at ti≥0.25
1 means no gap to deployed samples.
7.9→2.8–3.3
on the one-step branch, ti=0
The largest gap, and training shrinks it.

Also assumed: optimal heads, and a reward head that stays fixed.

Gap to the deployed sampler

CheckpointFD ratio of xˆ1 recomputed from tiOCR of deployed x1 and of xˆ1 from ti
00.10.250.5x100.10.250.5
Starting student7.882.201.231.020.5110.0020.2630.5220.527
DualHeads, step 1,0003.991.831.131.030.8980.8460.8820.9140.889
DualHeads run 1, final2.781.531.061.040.8910.8300.8760.9000.886
DualHeads run 2, final3.251.491.061.040.9220.8360.8940.9240.924

FD ratio: Fréchet DINOv2 distance of xˆ1 to independent deployed samples, over that between two deployed sets (1 = no gap). 1,018 OCR test prompts.

Training cost

Phase, per generator stepTime (s)SharePeak GiB
Rollouts (4 steps, 64 images per cycle)1.1514%22.9
Reward scoring (PaddleOCR)2.8834%23.4
Reward-head update0.597%23.2
Reference-head update1.1414%23.5
Generator update (through both heads)2.6131%72.5
Total (wall time 9.16 s)8.37100%72.5
Complete run, 8,000 updatesH100-hoursPeak GiB
DualHeads19.872.5
Frozen reward head18.372.2
Reward head only13.271.7
SFT (no heads)10.453.4

OCR configuration on SD3.5-M, one H100. The Z-Image run took 124 H100-hours on four GPUs. Reference pools are built once: about 7.6 H100-hours for OCR, 15 for GenEval.

Where the two heads come from.

  • Reference head

    A GAN discriminator on frozen diffusion features, as in LADD.

  • Reward head

    DiffusionNFT's labels, fit by a classifier that is trained online.

  • Not guidance

    Classifier guidance acts at every sampling step. The heads act only in training.

  • Not REST

    No 40-step teacher trained by RL, and no trajectory likelihoods.

Rewards, heads and configuration.

  • OCR reward

    PaddleOCR against the quoted target w.

    rOCR(wˆ,w)={1,if w is a substring of wˆmax⁡{0,1−dLev(wˆ,w)/|w|},otherwise
  • GenEval reward

    Mask2Former detections, CLIP colors, positions from box centroids. Dense credits in training, official accuracy in tables.

  • Heads

    Four transformer blocks on the 32 × 32 patch grid; 3 × 3 convolutions with FiLM on (c,t); patch logits averaged.

  • Training

    Time grid (0, 0.1, 0.25, 0.5), C=2.5. (λD,λR): (1, 10) OCR, (1, 50) GenEval, (1, 25) otherwise.

Reward statistics of the reference data

SourceAll samplesReferences
PromptsSamplesMean rr = 1r ≤ 0KeptMean rr = 1
OCR
Nano Banana19,62119,6250.6351.9%28.8%61.6%0.9784.3%
Teacher (SD3.5-M, 8 draws per prompt)5,00040,0000.5721.2%20.5%96.8%0.9881.1%
GenEval
Nano Banana33,19950,0000.4758.0%20.2%63.3%0.9381.9%
Teacher (SD3.5-M, 8 draws per prompt)10,00080,0000.4828.8%18.5%92.7%0.9071.2%

A prompt's highest-reward sample is its reference if that reward is at least 0.6 (OCR) or 0.5 (GenEval). The teacher covers 93 to 97% of the prompts, Nano Banana 62 to 63%.