Introduction
Turning a bidirectional video diffusion model into a real-time streaming generator is done in stages [1, 2]. The model is first adapted to causal, frame-by-frame generation, giving a multi-step autoregressive (AR) diffusion model; a few-step student is then initialized from it; and a distribution-matching stage usually refines the student. In this task the first stage is given, the third is not run, and the question is the second one: how should the multi-step AR teacher supervise the few-step student, under a fixed compute budget, so that the student samples well with very few denoising steps per frame? The starting point is weak: the Stage-1 model used directly with few steps reaches 69.66 on VBench Quality Score, 4 steps per frame (480x832, 33 frames) and 64.59 on VBench Quality Score, 1 step per frame (480x832, 81 frames).
Two facts about the problem shape what a good answer has to do.
The regression target must be a function of the input. The usual initialization is ODE distillation: run the teacher's probability-flow ODE from noise, and train the student to map the noisy states on that trajectory straight to the trajectory's endpoint with a mean-squared error. That recovers the teacher's flow map only if each noisy frame determines a unique clean frame. Causal Forcing [2] shows that this frame-level injectivity fails when the teacher is bidirectional and the student is causal, so that the regression collapses to a blurry conditional expectation, and that an AR teacher restores it. Later work makes few-step AR distillation more scalable [3], gives a unified teacher-forcing and self-forcing recipe for it [4], targets stable one-step generation [5], and distils flow maps that serve any number of steps [6].
The student's context at generation time is its own output. Apart from the on-policy distillation of AnyFlow, these initializations train with teacher forcing: when the student denoises frame , it attends to the ground-truth frames . When it generates, it attends to frames it produced itself, with their errors, and those errors compound over the rollout. This train-test gap is what Self Forcing [7] and the self-forcing stage of Causal-rCM [4] address with on-policy training, but in the pipeline that is the job of Stage 3, which does not run here. Whatever the initialization does about exposure bias is all the student gets.
Method
Our method, SCOD (self-context ODE distillation), keeps the causal ODE distillation of Causal Forcing [2] (same teacher, same ODE grid, same retained states, same optimizer) and changes what the student is conditioned on, which states it is trained on, how the levels are weighted, how the budget is spent, and which weights are exported.
Self-context teacher trajectories
For a prompt , we draw noise for every latent frame and let the frame-wise teacher integrate its classifier-free-guided ODE (guidance scale 6.0) frame by frame, in 48 Euler steps on the grid with shift 5. The difference from causal ODE distillation is what the teacher's key-value cache holds once a frame is finished: not the ground-truth frame but the endpoint the teacher just generated,
where is the 48-step guided ODE solve conditioned on the cached history. The clip
is therefore a sample of the teacher's own autoregressive
rollout, and it is used twice: as the regression target, and as the clean context the student sees.
Along the way we keep, for every frame, the states at ODE steps ,
where is the initial noise. With the shift-5 warp
of the linear grid , these four steps sit at
, which match the four noise levels of the student's
sampler that the code records in its comment on self.sigmas, so every training input is a state the teacher
actually passed through at a level the student will be asked to denoise.
def gen_self_traj(gen, clean_latent, paired, noise, keep):
"""Blockwise-KV teacher ODE rollout whose KV cache is updated with the GENERATED frame
(self-context), not the GT frame. Returns stacked [noise, s12, s24, s36, endpoint]."""
model, sch = gen.model, gen.scheduler
nf = clean_latent.shape[1]
fsl = (clean_latent.shape[-2] // 2) * (clean_latent.shape[-1] // 2)
kv = gen._make_kv_cache(batch_size=2, device=clean_latent.device)
ca = gen._make_crossattn_cache(batch_size=2, device=clean_latent.device)
sel = {i for i in keep if 0 <= i < gen.num_inference_steps}
snaps = {i: torch.empty_like(clean_latent) for i in sel}
final = torch.empty_like(clean_latent)
for b in range(nf):
cs = b * fsl
blat = noise[:, b:b + 1].clone()
for si, t in enumerate(sch.timesteps):
if si in sel:
snaps[si][:, b:b + 1] = blat
ts = t * torch.ones([1, 1], device=blat.device, dtype=torch.float32)
flow = gen._batched_cfg_step(blat, paired, ts, kv_cache=kv, crossattn_cache=ca, current_start=cs)
blat = sch.step(flow.flatten(0, 1), ts.flatten(0, 1), blat.flatten(0, 1)).unflatten(0, flow.shape[:2])
final[:, b:b + 1] = blat
# self-context: cache the GENERATED endpoint
gen._update_clean_cache(blat, paired, kv, ca, cs)
out = [snaps[i] for i in sorted(sel)] + [final]
return torch.stack(out, dim=1)The ground-truth latents of the training set are used only for their shape: SCOD learns from the training prompts and from the teacher, and never regresses toward a recorded video. Trajectories are generated until 0.43 of the compute budget is spent (or the training prompts run out), the data-to-compute split we took over from the causal ODE baseline; the rest goes to regression.
target = TRAJ_SHARE * ctx.meter.budget
order = ctx.data.next_indices(ctx.data.n)
k = 0
while ctx.meter.units < target and k < len(order):
i = order[k]
clean = ctx.data.latents([i])
paired = merge_cfg_prompt_embeds(ctx.data.cond([i]), ctx.data.uncond(1))
noise = torch.randn_like(clean)
with torch.autocast("cuda", dtype=torch.bfloat16):
if CONTEXT == "self":
traj = gen_self_traj(gen, clean, paired, noise, [0, 12, 24, 36, -2])
# traj: [1,5,F,C,H,W] = noise,s12,s24,s36,endpoint ; context = endpoint
rec = torch.cat([traj, traj[:, -1:]], dim=1)[0] # [6,F,C,H,W] last = self context
else:
traj = gen.generate(clean_latent=clean, paired_conditional_dict=paired,
trajectory_indices=KEEP, generation_mode="blockwise_kv",
initial_noise=noise)
rec = traj[0] # [1,6,...] last = GT
self.pairs.append((i, rec.to(torch.float16).cpu()))
k += 1Injective regression with the top level weighted
Each optimizer step takes one stored clip. For every frame we draw an index uniformly from independently per frame, feed the student the retained ODE state at that index and the matching timestep , give it as clean context through the teacher-forcing forward, and regress its clean prediction onto the teacher's endpoint:
with the size of a latent frame. Because the input is a state on the teacher's own ODE trajectory and the target is that trajectory's endpoint, the input determines the target: this is the injective regression of Causal Forcing [2], now carried out under the history the generator will actually produce. The weight of 2 on the pure-noise level (, where the input is itself) reflects that a one-step sampler uses nothing but this map, and that a two-step sampler leans on it; the weighted per-frame errors are averaged, not normalised by the sum of the weights.
L = len(self.step_list)
for _ in range(self.batch):
di, traj = random.choice(self.pairs)
ode = traj[None].to(ctx.device, torch.bfloat16) # [1,6,F,C,H,W]
Fn = ode.shape[2]
endpoint = ode[:, 4] # x0*
clean = ode[:, 5] # context clip (gt or self)
if PER_FRAME_T:
j = torch.randint(0, L, [1, Fn], device=ctx.device)
else:
j = torch.full([1, Fn], random.randrange(L), device=ctx.device, dtype=torch.long)
sig = self.sigmas[j] # [1,Fn]
t = self.step_list[j] # [1,Fn]
s5 = sig[:, :, None, None, None]
if INPUT == "ode":
noisy = torch.gather(ode[:, :L], 1, j.reshape(1, 1, Fn, 1, 1, 1).expand(
-1, -1, -1, *ode.shape[3:])).squeeze(1)
else:
if INPUT == "chord":
eps = ode[:, 0] # original trajectory noise
else: # renoise
eps = torch.randn_like(endpoint)
# at sigma==1 use ODE coupling (the stored noise); else forward-noise endpoint
top = (sig >= 0.999).float()[:, :, None, None, None]
eps = top * ode[:, 0] + (1 - top) * eps
noisy = ((1 - s5) * endpoint.float() + s5 * eps.float()).to(torch.bfloat16)
_, pred = self.student(noisy, ctx.data.cond([di]), t, clean_x=clean)
per_frame = ((pred.float() - endpoint.float()) ** 2).mean(dim=(2, 3, 4)) # [1,Fn]
w = torch.tensor(T_WEIGHTS, device=ctx.device, dtype=torch.float32)[j] # [1,Fn]
loss = (per_frame * w).mean()
(loss / self.batch).backward()
tot += loss.item()
gn = self.student.clip_grad_norm_(CLIP)
self.opt.step()
self.n_steps += 1
self._ema_track()
return {"loss": tot / self.batch, "grad_norm": float(gn)}One clip per update
How the regression budget is grouped into optimizer steps turns out to matter. Every clip visit costs the same, so a fixed budget buys a fixed number of visits whatever the batch size; the batch decides only how many of them are averaged into each update. The causal ODE baseline sizes its batch so that the remaining budget is spent in a fixed number of optimizer steps, which at a larger budget means larger batches rather than more updates. We use a batch of one clip, which gives the largest number of updates for the same exposure to data. The optimizer is the baseline's: AdamW with learning rate 2e-6, betas (0.9, 0.999), weight decay 0.01 and gradient-norm clipping at 10.
self.sigmas = (self.step_list / 1000.0).float() # [1,.9375,.8333,.625]
# A fixed compute budget buys a fixed number of regression clip-visits (3 units each), independent
# of batch. Batch only groups those visits into optimizer steps, so batch=1 maximizes the number of
# gradient updates for the same data exposure -> fastest convergence (no larger-batch step cap).
self.batch = 1
self.pairs = []
self.template = ctx.stage1_state_dict()
self.shadow = None
self.n_steps = 0Exported weights
We export an exponential moving average of the student, , started from a copy of the weights at the 200th optimizer step; if fewer than 201 steps have been taken, the raw weights are exported instead.
def _ema_track(self):
if EMA > 0 and self.n_steps >= EMA_START:
if self.shadow is None:
self.shadow = {_clean(n): p.detach().float().clone() for n, p in self.student.named_parameters()}
else:
with torch.no_grad():
for n, p in self.student.named_parameters():
self.shadow[_clean(n)].mul_(EMA).add_(p.detach().float(), alpha=1 - EMA)
def export(self):
if EMA > 0 and self.shadow is not None and self.n_steps > EMA_START:
out = dict(self.template)
out.update({k: v.detach().cpu() for k, v in self.shadow.items()})
return out
return self.ctx.student_state_dict()The configuration is collected in the module constants. Several branches in the file are switched off by them and are not part of the scored method: the ground-truth-context, fresh-noise and chord input modes, a shared-level option, a batched regression path, and an on-policy refresh that would replace stored clips with teacher trajectories conditioned on the student's own rollout.
# ---- ablation flags ----
CONTEXT = "self"
INPUT = "ode"
PER_FRAME_T = True # per-frame random eval timestep vs uniform
TRAJ_SHARE = 0.43
LR, BETAS, WD, CLIP = 2e-6, (0.9, 0.999), 0.01, 10.0
CFG, ODE_STEPS, SHIFT = 6.0, 48, 5.0
KEEP = [0, 12, 24, 36, -2, -1]
EMA = 0.99
EMA_START = 200
T_WEIGHTS = [2.0, 1.0, 1.0, 1.0]
REFRESH_INTERVAL = 0 # 0 = off; else every N steps refresh REFRESH_N bank entries on-policy
REFRESH_N = 1
BATCHED = FalseResults
| Method | ① | ② | ③ | ④ |
|---|---|---|---|---|
| VBench Quality Score ↑ | VBench Quality Score ↑ | VBench Quality Score ↑ | VBench Quality Score ↑ | |
| Qwen4-Max | 82.51 | 80.67 | 78.01 | 73.51 |
| No initialization | 69.66 | 67.05 | 65.92 | 64.59 |
| Bidirectional ODE | 75.11 | 71.70 | 71.03 | 67.27 |
| Causal ODE | 82.99 | 80.83 | 77.44 | 70.63 |
| Rectified-trajectory causal ODE | 80.89 | 76.32 | 73.41 | 67.57 |
| Causal consistency distillation | 83.13 | 81.61 | 79.48 | 73.28 |
| Teacher-forcing dCM | 82.80 | 81.80 | 80.48 | 76.85 |
| Teacher-forcing sCM | 82.73 | 80.89 | 78.80 | 72.57 |
| Causal DMD | 84.08 | 78.10 | 81.04 | 80.39 |
| AnyFlow | 80.99 | 77.56 | 74.49 | 70.08 |
- ① VBench Quality Score, 4 steps per frame (480x832, 33 frames)
- ② VBench Quality Score, 4 steps per frame (480x832, 81 frames)
- ③ VBench Quality Score, 2 steps per frame (480x832, 81 frames)
- ④ VBench Quality Score, 1 step per frame (480x832, 81 frames)
SCOD is a modification of the causal ODE initialization, so that baseline is the comparison that measures our changes. SCOD is ahead of it on VBench Quality Score, 2 steps per frame (480x832, 81 frames), 78.01 against 77.44, and clearly ahead on VBench Quality Score, 1 step per frame (480x832, 81 frames), 73.51 against 70.63. It is slightly behind on VBench Quality Score, 4 steps per frame (480x832, 33 frames) (82.51 against 82.99) and on VBench Quality Score, 4 steps per frame (480x832, 81 frames) (80.67 against 80.83). Read in setting order, our margin over causal ODE grows from VBench Quality Score, 4 steps per frame (480x832, 33 frames), VBench Quality Score, 4 steps per frame (480x832, 81 frames), VBench Quality Score, 2 steps per frame (480x832, 81 frames) and VBench Quality Score, 1 step per frame (480x832, 81 frames). SCOD is well above the Stage-1 model used directly and above the bidirectional ODE, rectified-trajectory and flow-map baselines on every setting.
It is not the best initialization on any setting. The strongest published baseline is Causal DMD [3] on VBench Quality Score, 4 steps per frame (480x832, 33 frames) (84.08), Teacher-forcing dCM [4] on VBench Quality Score, 4 steps per frame (480x832, 81 frames) (81.80), Causal DMD [3] on VBench Quality Score, 2 steps per frame (480x832, 81 frames) (81.04) and Causal DMD [3] on VBench Quality Score, 1 step per frame (480x832, 81 frames) (80.39). Counting baselines above SCOD in the table: five on VBench Quality Score, 4 steps per frame (480x832, 33 frames), four on VBench Quality Score, 4 steps per frame (480x832, 81 frames), four on VBench Quality Score, 2 steps per frame (480x832, 81 frames) and two on VBench Quality Score, 1 step per frame (480x832, 81 frames). On VBench Quality Score, 1 step per frame (480x832, 81 frames) SCOD is above causal consistency distillation (73.28) and teacher-forcing sCM (72.57), and below only teacher-forcing dCM (76.85) and causal DMD (80.39).
How we got here
We began from the observation that the student's sampler and its context both differ from what teacher-forced ODE distillation trains on, and the method was narrowed by ablation from there. All figures in this section are our development measurements on a 0-to-1 scale, averaged over the samplers we scored in development, with few prompts and at three increasing development budgets: screening, refinement and validation.
- Our first method matched the sampler and failed. A few-step sampler denoises a frame to a clean estimate and re-noises it with fresh noise before the next step. Our first recipe, which we called renoise-consistent self-context distillation, imitated that: self-context targets, but intermediate inputs made by noising the teacher's endpoint with fresh Gaussian noise, with the stored noise only at the top level. In screening it scored 0.6973 against 0.7482 for the causal ODE baseline. Our diagnosis was injectivity: fresh noise is independent of the endpoint, so the input no longer determines the target and the MSE learns a conditional mean, which is blurrier and more static. With ground-truth context instead of self context the fresh-noise variant was just as poor, which located the failure in the inputs rather than in the context.
- ODE states beat rectified chords. Replacing the intermediate states by the chord through the original noise, the rectification of One-Forcing [5], keeps the input injective. It did not beat the true trajectory states: the rectified baseline scored 0.7416 against 0.7482, and with self context the chord inputs again fell below the ODE-state inputs.
- Self context then helped. With ODE-state inputs and self context our recipe scored 0.7616 against the causal ODE baseline's 0.7482. That comparison is against the baseline's own file rather than a one-flag ablation of ours, so it credits to context whatever else differs between the two files.
- The top-level weight helped. In refinement, weights without EMA scored 0.8018 against 0.7916 for uniform weights with EMA, a comparison that changes both; a stronger weight scored 0.7946, and a weighting of scored 0.8011.
- Some of our negative results were confounded. We first concluded that EMA, a larger trajectory share and the on-policy refresh all hurt. Later we found that those three runs had been launched with the fresh-noise inputs by a default in our launcher, which by itself could explain their low scores. The refresh and the larger trajectory share were never re-tested with ODE-state inputs; both stay off.
- The batch had to be one. A validation run scored 0.7761, below the 0.8018 of the smaller refinement run. On the prompts the two runs shared it was worse on every quality component, so the drop was real, and we traced it to the batch rule inherited from the baseline, which had given the larger run batches of two and fewer updates. Clean comparisons then favoured a batch of one: 0.8018 against 0.7898 for a batch of two at the refinement budget, and 0.7969 against 0.7761 at the validation budget.
- EMA was kept as a hedge, not on evidence. Re-tested with ODE-state inputs, EMA tied: 0.8019 against 0.8018 at the refinement budget and 0.7972 against 0.7969 at the validation budget. We kept it because longer training made some still scenes completely static in our development videos while their frames grew sharper, and we expected averaging to matter more over a longer run than we could test.
- A batched regression path gave no speed-up and used much more memory, so the submitted file regresses one clip at a time.
Limitations
- SCOD is not competitive with the best baselines. Teacher-forcing dCM is above it on every setting; causal DMD, teacher-forcing sCM and causal consistency distillation are each above it on three of the four (causal DMD is below it on VBench Quality Score, 4 steps per frame (480x832, 81 frames), the other two on VBench Quality Score, 1 step per frame (480x832, 81 frames)). What we show is an improvement over the causal ODE initialization we modify on VBench Quality Score, 2 steps per frame (480x832, 81 frames) and VBench Quality Score, 1 step per frame (480x832, 81 frames), and a small loss to it on VBench Quality Score, 4 steps per frame (480x832, 33 frames) and VBench Quality Score, 4 steps per frame (480x832, 81 frames).
- The context is the teacher's, not the student's. Self context matches the generator's own history only to the extent that the student imitates the teacher; the student's own errors never enter its context. The on-policy refresh that would put them there is implemented but switched off, and was only ever tested in a run that was confounded with the fresh-noise inputs.
- The ablations are small and noisy. They were run at small budgets with few prompts, several decisions rest on differences of a few thousandths of the development metric or less, and the comparison that credits self context is against the baseline's file rather than a single-flag change.
- Longer training risks static videos. In our development runs more optimizer steps made some still scenes fully static while sharpening frames. A batch of one maximises the number of updates, which is the direction that showed this, and the EMA we added against it was not shown to help.
- The ground-truth videos are unused. SCOD distils only the teacher's own samples, so it cannot correct anything the teacher gets wrong, and the trajectory share of 0.43 was inherited from the baseline rather than tuned for self-context generation.
- The file carries dead code. The refresh, the batched path, the shared-level option and the ground-truth, fresh-noise and chord modes remain in the submission behind flags that disable them.
References
- Tianwei Yin, Qiang Zhang, Richard Zhang et al. (2025). From Slow Bidirectional to Fast Autoregressive Video Diffusion Models. CVPR.
- Hongzhou Zhu, Min Zhao, Guande He et al. (2026). Causal Forcing: Autoregressive Diffusion Distillation Done Right for High-Quality Real-Time Interactive Video Generation. ICML.
- Min Zhao, Hongzhou Zhu, Kaiwen Zheng et al. (2026). Causal Forcing++: Scalable Few-Step Autoregressive Diffusion Distillation for Real-Time Interactive Video Generation.
- Kaiwen Zheng, Guande He, Min Zhao et al. (2026). Causal-rCM: A Unified Teacher-Forcing and Self-Forcing Open Recipe for Autoregressive Diffusion Distillation in Streaming Video Generation and Interactive World Models.
- Jiaqi Feng, Justin Cui, Yuanhao Ban et al. (2026). One-Forcing: Towards Stable One-Step Autoregressive Video Generation.
- Yuchao Gu, Guian Fang, Yuxin Jiang et al. (2026). AnyFlow: Any-Step Video Diffusion Model with On-Policy Flow Map Distillation.
- Xun Huang, Zhengqi Li, Guande He et al. (2025). Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion. NeurIPS.