AgiBot World Beta · test split · Looped-DiT retrofit of the fine-tuned FLUX 3 Action · Phase 5

Trained Loop Depth

The Phase-3 fine-tune, retrofitted as a Looped-DiT (12 pre-loop blocks, 9 looped core blocks, 12 post-loop blocks, head-wise attention gates) and trained for 2500 and 4500 steps at loop depth N = 4 with deep supervision. The same eight test windows, captions and noise seed as the zero-shot loop-depth gallery: only the model and the number of core passes change across the columns. 33 future frames at 15 fps, 384×512, Euler 30 steps, CFG 4.

model
context frames k
test window
playback speed
ground truth
base, N = 1
fine-tuned, N = 1
looped, N = 1
N = 2
N = 4
N = 8
frame 0 / 33 drag to step through frames; the loop restarts automatically

Columns from left: ground-truth future, base FLUX 3 Action zero-shot, the Phase-3 fine-tune (grey underline, the previous reference), then the looped model sampled with the core run 1, 2, 4 and 8 times. N = 4 (green underline) is the depth it was trained at. Cells are downscaled to 256×192 for the page.

Test split, the same 100 windows as Phase 4

At the training depth the looped model reaches LPIPS 0.163 and FVD 151 at k = 1, against 0.166 and 167 for the Phase-3 fine-tune it started from, after 0.9 epoch of looped training. Green rows are the training depth; the best value in each column is marked. The last column is the measured sampling time per 33-frame window (batch 4; one A100 for the 2500 model, one H100 for the 4500 model; 30 Euler steps, two forward passes per step for guidance).

k = 1 context frame

modelNPSNR ↑SSIM ↑LPIPS ↓FVD ↓judge ↑s / window
base FLUX 3 Action, zero-shot117.030.6640.288407.60.387.9
fine-tuned 6000 steps (Phase 3)119.830.8050.166166.90.467.9
looped, 2500 steps, N = 1119.970.8050.166164.20.437.9
looped, 2500 steps, N = 2220.020.8080.161162.00.439.9
looped, 2500 steps, N = 4420.000.8070.162157.10.3913.9
looped, 2500 steps, N = 8820.030.8030.164159.20.4221.9
looped, 4500 steps, N = 1119.740.8040.168166.30.393.2
looped, 4500 steps, N = 2219.940.8080.162154.40.464.0
looped, 4500 steps, N = 4419.930.8070.163150.50.4015.9
looped, 4500 steps, N = 8820.050.8070.161151.50.4027.1

k = 1: PSNR / SSIM / LPIPS on 100 windows; FVD on 300 windows; judge on 100 windows (adherence = yes-rate with the true caption minus yes-rate with a swapped caption, Qwen3-VL judge).

k = 9 context frames

modelNPSNR ↑SSIM ↑LPIPS ↓s / window
base FLUX 3 Action, zero-shot120.160.7990.1689.6
fine-tuned 6000 steps (Phase 3)121.770.8480.1239.6
looped, 2500 steps, N = 1121.820.8480.1219.7
looped, 2500 steps, N = 2221.750.8480.12112.1
looped, 2500 steps, N = 4421.780.8480.12016.8
looped, 2500 steps, N = 8821.730.8460.12226.4
looped, 4500 steps, N = 1121.910.8500.1204.0
looped, 4500 steps, N = 2221.850.8490.1204.8
looped, 4500 steps, N = 4421.780.8490.1216.7
looped, 4500 steps, N = 8821.790.8470.12210.6

k = 9: PSNR / SSIM / LPIPS on 100 windows.

Before and after training the loop

The untrained loop (Phase 4's zero-shot probe) degraded quickly with depth because the core blocks had only ever run once. After Phase 5 every depth is a usable exit.

Nblock passesk = 1, untrained loopk = 1, looped, 2500 stepsk = 1, looped, 4500 stepsk = 9, untrained loopk = 9, looped, 2500 stepsk = 9, looped, 4500 steps
1330.1660.1660.1680.1230.1210.120
2420.1830.1610.1620.1320.1210.120
4600.2030.1620.1630.1480.1200.121
8960.3570.1640.1610.2590.1220.122

LPIPS (lower is better). "Untrained loop" is the Phase-3 model wrapped as a Looped-DiT without gates and sampled at depth N with no looped training (first 50 of the same windows); N = 1 is the Phase-3 model itself. The trained columns are the Phase-5 models on 100 windows.

Validation during training

runstepk0k1k5k9k17k9, N=1k9, N=2k9, N=8
Phase-3 fine-tune (N = 1)60000.19040.07920.06930.06590.0639–––
looped, 2500 steps5000.19290.08060.07070.06720.06530.06700.06620.0716
looped, 2500 steps10000.19160.07990.07000.06660.06470.06680.06600.0699
looped, 2500 steps15000.19020.07950.06960.06620.06420.06650.06570.0691
looped, 2500 steps20000.18910.07910.06910.06580.06390.06630.06540.0683
looped, 2500 steps25000.18790.07870.06880.06540.06350.06600.06510.0678
looped, 4500 steps30000.18840.07870.06880.06550.06360.06600.06520.0678
looped, 4500 steps35000.18760.07850.06870.06530.06340.06590.06510.0674
looped, 4500 steps40000.18630.07830.06850.06510.06320.06580.06490.0672

Velocity-prediction MSE of the EMA weights on 32 fixed validation windows at 8 timesteps, per context length k; the looped runs are evaluated at the training depth N = 4 unless the column says otherwise. Lower is better. The 4500-step run shares steps 0–2000 with the 2500-step run and continues from that checkpoint (the step-4500 point itself is missing: the trainer was killed before that eval).

How the model was fine-tuned

Phase 3 · full fine-tune of the backbone

model
FLUX 3 Action 7B transformer, video-only configuration: the video, video-condition and text streams (5.57 B parameters) are trained in full, no LoRA. The robot action and state streams are dropped. The video VAE and the Qwen3-VL text encoder stay frozen.
data
AgiBot World Beta head-camera clips, 15 fps, resized to 384×512. Train: 7960 episodes over 212 tasks, 159,983 windows; a window is k past frames plus a caption (the segment's action text) and the 33 frames that follow.
input
The past frames are VAE-encoded and enter the video-condition stream as clean tokens at timestep 0; the future frames are encoded, noised and enter the video stream (9 latent frames × 12 × 16 patches = 1728 tokens). Context length k cycles through 1, 5 and 9 per micro-batch, with k = 0 (caption only) 10% of the time. Captions are dropped to the empty string 10% of the time so guidance works at inference.
objective
Rectified-flow velocity MSE on the future tokens, timesteps drawn as sigmoid(N(1.08, 1.0)) as in the base model's recipe.
optimizer
AdamW, learning rate 1e-5, betas (0.9, 0.999), no weight decay, gradient clip 1.0, fp32 master weights with bf16 compute, EMA 0.999 updated every 10 steps (the EMA is what is evaluated). 32 windows per step: 2 GPUs × 4 windows × 4 accumulation steps.
schedule
6000 steps (1.2 epochs): 500-step warmup, constant, linear cooldown to zero over steps 5000–6000.
infrastructure
2 × A100 80 GB, FSDP2 sharding with activation checkpointing and compiled blocks, 16 s per step. Steps 0–3000 ran with a reduce-order bug that mixed gradients across ranks; it was fixed and steps 3000–6000 are clean.

Phase 5 · Looped-DiT retrofit

The 33 transformer blocks of the fine-tuned model (5 dual-stream mode blocks, 28 joint single blocks) are split into three stages. The retrofit adds no blocks: the core is 9 of the existing single blocks, run N times with shared weights.

A · pre-loop, once
12
5 mode blocks + 7 single blocks
B · looped core, × N
9
single blocks, shared weights, gated attention
C · post-loop, once per exit
12
single blocks + output head
exits
N
every loop state decodes through C
initialisation
All trunk weights are the Phase-3 EMA at step 6000. The only new parameters are head-wise sigmoid attention gates in the 9 core blocks (one linear map for text tokens, one for video tokens, zero weights, bias +4), so at initialisation each gate passes 98% of the attention output and the model computes almost exactly what the fine-tune did at N = 1.
loss
Deep supervision: after each pass through the core the state is decoded through C and scored with the same velocity loss. Weights 1/3, 1/3, 1/3, 1 over exits 1–4, rescaled to sum 2, so the final exit counts most but every depth is trained.
schedule
Same data stream, seed, batch size, learning rate and optimizer as Phase 3; 200-step warmup. The 2500-step run cools down over steps 2000–2500 (half an epoch). The 4500-step run restarts from the step-2000 checkpoint and keeps the learning rate constant to step 4500 (0.9 epoch), where it was stopped without a cooldown; its EMA (decay 0.999) is the evaluated model.
cost
12 + 4 × 9 + 4 × 12 = 96 block passes per training forward against 33 for the plain model; 31 s per step on the same two GPUs, so the 2500-step run roughly matches Phase 3's compute.

How a video is generated

  1. The k past frames are encoded by the video VAE (4× in time, 32× in space, 96 channels) into clean conditioning tokens at timestep 0. With k = 0 there is no conditioning video.
  2. The caption is encoded by the frozen Qwen3-VL text encoder (80 text tokens); the empty caption is encoded too, as the unconditional branch.
  3. Gaussian noise is drawn for the 9 future latent frames from a fixed seed (seed 0 for every evaluation window), so the columns of a strip share their noise.
  4. 30 Euler steps run on the time-shifted schedule (shift 5, t from 1 to 0). At each step the transformer predicts the velocity twice, with and without the caption, and the two are combined with classifier-free guidance scale 4.
  5. The loop depth is a call-time argument: the same weights are sampled with the core run 1, 2, 4 or 8 times; the pre- and post-loop stages and the head are unchanged.
  6. The final latents are decoded by the VAE to 33 frames at 384×512 and compared with the real continuation: PSNR, SSIM and LPIPS per window, FVD over 300 windows, and a VLM judge that asks whether the clip matches its caption, scored against a caption from another task.

Cost per depth

Nblock passes per forwardrelatives / window, looped, 2500 stepss / window, looped, 4500 steps
1331.00×7.93.2
2421.27×9.94.0
4601.82×13.915.9
8962.91×21.927.1

Seconds per 33-frame window at k = 1, including the guidance pass (two forwards per step) and the VAE decode; batch 4, one A100 for the 2500 model and one H100 for the 4500 model, so the two columns are not comparable in absolute terms. The plain Phase-3 model takes 7.9 s under the same protocol.

Evaluation protocol as in Phase 4 (ldvflux/eval_phase4.py, seed 0, Euler 30, CFG 4, shift 5). Looped weights: EMA of the Phase-5 run, loaded strictly; depth set with --loops N. Frames are from AgiBot World Beta (CC BY-NC-SA 4.0: attribution, non-commercial, share-alike). Weights: Jinyan0924/flux3-agibot-looped and Jinyan0924/flux3-agibot-videoft; code: naomili0924/looped-dit-video, agibot-flux3/.