DWD for DiR on MiniMax H3: decode video without the VAE (research checkpoint, v0.2)
Research weights, tied to one generator. These decode only the tokens of
johndpope/dir-diffusion-h3after its 4th iteration. With base H3, Turbo, another DiR checkpoint or a different iteration count the output is noise.
License and territory. Derived from MiniMax H3 under the MiniMax H3 Community License Agreement (see
NOTICE). Use and redistribution are allowed only outside the European Union, the United Kingdom, South Korea and the United States.
An independent port to H3 of "Decoding Without a Decoder: Direct Pixel Prediction from Diffusion Transformers" by Hansheng Chen, Shengqu Cai, Jan Ackermann, Rayhan Zirvi, Gordon Wetzstein, Xinchen Yan and Leonidas Guibas, arXiv 2611.22287. Not the authors' release, and not affiliated with them or with MiniMax.
Code, every measurement and pictures: github.com/scrya-com/dir-diffusion (docs/DWD.md, results issue #6). Explainer: scrya.com/dwd_diffusion.
What it does
The VAE decode is replaced by: the DiT's last 8 blocks rerun with a LoRA, a linear head from tokens to pixels, and an 8.2M-parameter refiner.
| 39 frames, 768Γ512, RTX 5090 | Decode time | LPIPS against the VAE decode of the same latent |
|---|---|---|
| VAE | 1.8 s | 0 (the target) |
| DWD (LoRA + head + refiner) | 0.26 s | 0.10β0.11 (held-out clips) |
- End to end, DiR + DWD: about 4.2 s per 39-frame 768Γ512 clip, against 5.5 s with the VAE. The DiT is now 90%+ of the time.
- Every size from 384Γ256 to 1344Γ768: the v0.2 refiner was trained on 13 sizes. Held-out LPIPS 0.110β0.126 on 12 of them, 0.136 at 384Γ256.
- MPEG-Diffusion two-track: v0.2 also decodes the full-resolution region of the two-track sampler, so the whole two-track path runs without the VAE (issue #7).
- Its target is the VAE, so at best it matches the VAE; it cannot beat it.
- Weakest on fast motion (hands), where it is softer than the VAE.
Files
| File | What |
|---|---|
dwd_lora.pt |
Rank-64 LoRA on qkv / out / fc1 / fc2 of the last 8 DiT blocks (musubi-tuner keys), {"lora", "k", "rank", "step"}. |
dwd_head.pt |
Linear head per latent-frame class (5 classes, 5472 β 28800), with input normalisation and halo blend. Stored in fp16 (0.02% from the fp32 fit); loads into fp32. |
dwd_refiner.pt |
Refiner U-Net reading the head's pixels plus the latent (and neighbouring latent frames). v0.2, step 121279, trained on 13 sizes and the two-track region. v0.1 (step 40416, one size) is in this repo's commit history. |
config.json |
What decodes what. |
All three load with torch.load(..., weights_only=True).
Use
Needs a 32 GB card with no block swap (the LoRA tail reruns the last 8 blocks with every block on the card). The end-to-end code is on the feat/accel branch until it is merged.
git clone -b feat/accel https://github.com/scrya-com/dir-diffusion && cd dir-diffusion
pip install -r requirements.txt # install torch for your CUDA first
hf download johndpope/dir-diffusion-h3-dwd --local-dir dwd
# the H3 checkpoint, VAE and prompt caches: DIR_CHEATSHEET.md, sections 0-3
python3 lot/accel_h3.py check --run johndpope/dir-diffusion-h3 --lora dwd/dwd_lora.pt --head dwd/dwd_head.pt --refiner dwd/dwd_refiner.pt
LORA=dwd/dwd_lora.pt HEAD=dwd/dwd_head.pt REFINER=dwd/dwd_refiner.pt SIZES=768x512 \
bash scripts/bench_accel.sh speed # writes clips and runs/bench_accel/speed/BENCH.md
Run the LoRA only in the second pass (--mode two_pass, the default): it must not change the generator's own output.
v0.2 refiner (21 Nov 2026)
Warm-started from v0.1 and trained for 10 h on one RTX 5090: 4,843 pairs from DiR rollouts at 13 sizes plus 618 two-track rollouts, where the target is the VAE composite and the loss counts only the full-resolution region. The LoRA and head are unchanged.
| Held-out LPIPS against the VAE | v0.1 | v0.2 |
|---|---|---|
| Mean over 13 sizes (384Γ256 to 1344Γ768) | 0.130 | 0.118 |
| 384Γ256 | 0.150 | 0.136 |
| 768Γ512 | 0.123 | 0.112 |
| 1344Γ768 | 0.133 | 0.120 |
| Two-track region, 768Γ512 | 0.065 | 0.041 |
| Two-track region, 1024Γ576 | 0.093 | 0.062 |
| Two-track region, 1344Γ768 | 0.111 | 0.068 |
v0.2 is better on all 13 sizes. The two-track rows score only the region's box, against the VAE decode of the same latent; the set is held out during training but also guided which checkpoint was kept.
How it was trained
- Collect: about 3,000 DiR rollouts at 512Γ768, 39 frames (1,508 isometric scenes and 1,508 portraits, 8 of each held out), saving the final iteration's tokens and the VAE decode.
- Ridge head on the frozen tokens (LPIPS 0.466).
- LoRA on the last 8 blocks with a pixel + LPIPS loss, on only at the final iteration, then the head refit on its tokens (0.267).
- Refiner on the head's output plus the latent, neighbouring latent frames and a latent-grid path (v0.1: 0.114 at 512Γ768). All on one RTX 5090.
- v0.2 refiner: the same refiner, trained on 13 sizes and the two-track region (above).
Every step and number: docs/DWD.md.
Cite the paper, not this repository
Hansheng Chen, Shengqu Cai, Jan Ackermann, Rayhan Zirvi, Gordon Wetzstein, Xinchen Yan and Leonidas Guibas, Decoding Without a Decoder: Direct Pixel Prediction from Diffusion Transformers, arXiv 2611.22287.
- Downloads last month
- 36