
U-ViT
Diffusion and generative666 ops500.8M params
ViT backbone for diffusion models that treats time, condition and image patches as tokens, with long skip connections.
Diffusion and generative · 170 operations Checked
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.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
menagerie.classics.simple_diffusion_uvit:build: build({}) 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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}