UVit2DModel
The U-ViT backbone of aMUSEd, an open masked-image-model reproduction of MUSE for fast text-to-image.
Diffusion and generative · 2,502 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.
At a glance
- Parameters
- 603.5M
- Operations
- 2,502
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2024
- Cited by
- 46 (as of 25 November 2026)
- Authors
- Suraj Patil, William Berman, Robin Rombach, Patrick von Platen
- Source
- diffusers 0.38.0
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
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.
Details
- Stable ID
- m3243
- Graph hash
- e4c09b08b17475b30e0a038e04e04c2504eecff159315c907d930bdd2b746708
- Skeleton hash
- 5e9e6eb13ff11f9cbe43cc94175ce6bd6a6b9525d84da33e856b6b370e9ce897
- Architecture hash
- 5e95e5f44bb54c8e27a08f9d3ec3f0a2e8af2a04ff9a3fdb309b6cc34d54fd44
- Diagram SHA-256
- e1c0376cd37274aa32aec2d7f3205ff2d88dda1e7f6aed55bfd62e2bba5b7785
- 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
aMUSEd is an open-source, lightweight masked image model (MIM) for text-to-image generation based on MUSE. With 10 percent of MUSE's parameters, it is focused on fast image generation. The pitch is that MIM is under-explored compared to latent diffusion, needs fewer inference steps and is more interpretable.
The system has three separately trained components: a pre-trained CLIP-L/14 text encoder, a VQ-GAN, and a U-ViT. The VQ-GAN has 146M parameters, no self-attention layers, a vocab size of 8192 and a latent dimension of 64. It downsamples resolutions by 16x, so a 256x256 image is reduced to 16x16 latent codes. Text enters two ways: the penultimate CLIP hidden states through standard cross-attention, and the final pooled hidden states through adaptive normalization layers. For the base model, the authors used a variant of the U-ViT, a transformer-inspired scalable U-Net. Its lowest resolution blocks are turned into a transformer by replacing convolution blocks with MLPs. For the 256x256 model there is no downsampling or upsampling in the convolutional residual blocks. The lower resolution U-ViT of both models receives an input vector sequence of 256 (16x16) with a feature dimension of 1024. The 256x256 model has 603M parameters and the 512x512 model 608M, the extra 5M being the added down and upsampling layers.
Following MUSE and MaskGIT, sampling uses a cosine based masking schedule. The schedule fixes a percentage of the most confident token predictions after every iteration, and after 12 iterations all tokens are decoded by the VQ-GAN into image pixels. The model is also micro-conditioned on the original image resolution, crop coordinates and LAION aesthetic score. Those values are projected to sinusoidal embeddings and appended as additional channels to the final pooled text encoder hidden states. Inference speed is superior to non-distilled diffusion models and competitive with few-step distilled ones. Both the 256x256 and 512x512 models, however, lag behind in FID and Inception scores. With 8-bit quantization the whole model loads in as little as 800 MB of VRAM.
Key idea. aMUSEd demonstrates the effectiveness of masked image modeling on large-scale text-to-image generation in an open, lightweight form with reproducible training code. It also releases checkpoints for two models which directly produce images at 256x256 and 512x512 resolutions.
- aMUSEd
- MUSE
- open MUSE reproduction
- UVit2DModel
- U-ViT
- masked image model
- MIM
- masked generative transformer
- text-to-image
- MaskGIT
- VQ-GAN tokens
- diffusers
- open-muse
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{patil2024amusedopenmusereproduction,
title={aMUSEd: An Open MUSE Reproduction},
author={Suraj Patil and William Berman and Robin Rombach and Patrick von Platen},
year={2024},
eprint={2401.01808},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2401.01808},
}