Looped transformers reuse one block of shared weights along the depth of the network. Recent looped diffusion transformers are trained from scratch, which repeats the full pretraining cost although strong pretrained non-looped diffusion transformers exist. We propose Distill to Loop (Dooop), which distills a pretrained non-looped diffusion transformer into a looped student whose blocks are initialized from the teacher's. We cast distillation as a fixed-point iteration toward the teacher, in which the output after every loop is trained toward the teacher, and each loop is one step of an ordinary differential equation in depth. As a result, one model runs any number of loops at test time without retraining, and the higher-order ODE solvers of diffusion model sampling can be applied along the depth dimension for better results. Meanwhile, because a looped model produces an output after every loop, we also construct loop guidance between the outputs of different loop counts, which improves the generated samples at little extra compute. On SD3-medium, a looped student with about 37% of the teacher's parameters matches the teacher on average over GenEval, ImageReward, PickScore and HPSv2.1 with two to four loops, and with two loops it uses about 58% of the teacher's compute. And on a four-step SD3-medium, loop guidance raises the average of the four metrics from 88.2 to 99.2.
Figures & tables
Figure 2: Training pipeline of Dooop . (a) The looped student is initialized from the frozen non-looped teacher. (b) Each training batch mixes noisy data states with rollout states, which are sampled with vroll of Eq. 9 and regenerated at every training step; vcfgT is the teacher velocity with classifier-free guidance. (c) Each round combines the previous hidden state and the output of the looped blocks with weights 1−Δsk and Δsk , where Δsk=sk−sk−1 . All rounds share Rθ , conditioned on sk , and all per-loop outputs share Q . The output after every round is regressed to its per-round target of Eq. 5 , which mixes the stop-gradient previous output and vT with weights 1−ak and ak , where ak=1−sk−1sk−sk−1 , so the last target is vT itself, and the output vθ(0) before the first round is regressed to vT with weight λ0 .
Figure 2
Figure 3: Samples of the SD3-medium teacher and of Dooop with K=1,2,3,4,8,16 loops on one GenEval prompt from each of the six categories. All images in a row start from the same initial noise.
GenEval [ 16 ] ↑
Model
TFLOPs
Rounds
Single obj.
Two obj.
Counting
Colors
Position
Color attr.
Overall
Image- Reward [ 45 ] ↑
Pick- Score [ 22 ] ↑
HPS- v2.1 [ 44 ] ↑
Avg. (%) ↑
SD3-medium [ 10 ] (teacher)
50.5
–
0.994
0.753
0.506
0.840
0.285
0.508
0.648
0.908
22.214
0.278
100.0
Distill
Dooop (Ours)
18.9
1
0.988
0.737
0.322
0.811
0.248
0.428
0.589
0.663
21.790
0.259
88.8
Dooop (Ours)
29.4
2
0.991
0.838
0.456
0.856
0.288
0.535
0.661
0.924
22.245
0.275
100.7
Dooop (Ours)
39.9
3
0.984
0.813
0.466
0.843
0.270
0.550
0.654
0.933
22.307
0.276
100.9
Table 1: Text-to-image generation with SD3-medium as the teacher. Best student result of each part in bold.
Depth solver of Dooop
Euler
Heun [ 19 ]
DPM++ [ 30 ]
Teacher
K=2
K=4
K=8
K=2
K=4
K=2
K=4
Sampler
Steps
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
Gen- Eval ↑
Image- Reward ↑
GFLOPs/NFE
1802.6
1049.8
1802.7
3308.4
1426.2
2931.9
1049.8
1802.7
Euler
10
0.535
0.449
0.595
0.656
0.605
0.650
0.591
0.585
0.587
0.618
0.568
0.544
0.616
0.703
0.579
0.588
25
0.626
0.882
0.660
0.911
0.658
0.935
0.638
0.897
0.633
0.909
0.644
0.869
0.665
0.957
0.648
0.899
Table 2: GenEval and ImageReward of the SD3-medium teacher and of Dooop for each time sampler (rows) and each depth solver of the loop with K loops (columns). The italic row gives the GFLOPs of one function evaluation (NFE), so the compute per sample is the number of NFEs times this value. Bold marks the highest value among the Dooop columns in each row for each metric. Darker cells are better within each row and metric.
Figure 4: GenEval, ImageReward, PickScore and HPSv2.1 of Dooop on SD3-medium with K=2,3,4 loops during training. The dotted line marks the teacher.
Method
Params
Train samples
FID ↓
IS ↑
ELT 4N×8L [ 17 ]
271M
256M
3.96
–
Looped (from scratch)
246M
77.3M
12.573
72.560
+ init. from teacher
246M
77.3M
6.313
147.937
+ distillation ( Dooop )
246M
77.3M
3.785
221.573
Table 3: Comparison with looped models trained from scratch and cumulative ablation of Dooop on ImageNet 256×256 class-conditional generation. Best result in bold.
Setting
wl
NFE
TFLOPs
Gen- Eval ↑
Image- Reward ↑
Pick- Score ↑
HPS- v2.1 ↑
Avg. ↑
Teacher
–
4
7.21
0.651
1.026
22.822
0.298
100.0
Student
1
4
7.21
0.592
0.739
22.381
0.273
88.2
Weak model (separate k -loop forward)
k=1
2
8
9.90
0.639
0.941
22.568
0.290
96.5
k=1
3
8
9.90
0.636
0.975
22.416
0.295
97.5
k=2
3
8
11.41
0.627
0.907
22.540
0.288
95.0
Table 4: Loop guidance on the CDM-distilled four-step SD3 student. The teacher is the four-step CDM model. The weak model is a separate forward with k loops or the output after loop k of the same K=4 forward. Best student result in bold.
ImageNet (SiT)
Text-to-image (SD3)
Data : rollout
gFID ↓
FD ↓
GenEval ↑
Image- Reward ↑
Pick- Score ↑
HPSv2.1 ↑
1:0
8.917
305.729
0.658
0.901
22.354
0.276
2:1
9.275
321.364
0.659
0.919
22.312
0.276
1:2
9.559
323.307
0.655
0.910
22.293
0.276
0:1
11.509
359.354
0.641
0.903
22.233
0.274
Table 5: Analysis of rollout ratio in each training batch, at 100k training steps and K=4 . Best result in each column in bold.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
SiT-XL/2
SD3-medium
Z-Image
Teacher blocks / parameters
28 / 675M
24 / 2.03B
30 / 6.15B
Resolution
256
512
512
Input / looped / output blocks
2 / 6 / 2
2 / 5 / 2
3 / 6 / 3
Trainable parameters
246.2M
0.756B
2.90B
Training loops K
4
4
4
Training data
ImageNet-1k train
COCO 2017 train
COCO 2017 train
Appendix
Table S1: Training hyperparameters of the three students.
Figure S1 : Loop guidance at one sampling step of the four-step Dooop student, which is sampled without CFG, so only the conditional branch is used. (a) The strong prediction vθ(K)(x,t,c) is the output of Q after round K of the K -loop forward. The weak prediction vweak(x,t,c) is the output vθ(k) after round k of the same forward, which costs one extra application of Q . The dashed path shows the alternative, a separate forward with k loops on its own grid sj=kj that outputs vθ[k] . (b) For w=1 , Eq. 11 reduces to vlg=vθ(K)(x,t,c)+(wl−1)(vθ(K)(x,t,c)−vweak(x,t,c)) with the loop guidance scale wl>1 , and the sampler moves xt to the next noise level with vlg ; wl=1 recovers plain sampling. All rounds share Rθ and all per-loop outputs share Q .
Figure 12
Setting
w
wl
TFLOPs
Gen- Eval ↑
Image- Reward ↑
Pick- Score ↑
HPS- v2.1 ↑
Avg. (%) ↑
Teacher
7
–
50.5
0.648
0.908
22.214
0.278
100.0
Dooop
1
1
50.5
0.201
− 1.160
19.584
0.198
15.6
Dooop
1
1.5
54.5
0.260
− 0.802
20.026
0.214
29.7
Dooop
1
2
54.5
0.303
− 0.568
20.349
0.226
39.2
Dooop
1
3
54.5
0.335
− 0.360
20.599
0.236
47.4
Dooop
4.5
1
50.5
0.632
0.788
22.074
0.268
95.0
Appendix
Table S2: The SD3 student (the Distill checkpoint of Tab. 1 , K=4 ) at three CFG scales, with and without loop guidance whose weak model is the output after loop 2 of the same forward. Bold marks the best value within each CFG scale.
Method
Mean loops
TFLOPs
Gen- Eval ↑
Image- Reward ↑
Pick- Score ↑
HPS- v2.1 ↑
Avg. (%) ↑
Teacher
–
50.5
0.648
0.908
22.214
0.278
100.0
Fixed, K=2
2
29.4
0.662
0.922
22.243
0.275
100.7
Fixed, K=4
4
50.5
0.654
0.921
22.310
0.276
100.5
Looped-DiT exit gate [ 6 ]
τ=0.015
2.01
29.5
0.553
0.529
21.476
0.246
82.2
Exit gate with a finishing round
Appendix
Table S3: Choosing the number of loops per sampling step or per sample on the SD3 student, compared with fixed loop counts. Bold marks values above the teacher’s, except in the fixed rows.
Figure S2 : GenEval, ImageReward, PickScore and HPSv2.1 of Dooop on SD3-medium during continued training on real data. The first point is the distilled student, and the dashed line marks the teacher.
Depth solver of Dooop
Euler
Heun
DPM++
Teacher
K=2
K=4
K=8
K=2
K=4
K=2
K=4
Sampler
Steps
gFID ↓
FD ↓
gFID ↓
FD ↓
gFID ↓
FD ↓
gFID ↓
FD ↓
gFID ↓
FD ↓
gFID ↓
FD ↓
gFID ↓
FD ↓
gFID ↓
FD ↓
GFLOPs/NFE
237.2
135.6
237.3
440.6
186.4
389.8
135.6
237.3
Euler
10
9.897
230.846
11.657
347.916
10.112
278.935
9.859
262.406
9.299
249.253
9.484
247.111
9.317
276.981
9.768
260.166
25
5.443
163.411
7.412
278.992
6.535
215.101
6.331
204.240
6.479
190.673
6.330
188.463
6.558
215.624
6.449
199.244
Appendix
Table S4 : gFID and FD-DINOv2 on ImageNet of the SiT-XL/2 teacher and of Dooop for each time sampler (rows) and each depth solver of the loop with K loops (columns). The italic row gives the GFLOPs of one function evaluation (NFE), so the compute per sample is the number of NFEs times this value. Bold marks the lowest value among the Dooop columns in each row for each metric. Darker cells are better within each row and metric. The Heun sampler [ 19 ] uses two function evaluations per step. DPM++ is DPM-Solver++ [ 29 , 30 ] .
Depth solver of Dooop
Euler
Heun
DPM++
Teacher
K=2
K=4
K=8
K=2
K=4
K=2
K=4
Sampler
Steps
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
Pick- Score ↑
HPS- v2.1 ↑
GFLOPs/NFE
1802.6
1049.8
1802.7
3308.4
1426.2
2931.9
1049.8
1802.7
Euler
10
21.495
0.252
21.804
0.257
21.868
0.258
21.813
0.256
21.685
0.260
21.721
0.256
21.830
0.261
21.740
0.256
25
22.177
0.277
22.220
0.275
22.317
0.277
22.271
0.275
22.135
0.278
22.222
0.275
22.252
0.278
22.206
0.275
Appendix
Table S5 : PickScore and HPSv2.1 of the SD3-medium teacher and of Dooop for each time sampler (rows) and each depth solver of the loop with K loops (columns). The italic row gives the GFLOPs of one function evaluation (NFE). Bold marks the highest value among the Dooop columns in each row for each metric. Darker cells are better within each row and metric.
GenEval [ 16 ] ↑
Model
Rounds
Single obj.
Two obj.
Counting
Colors
Position
Color attr.
Overall
Image- Reward [ 45 ] ↑
Pick- Score [ 22 ] ↑
HPS- v2.1 [ 44 ] ↑
Avg. (%) ↑
Z-Image [ 50 ] (teacher)
–
0.994
0.861
0.641
0.854
0.347
0.535
0.705
0.947
22.742
0.286
100.0
Distill
Dooop (Ours)
1
0.991
0.765
0.466
0.830
0.400
0.557
0.668
0.847
22.156
0.275
94.4
Dooop (Ours)
2
0.997
0.833
0.553
0.854
0.412
0.613
0.710
0.991
22.468
0.283
100.7
Dooop (Ours)
3
0.994
0.876
0.566
0.867
0.380
0.652
0.723
1.023
22.547
0.285
102.3
Appendix
Table S6: Text-to-image generation with Z-Image as the teacher. Best student result of each part in bold.
Figure S3 : More samples of the SD3-medium teacher and of Dooop with K=1,2,3,4,8,16 loops on GenEval prompts. All images in a row start from the same initial noise.
Figure S4 : More samples of the SD3-medium teacher and of Dooop with K=1,2,3,4,8,16 loops on GenEval single-object prompts. All images in a row start from the same initial noise.
Figure S5 : More samples of the Z-Image teacher and of the Dooop student continued with student rollout, with K=1 to 6 loops on GenEval prompts. All images in a row start from the same initial noise.
Figure S6 : More samples of the Z-Image teacher and of the Dooop student continued with new data, with K=1 to 6 loops on GenEval prompts. All images in a row start from the same initial noise.
Diffusion Transformers use attention-based networks to generate and transform images, video, audio, and other structured data through iterative denoising.