BART is a sequence-to-sequence transformer that combines a bidirectional encoder for full prompt context with an autoregressive decoder for token generation. This combines strengths associated with BERT-style understanding and GPT-style decoding. section 12.1.1 section 1.2
A text-to-image pipeline assigns BART these sequential roles:
- Tokenize the prompt and pass it through the pretrained BART encoder, producing dense text representations. section 12.0 section 12.1.1
- Condition the BART decoder on those representations and autoregressively predict a sequence of image tokens. section 1.2.2 section 12.1.1
- Pass the predicted tokens to a VQGAN decoder, which reconstructs image patches and produces the complete image. section 12.1.1
Prompt-to-image generation
For “panda with a top hat reading a book,” BART encodes the prompt and generates image tokens sequentially. VQGAN decodes those tokens into the resulting image, which can be viewed as it develops through 32, 64, 128, and eventually 256 patches. section 12.0 section 1.2
Figure 1.5 How DALL-E mini is trained to generate an image based on a text prompt
The training diagram traces image encoding, BART encoding and decoding, token alignment, and image reconstruction in DALL-E mini. section 1.2.2

