All models

MaskDiT

A diffusion transformer trained with about half of its input patches masked to cut training cost.

Diffusion and generative · 1,733 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (29 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
730.5M
Operations
1,733
Framework
PyTorch
Recurrent
No
Published
TMLR 2024
Cited by
10 (as of 27 October 2026)
Authors
Hongkai Zheng, Weili Nie, Arash Vahdat, Anima Anandkumar
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18331
Graph hash
dbd7295f3dfcf1497839e04d5e65673d4ea7fa835f6ec8e50fab19be7c742324
Skeleton hash
6dfd22b5e1fc0fcec79606a534d6ad7b84f73fbfdca04cafa2b32d3f777e2878
Architecture hash
1b9143d91c9f3edf6684024d043d74f3b4d396ac0a334e9506b5d64ca7a8f42c
Diagram SHA-256
c7281acb42d24d4bea8c31aff1c89a56b226c9b16985e93cf6587f30a45b0835
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

MaskDiT is a diffusion transformer for class-conditional image generation, and its subject is training cost. The authors randomly mask out a high proportion, around 50%, of the patches in the diffused input images during training.

The architecture is an asymmetric encoder-decoder. The encoder has the same architecture as the original DiT, without the final linear projection layer, and it operates only on the unmasked patches. The decoder is a second, lightweight DiT adapted from the MAE decoder, and it takes the full set of tokens as input. The model is trained to predict the score on the unmasked patches and, as an auxiliary task, to reconstruct the masked ones. At inference, all the patches are processed for sampling.

The paper uses DiT-XL/2 as the encoder, and the released code encodes ImageNet into latent space with a pre-trained VAE before training. On class-conditional ImageNet-256×256 the paper reports an FID of 2.28 with guidance after 273 hours on 8× A100 GPUs, which it gives as 31% of DiT's training time. On ImageNet-512×512 it reports an FID of 10.79 without guidance and 2.50 with guidance.

Key idea. MaskDiT masks about 50% of patches during diffusion training with an asymmetric encoder-decoder, reaching performance competitive with DiT in around 30% of its training time.

  • MaskDiT
  • masked diffusion transformer
  • masked transformer diffusion
  • fast diffusion training
  • class-conditional image generation
  • ImageNet generation
  • masked training
  • asymmetric encoder-decoder
  • latent diffusion transformer

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{zheng2024fasttrainingdiffusionmodels,
      title={Fast Training of Diffusion Models with Masked Transformers}, 
      author={Hongkai Zheng and Weili Nie and Arash Vahdat and Anima Anandkumar},
      year={2024},
      eprint={2306.09305},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2306.09305}, 
}