All models

U-ViT

ViT backbone for diffusion models that treats time, condition and image patches as tokens, with long skip connections.

Diffusion and generative · 666 operations Structure only

Structure-only capture: TorchLens recorded this graph without running real numbers through the model, so shapes and data types on the diagram are hypotheses, not measurements.

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 (15 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

Family
U-ViT
Parameters
500.8M
Operations
666
Framework
PyTorch
Recurrent
No
Published
CVPR 2023
Cited by
288 (as of 28 October 2026)
Authors
Fan Bao, Shen Nie, Kaiwen Xue and others
License
MIT
Checked
Structure only: shapes and data types are hypotheses, not measurements.

Files

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

Details
Stable ID
m21102
Graph hash
bc92318c89e89c260d61f754205d52f31584f377102683392934144bb87c9f53
Skeleton hash
e50a8e18e997062487e59f8baff6cdd1bdaf553f17c023750b9341970984bbf1
Architecture hash
26e87b5867b739c5ebd266833762a800e2f526c3d18e5357f8e3ac4f22c5bf75
Diagram SHA-256
ec251d85ddb8bdfe1c2dc8943a9096f62a52bbda082b8391f768e4f15acc62d4
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3

What it is

This model is the U-ViT-Huge configuration with 2×2 patches on a 32×32 latent input, the setup the paper uses for class-conditional ImageNet 256×256.

About this model's family

U-ViT is a Vision Transformer backbone for image generation with diffusion models, a role usually filled by a convolutional U-Net. It takes the time, the condition and the noisy image as inputs and predicts the noise that was injected into the image. The image is split into patches, and the time, the condition and the patches all enter the transformer as tokens.

From U-Net it keeps one idea: long skip connections between shallow and deep layers. The paper's reasoning is that noise prediction depends on low-level features, and the skip connections give those features a shortcut that eases training. In its CIFAR10 ablations, concatenating the main and skip branches and then applying a linear projection performed best. Treating time as a token performed better than feeding it through adaptive layer normalization. An optional 3×3 convolutional block before the output is intended to prevent artifacts in the generated images.

For 256×256 and 512×512 images the paper works in latent space, converting images to 32×32 and 64×64 latent representations and modeling those with U-ViT. It reports FID scores of 2.29 for class-conditional generation on ImageNet 256×256 and 5.48 for text-to-image generation on MS-COCO. The paper concludes that the long skip connection is crucial for diffusion-based image modeling, while the down-sampling and up-sampling operators of the CNN-based U-Net are not always necessary.

Key idea. U-ViT shows that a Vision Transformer treating time, condition and noisy image patches as tokens, with long skip connections, can match a similarly sized CNN-based U-Net in diffusion models.

  • U-ViT
  • All are Worth Words
  • ViT backbone for diffusion models
  • diffusion transformer
  • image generation
  • noise prediction network
  • long skip connections
  • latent diffusion
  • class-conditional image generation
  • text-to-image generation

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

Cite the paper

@misc{bao2023worthwordsvitbackbone,
      title={All are Worth Words: A ViT Backbone for Diffusion Models}, 
      author={Fan Bao and Shen Nie and Kaiwen Xue and Yue Cao and Chongxuan Li and Hang Su and Jun Zhu},
      year={2023},
      eprint={2209.12152},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2209.12152}, 
}