Kaijing Ma

Paper Notes

InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation

Paper Notes

Xingchao Liu, Xiwen Zhang, Jianzhu Ma, Jian Peng, Qiang Liu (UT Austin; Helixon Research)

ICLR 2024 · Notes based on arXiv v2 (March 23, 2024)

arXiv 2309.06380v2 · Author code

Overview: Why reflow makes one-step generation easier

Paper Figure 3: The central mechanism。 Left: The original SD has curved ODE trajectories. The noise-to-image correspondence is tangled and irregular, which gives a poor coupling. Direct distillation into a one-step model produces blurry, low-quality images. Right: Fine-tuning with text-conditioned reflow makes the trajectories straighter and the pairing more regular. Distillation then produces clear images in one step. Prompt: “A dog head in the universe with planets and stars”.
Paper Figure 1: One step versus N steps。 Left: SD iterates from noise for N steps. InstaFlow uses one step, described as “N times faster”. Right: MS COCO 2014 FID-30k is plotted against generation time per image on a logarithmic axis. InstaFlow-0.9B / 1.7B lie near 0.1 s, in the same region as the GAN model StyleGAN-T. SD, Imagen, and eDiff-I take several seconds.

Three main results

  • Reflow is central to successful distillation in the preliminary SD 1.4 experiments (Table 1). Direct SD distillation gives FID-5k 40.9. Reflow followed by distillation gives 31.0. This also improves on one-step progressive distillation at 37.2. Training costs about 24.65 A100 days.
  • At larger scale, performance reaches the GAN regime (SD 1.5, Table 2). InstaFlow-0.9B gives FID-5k 23.4 and FID-30k 13.10 at 0.09 s. InstaFlow-1.7B, with a Stacked U-Net, gives FID-5k 22.4 and FID-30k 11.83 at 0.12 s.
  • 2-Rectified Flow is itself a useful few-step model. With ≤4 steps, it clearly outperforms SD 1.5 + DPM-Solver (Figure 9A). Its latent space also aligns with the one-step model. This supports compatibility with SD ControlNet.

Central idea

InstaFlow turns Stable Diffusion into a one-step text-to-image model through supervised learning alone. Text-conditioned reflow first straightens SD's curved probability-flow ODE and improves the noise ↔ image coupling. Distillation then compresses the straighter ODE into one forward pass. Training has no adversarial component. InstaFlow-0.9B generates a 512×512 image in 0.09 s. Its MS COCO 2014 FID-30k is 13.1, compared with StyleGAN-T at 13.9 and 0.1 s. On MS COCO 2017, its FID-5k is 23.4. The earlier best one-step SD baseline, progressive distillation, gives 37.2. Total training costs 199 A100 GPU days.

Background: The missing large-scale one-step text-to-image model

  • SD sampling is slow. SD is a DDPM in latent space and typically needs more than 100 steps. Post-hoc samplers such as DPM-Solver express sampling through a probability-flow ODE that preserves the marginals. This reduces sampling to about 20 steps. Quality degrades noticeably below 10 steps.
  • Distillation to one step had failed. Progressive distillation compresses SD to 2 to 4 steps, but its one-step FID-5k is 37.2. The authors also describe their direct SD distillation as a “complete failure” (Figure 7).
  • The existing large one-step models in this comparison are GANs. StyleGAN-T and GigaGAN use adversarial training. Both generator and discriminator need careful tuning. Their training costs are 1792 / 4783 A100 days.

The central problem: Why direct distillation fails

  • SD's probability-flow ODE follows curved trajectories. Its map X₀↦ODE[vSD](X₀) gives a poor noise ↔ image coupling. Nearby noise inputs can map to very different images. A student network struggles to imitate this map in one step.
  • Hyperparameter tuning does not resolve the problem. A grid search over 9 learning-rate × weight-decay combinations still gives FID-5k around 44 (Appendix Table 3).
  • Reflow first replaces this coupling with a straighter one that has lower transport cost. The marginal distributions stay unchanged. Distillation follows this change.

Training uses only least-squares regression and LPIPS. It has no GAN loss and needs no real images. The training data consist of text prompts and pairs generated by the teacher model.

Comparison of acceleration approaches

Comparison of acceleration approaches
SD + fast samplerProgressive DistillationStyleGAN-T / GigaGANInstaFlow
Good one-step image quality×× (37.2)✓✓ (23.4)
No adversarial training✓✓×✓
Fine-tuning from SD with reuse of its capabilities✓✓×✓
Training cost (A100 days)0≥108.81792 / 4783199

Parentheses give one-step FID-5k on MS COCO 2017. The PD cost is the authors' estimated lower bound (Appendix C.3). GAN costs come from Section 3.2 of the paper.

1 / 4Notes based on arXiv v2 (March 23, 2024)

Notation, reflow, distillation, and CFG

Notation

The notation follows Liu et al. X₀~π₀ is noise, represented by a Gaussian in SD's 4×64×64 latent space. X₁~π₁ is the image latent. Time runs from t=0 at noise to t=1 at the image.

InstaFlow: Xₜ=(1−t)X₀+tX₁;SD3: zₜ=(1−t)x₀+tε

This convention is the reverse of SD3. Here, t=0 is noise and t=1 is the image. In SD3, t=0 is data and t=1 is noise. The velocity-field direction is also reversed. The two papers therefore use different endpoint conventions.

Other symbols: 𝒯 is the text prompt. D𝒯 is the prompt dataset, a subset of laion2B-en. vₖ is the kth velocity field. ODE[v](X₀|𝒯) is the endpoint obtained by solving the ODE from X₀ to t=1. 𝔻(·,·) is the image-similarity loss, either LPIPS or L2. α is the CFG coefficient.

Rectified flow background (Section 2.2)

ODE generation learns a velocity field v with the following dynamics:

dZₜ/dt=v(Zₜ,t),Z₀∼π₀ → Z₁∼π₁

In the training objective (Equation 2), γ is any coupling of (π₀,π₁). The simplest choice pairs the endpoints independently through π₀×π₁. Xₜ is any differentiable interpolation:

minᵥ E(X₀,X₁)∼γ[∫₀¹ ‖dXₜ/dt−v(Xₜ,t)‖²dt];Xₜ=ϕ(X₀,X₁,t)

DDIM and probability-flow ODEs correspond to particular choices of Xₜ=αₜX₀+βₜX₁, with curved trajectories. Rectified flow uses linear interpolation instead (Equation 3):

Xₜ=(1−t)X₀+tX₁ ⇒ dXₜ/dt=X₁−X₀

Straightness matters because sampling uses the Euler method (Equation 4). The step size is 1/N, with t∈{0,…,N−1}/N:

Zₜ₊₁/N=Zₜ+(1/N)v(Zₜ,t)

For a constant-speed straight trajectory,

Zₜ=tZ₁+(1−t)Z₀=Z₀+t v(Z₀,0)

a single Euler step with N=1 is exact (Figure 4). Straightening trajectories therefore provides a fundamental way to reduce inference cost.

Paper Figure 4: Euler sampling and straight trajectories。 Euler deviates from a curved trajectory, as shown in green. A straight trajectory reaches its endpoint in one step.

Straightness measure:

S(Z)=∫₀¹ E[‖(Z₁−Z₀)−v(Zₜ,t)‖²]dt

A smaller S(Z) means straighter trajectories. S(Z) is 0 when all trajectories are straight.

Method 1: Text-conditioned reflow (Equation 5)

vₖ₊₁=argminᵥ ∫₀¹ Eₓ₀,𝒯 ‖(X₁−X₀)−v(Xₜ,t|𝒯)‖²dt
X₁=ODE[vₖ](X₀|𝒯);Xₜ=tX₁+(1−t)X₀
ODE[vₖ](X₀|𝒯)=X₀+∫₀¹ vₖ(Xₜ,t|𝒯)dt
  • The previous flow vₖ generates an image for each noise-prompt pair. This gives paired endpoints (X₀,X₁). The next field vₖ₊₁ is trained on their linear interpolations with the loss in Equation 2 and the additional text condition 𝒯.
  • The starting point is v₁=vSD. The pretrained SD probability-flow ODE serves directly as the “1-flow”. Thus, 2-Rectified Flow is the result of the first reflow operation. It does not mean two reflow operations.
  • Pair generation can happen offline. ODE[vSD] uses 25-step DPM-Solver with guidance scale 6.0 for SD 1.4 or 5.0 for SD 1.5. A scale of 6.0 oversaturates 2-RF in the latter setting. Each dataset contains 1,600,000 pairs.
# Algorithm 1 (reorganized): Text-conditioned RF training from SD
v[1] = v_SD                    # Pretrained SD
for k in 1, 2, ...:            # A chosen iteration limit
    v[k+1] = copy(v[k])        # Initialization from v_k
    # Pairs may be generated offline
    pairs = [(x0, T, ODE[v[k]](x0|T))]
    for step:
        x0, T, x1 = sample(pairs)
        t = uniform(0, 1)
        xt = t*x1 + (1-t)*x0
        loss = |(x1-x0) - v[k+1](xt, t|T)|^2
        sgd(loss)
# v[k] is called k-Rectified Flow

The original RF theory gives three properties of reflow. (1) ODE[vₖ₊₁] and ODE[vₖ] have the same endpoint distribution. If vₖ generates the correct distribution, vₖ₊₁ does too. (2) Trajectories become straighter and require fewer Euler steps. At a fixed point, vₖ₊₁=vₖ, the trajectories are exactly straight. (3) Transport cost does not increase for any convex function c:

E[c(ODE[vₖ₊₁](X₀|𝒯)−X₀)] ≤ E[c(ODE[vₖ](X₀|𝒯)−X₀)]

The new coupling may therefore be easier for the student network to learn. Reflow keeps the architecture unchanged and only fine-tunes SD's U-Net. The settings are a learning rate of 10⁻⁶, AdamW, EMA 0.9999, gradient clipping at 1, a 1,000-step warm-up, and BF16. The text encoder and VAE decoder remain frozen.

Method 2: Text-conditioned distillation (Equation 6)

Distillation is still useful because exact straightness theoretically requires infinitely many reflow operations. Repeated reflow is expensive and accumulates optimization and statistical errors. After one or two reflow operations, the trajectories are already close to straight. Distillation then uses the following objective:

ṽₖ=argminᵥ Eₓ₀,𝒯 𝔻(ODE[vₖ](X₀|𝒯),X₀+v(X₀|𝒯))

The student learns the one-step Euler map x↦x+v(x|𝒯). Its network time is fixed at t=0. A differentiable image-similarity loss 𝔻 fits the teacher map X₀↦ODE[vₖ](X₀|𝒯). The paper uses LPIPS with AlexNet from the official 0.1.4 implementation. At larger scale, training starts with L2 and then switches to LPIPS.

# Algorithm 2 (reorganized): Distillation of k-RF into a one-step model
v_s = copy(v[k])
pairs = [(x0, T, ODE[v[k]](x0|T))]
for step:
    x0, T, x1 = sample(pairs)
    loss = D(x1, x0 + v_s(x0, t=0|T))
    sgd(loss)
# v_s is called k-Rectified Flow+Distill

Neither adversarial training nor an invertible normalizing-flow network is required.

Reflow and distillation are orthogonal

Distillation faithfully reproduces an existing map, X₀↦ODE[vₖ](X₀|𝒯). If that map is difficult to learn, the student approximation remains poor.

Reflow creates a new map, ODE[vₖ₊₁]. Its lower convex transport cost gives a more regular and smoother correspondence. Formally, reflow is optional before distillation. The two operations do not replace each other. In practice, the authors find that reflow is necessary before successful distillation.

The CFG velocity field (Equation 7)

vᵅ(Zₜ,t|𝒯)=αv(Zₜ,t|𝒯)+(1−α)v(Zₜ,t|NULL)

This field extrapolates text-conditioned RF in the style of classifier-free guidance. α controls the tradeoff between diversity and quality. At α=1, it reduces to the original velocity field. The paper uses α=1.5 when 2-RF generates distillation data.

The two guidance settings have different roles. The SD teacher uses its own guidance scale, 6.0 / 5.0, to generate reflow data. α is the coefficient used when sampling 2-RF.

Connections to the original RF paper and SD3

  • The original Rectified Flow paper (Liu et al., ICLR 2023) comes from the same team and provides the same theory of linear interpolation, reflow, and distillation. It tests small datasets such as CIFAR-10, where one-step 2-RF+Distill reaches FID 4.85. Its 1-RF is trained from scratch with linear interpolation. InstaFlow instead uses SD's probability-flow ODE directly as the 1-flow. It adds text conditioning, the CFG velocity field in Equation 7, large offline pairing datasets, and a Stacked U-Net. The earlier observation that one reflow operation is usually enough also holds here. The 3-RF results are mixed (Table 4).
  • SD3 (Esser et al., 2024) trains a large MM-DiT model from scratch with an RF objective. It studies timestep sampling and architectural scaling. Sampling still uses multiple steps, without reflow or distillation. InstaFlow fine-tunes an existing SD model for one-step generation. SD3 addresses the flow that is trained. InstaFlow addresses the compression of a flow into one step. Their notation uses opposite endpoint conventions (page 2).

Three likely discussion questions

  • Reflow helps distillation despite preserving the distribution. It changes the pairing. The same marginals admit a straighter noise ↔ image map with lower convex transport cost. The student can fit this map more easily.
  • Training needs no real images. D𝒯 contains only prompts, and the teacher ODE generates every X₁.
  • The network time is fixed at t=0. The one-step model calls the network only at the starting point. Distillation therefore uses only t=0.
2 / 4Notes based on arXiv v2 (March 23, 2024)

Preliminary experiments, mechanism evidence, and large-scale comparisons

Preliminary SD 1.4 experiments: Reflow is central (Table 1 and Appendix Tables 4/5)

Evaluation uses 5,000 captions from MS COCO 2017 and follows the PD paper's protocol. Runtime is measured on an A100 with batch size 1. It includes text encoding and decoding.

Preliminary SD 1.4 experiments: Reflow is central (Table 1 and Appendix Tables 4/5)
MethodTimeFID-5k ↓CLIP ↑
Multi-step teachers (25 steps)
SD 1.4 + DPM-Solver0.88s22.80.315
(Pre) 2-RF0.88s22.10.313
(Pre) 3-RF0.88s23.60.309
One step, U-Net (0.9B)
PD-SD (1 step)0.09s37.20.275
SD 1.4 + Distill0.09s40.90.255
(Pre) 2-RF (1 step, no distillation)0.09s68.30.252
(Pre) 2-RF + Distill0.09s31.00.285
(Pre) 3-RF (1 step, no distillation)0.09s37.00.270
(Pre) 3-RF + Distill0.09s29.30.283
Two-step runtime regime (0.12 / 0.13 s)
PD-SD (2 steps)0.13s26.00.297
PD-SD (4 steps)0.21s26.40.300
SD 1.4 + Distill (Stacked)0.12s52.00.269
(Pre) 2-RF + Distill (Stacked)0.12s24.60.306
(Pre) 3-RF + Distill (Stacked)0.12s26.30.307

(Pre) distinguishes these models from the SD 1.5 models in Table 2. PD numbers are read from Figure 10 of its paper because its models were not released. The Stacked U-Net here shares parameters and still has 0.9B parameters.

MS COCO 2014 (30k; images resized to 256 before FID computation)
TimeFID-30k
SD* (numbers from the GigaGAN paper)2.9s9.62
(Pre) 2-RF (25 steps)0.88s13.4
SD 1.4 + Distill (U-Net / Stacked)0.09 / 0.12s34.6 / 41.5
(Pre) 2-RF + Distill (U-Net / Stacked)0.09 / 0.12s20.0 / 13.7

Even though (Pre) 2-RF is undertrained and itself worse than SD, at 13.4 versus 9.62, its distilled student remains much better than direct SD distillation.

Direct-distillation hyperparameter grid (Appendix Table 3, FID-5k)

Direct-distillation hyperparameter grid (Appendix Table 3, FID-5k)
Learning rate / weight decay10⁻¹10⁻²10⁻³
10⁻⁵44.0445.9044.03
10⁻⁶137.05134.83139.31
10⁻⁷~297~297~297

Learning rates ≥10⁻⁴ produce unstable training and NaNs. Rates of 10⁻⁶ and 10⁻⁷ converge slowly and produce blurry images. Each model is trained for 100,000 steps.

Direct distillation versus reflow followed by distillation (Figure 5)

Paper Figure 5: The teacher-student gap。 Left: FID-5k versus inference time. The blue SD result changes from 22.8 to 40.9 after distillation. The orange 2-RF result changes from 22.1 to 31.0. The teacher-student gap is much smaller for 2-RF. Right: With the same noise and prompt, SD+Distill differs greatly from its teacher. 2-RF+Distill nearly reproduces its teacher. The 2-RF teacher is easier to imitate.

Trajectory straightening through reflow (Figure 6)

Paper Figure 6: Trajectory straightness。 Left: log S(Z) falls from about −0.2 for SD to about −3.7 for 2-RF. These values are estimates read from the plot. Right: Random pixel trajectories are visibly curved for SD and close to straight for 2-RF.

Visual comparison of one-step generation (Figure 7)

Paper Figure 7: One-step images。 The columns show N=25, N=1, and +Distill. One-step SD produces only patches of color, and distillation also fails. Objects are already recognizable with one-step 2-RF. Distillation makes its output clear.

Scaling up: Comparison with the state of the art (Table 2, SD 1.5)

(a) MS COCO 2017
MethodTimeFID-5k ↓CLIP ↑
SD 1.5 (25 steps)0.8820.10.318
2-RF (25 steps)0.8821.50.315
0.09 s (one step)
PD-SD (1 step)0.0937.20.275
2-RF (1 step)0.0947.00.271
InstaFlow-0.9B0.0923.40.304
0.12 to 0.21 s
PD-SD (2 steps)0.1326.00.297
PD-SD (4 steps)0.2126.40.300
2-RF (2 steps)0.1331.30.296
InstaFlow-1.7B0.1222.40.309
(b) MS COCO 2014
MethodTypeTimeParametersFID-30k ↓
256×256
DALLEAR-12B27.5
Parti-750M / 3B / 20BAR- / 6.4s / -0.75 / 3 / 20B10.71 / 8.10 / 7.23
Make-A-SceneAR25.0s-11.84
GLIDEDiff15.0s5B12.24
LDMDiff3.7s0.27B12.63
DALLE 2Diff-5.5B10.39
ImagenDiff9.1s3B7.27
eDiff-IDiff32.0s9B6.95
LAFITEGAN0.02s75M26.94
512×512
Muse-3B-1.3s0.5B7.88
StyleGAN-TGAN0.10s1B13.90
GigaGANGAN0.13s1B9.09
SD*Diff2.9s0.9B9.62
2-RF (25 steps)-0.88s0.9B11.08
InstaFlow-0.9B-0.09s0.9B13.10
InstaFlow-1.7B-0.12s1.7B11.83

AR means autoregressive. A hyphen indicates that the paper does not report a value. Parameters and model types follow Table 2 exactly. The original table also lists Muse-3B as 0.5B.

Interpretation

InstaFlow-0.9B and one-step PD have comparable distillation costs, at 108 versus 108.8 A100 days. Their FID-5k values are 23.4 versus 37.2. Within the 0.1 s regime, InstaFlow's 13.10 improves on StyleGAN-T's 13.90. It still trails GigaGAN at 9.09 and 0.13 s, as well as multi-step diffusion models.

Experimental setup (Section 3.1)

The model starts from SD 1.4 and uses batch size 32, 8 A100 GPUs, and AdamW. Direct distillation generates 32×100,000=3,200,000 pairs and trains for 100,000 steps. For a matched training cost, 2-RF trains for 50,000 steps and its student for another 50,000 steps. The distillation dataset contains 32×50,000=1,600,000 pairs. It is generated with 25-step Euler sampling and α=1.5.

3 / 4Notes based on arXiv v2 (March 23, 2024)

Training cost, applications, limitations, and reading checks

Scaling up: Training pipeline and cost (Section 4, Appendix D)

InstaFlow-0.9B starts from SD 1.5. D𝒯 stays unchanged. The teacher still uses 25-step DPM-Solver, but its guidance scale decreases from 6.0 to 5.0. Reflow and distillation each use 1,600,000 generated pairs. Gradient accumulation raises the batch size above 32. Distillation from 2-RF is already good enough, so the authors do not train 3-RF.

Scaling up: Training pipeline and cost (Section 4, Appendix D)
StageBatchIterationsLossA100 days
Data generation (3.2M pairs)1616
Reflow 1 (SD 1.5 initialization)6470,000Eq 511.2
Reflow 2 → 2-RF102425,000Eq 564
Distill 1 (t=0, α=1.5)102421,500L254.4
Distill 2 → 0.9B102418,000LPIPS53.6
Total199.2

The breakdown is reflow 75.2 + distillation 108 + data generation 16. Data generation uses batch size 16. It produces 200,000 pairs in 1 A100 day.

  • InstaFlow-1.7B starts from the same 2-RF teacher. Its student is a Stacked U-Net with 1.7B parameters and no parameter sharing. Distill 1 uses batch size 64, 110,000 steps, L2, and 35.2 days. Distill 2 uses batch size 320, 2,500 steps, LPIPS, and 4.4 days. The total is 39.6 A100 days, outside the reported 199-day cost.
  • For cost conversion, a U-Net at batch size 4 runs for 100,000 L2 steps or 86,000 LPIPS steps in 1 A100 day. The preliminary experiment costs 16+4+4.65≈24.65 A100 days. Comparison costs are 6250 for SD 1.4 training from scratch, 1792 for StyleGAN-T, 4783 for GigaGAN, and at least 108.8 for one-step PD.
Paper Figure 12(c), Appendix B: Stacked U-Net。 Two U-Nets in sequence reduce the distillation loss substantially and improve image quality, but double the U-Net runtime. Figure 12b gives 0.08 s for this U-Net portion. Removing the intermediate Out + In blocks reduces it to 0.07 s. A single U-Net takes 0.04 s. Blocks with the same color can share weights.

The ablation removes downsampling blocks or upsampling blocks from U-Net 1 / 2. It also tests removal of the intermediate In+Out blocks. Only removal of the intermediate In+Out blocks preserves performance. End-to-end time falls from 0.13 to 0.12 s, a 7.7% saving.

  • The 0.09 s total consists of text encoding at 0.01 s, U-Net computation at 0.04 s, and latent decoding at 0.04 s. NSFW detection is excluded.
  • The 2-step PD model has a similar runtime, but 2-step PD must also fit the model at t=0.5. This may be unnecessary for one-step generation. Treating two U-Nets as one model also allows redundant intermediate modules to be removed.

Few-step generation and guidance (Figure 9)

Paper Figure 9: Step count and guidance。 (A) The tested step counts are N∈{1,2,4,8}. At N≤4, 2-RF with standard Euler sampling clearly improves both FID-5k and CLIP over SD 1.5 + DPM-Solver. (B) α increases from 1.0 to 4.0 in increments of 0.5. FID-5k and CLIP both increase. Image quality worsens while text alignment improves.
Paper Figure 15: Few-step sampling with the same seed。 With the same seed, SD 1.5 + DPM-Solver produces blurry images at N≤2. The 2-RF image is already clear at N=1.

Guidance creates a tradeoff (Appendix Figure 16). At α=1.0, edges are blurry and details are distorted. At α≥2.0, oversaturation becomes increasingly visible. The paper uses 1.5.

Applications (Section 4, Appendix E)

Paper Figure 8: Prompt changes。 InstaFlow-0.9B generates each image in one step. With the noise fixed, prompt changes such as + red bow tie, + in heavy snow, and oil painting preserve pose and lighting.
Paper Figure 8: Latent interpolation。 InstaFlow-0.9B produces smooth interpolations in latent space.
  • Fast previews use one-step generation at 512×512, taking about 0.1 s. The result is interpolated to 1024 and refined with SDXL-Refiner (Figure 10). The same budget then allows many more seeds to be previewed before refinement.
  • The latent spaces align. For the same noise and prompt, the 0.9B / 1.7B one-step models produce nearly the same images as 25-step 2-RF (Figure 17). The one-step model can serve as a proxy for studying the continuous flow's latent space.
  • Encoding and reconstruction use 2-RF in both directions. The reverse ODE maps an image to noise. The forward ODE reconstructs the image:
X₀=X₁+∫₁⁰ v(Xₜ,t)dt(encode)
X̂₁=X₀+∫₀¹ v(Xₜ,t)dt(decode)
  • Both encoding and decoding use Euler sampling. Reconstruction succeeds with 4 steps. Because 2-RF is straighter, encoding can even use 1 step (Figure 26).
  • InstaFlow unexpectedly works directly with ControlNet models pretrained for SD. These include pose, depth, and edge conditioning (Figure 27). This suggests that the one-step model largely preserves SD's feature space.

Limitations (Section 5)

Paper Figure 11: A compositional-prompt failure。 For “A dog and a cat shake hands with each other”, InstaFlow-0.9B on the left fails to render the dog properly and does not show a handshake. SD 1.5 + DPM-Solver on the right succeeds.

Complex compositional prompts remain a weakness. The authors suggest that longer training and more data could help. Appendix D notes that 2-RF has not fully converged. Distillation converges faster than reflow, and switching to LPIPS improves image quality immediately. Image quality still trails GigaGAN and multi-step SD.

Questions covered by the note

1. Failure of direct SD distillation. The curved PF-ODE gives an irregular noise ↔ image map. FID-5k remains ≥40 after the grid search.

  • 2. Reflow's contribution to distillation. The distribution stays unchanged, but the pairing becomes straighter and its convex cost decreases. The teacher-student FID change narrows from 22.8 → 40.9 to 22.1 → 31.0.
  • 3. The meaning of “2” in 2-RF. v₁=vSD, and one reflow operation produces v₂.
  • 4. The reason for using only one reflow operation. Repeated reflow is expensive and accumulates errors. The 3-RF results worsen for 25-step sampling and Stacked distillation. Its learning rate also has to decrease to 10⁻⁷.
  • 5. The source of the 199-day total. 16+11.2+64+54.4+53.6=199.2. The 1.7B model adds 39.6 days.
  • 6. The advantage over PD. At comparable distillation cost, one-step FID is 23.4 versus 37.2. The 1.7B model reaches 22.4 in 0.12 s. This improves on 2-step PD at 26.0 and 0.13 s.
  • 7. The choice of α. Larger α raises both CLIP and FID. α=1.5 provides the compromise.
  • 8. The need for real images. Training needs only the prompt dataset D𝒯.
  • 9. One-step 2-RF without distillation. Its FID-5k is 47.0 for SD 1.5 and 68.3 for SD 1.4. Two-step 2-RF gives 31.3. Distillation remains the necessary final step.
  • 10. The L2-to-LPIPS training sequence. Appendix D specifies this pipeline. The authors observe an immediate image-quality improvement after the switch to LPIPS. The L2 stage accounts for about half the distillation cost, at 54.4/108.
  • 11. The 1.7B model's 39.6-day cost. It starts directly from the 2-RF teacher already trained in the 0.9B pipeline and only adds distillation. The paper does not specify whether data-generation cost is counted separately.
  • 12. The difference from GAN training. There is no discriminator or minimax objective. Training regresses toward a fixed target and remains stable. One-step quality is nevertheless limited by the 2-RF teacher.
  • 13. The evidence in Figure 6. Reflow sharply reduces S(Z), and pixel trajectories approach straight lines. This is the condition that makes one-step Euler sampling useful.

Terminology

Terminology
TermMeaning
π₀ / π₁Noise distribution / image-latent distribution
CouplingThe pairing between noise and images; this is what reflow changes
vSD=v₁SD's probability-flow ODE, solved with 25-step DPM-Solver, serves as the 1-flow
k-RFvₖ; 2-RF is the model after one reflow operation
k-RF + DistillThe distilled one-step model ṽₖ
PDProgressive Distillation (Meng et al. 2023)
Stacked U-NetA student with two U-Nets in sequence and the intermediate In/Out blocks removed
αThe CFG coefficient for text-conditioned RF (Equation 7), with a default of 1.5
4 / 4Notes based on arXiv v2 (March 23, 2024)

Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.