Hierarchical Text-Conditional Image Generation with CLIP Latents
DALL-E 2 produces high-resolution, realistic images from text prompts by combining CLIP's text-image representations with a two-stage diffusion process.
Paper: Hierarchical Text-Conditional Image Generation with CLIP Latents
Authors: Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, Mark Chen · 2022
Read the paperThe Problem
While text-to-image models existed prior to DALL-E 2, they struggled to align complex textual concepts with high-fidelity visual output. Autoregressive models (like the original DALL-E) were computationally expensive and prone to compounding errors, while early diffusion models lacked robust semantic understanding of long-form text. The challenge was bridging the gap between deep semantic understanding of prompts and the reliable, high-resolution synthesis of corresponding visual structures.
The Idea
The core insight of DALL-E 2 was to bridge a pre-trained contrastive model (CLIP) with a generative diffusion model. By using CLIP, which already understood how text and images mapped to the same semantic space, the system could translate a text prompt into a "mental image" (a CLIP image embedding), and then explicitly train a diffusion model to decode that abstract semantic embedding back into a concrete, high-resolution pixel image.
How It Works
The architecture functions as a two-part pipeline known as unCLIP:
The Prior Model: First, the system takes the user's text prompt and encodes it using the frozen CLIP text encoder. A "prior" model (which can be either autoregressive or diffusion-based) is then trained to translate this CLIP text embedding into a corresponding CLIP image embedding. This acts as a semantic bridge, guessing what the "idea" of the image looks like in CLIP's latent space.
The Decoder Pipeline: The generated CLIP image embedding is then handed to a diffusion decoder. This model takes the embedding and gradually removes noise to synthesize an actual 64x64 pixel image.
Hierarchical Upsampling: To achieve high resolution without intractable compute costs, the 64x64 output is passed through a sequence of diffusion upsampler models, progressively enhancing the image to 256x256 and finally to 1024x1024 pixels.
Why It Mattered
DALL-E 2 proved that diffusion models could outcompete autoregressive transformers and GANs for complex, high-resolution image generation. By separating semantic planning (the prior) from visual realization (the decoder), it allowed for incredible flexibility—including generating variations of an image by simply decoding the same image embedding with different noise, or interpolating between two images in CLIP's latent space.
What Came After
DALL-E 2 triggered an explosion in text-to-image generation. It heavily influenced the development of Stable Diffusion, Midjourney, and Google's Imagen. The unCLIP architecture demonstrated that modularizing generation—using specialized models for text comprehension, semantic mapping, and pixel decoding—was the path forward, a paradigm that continues to dominate multimodal AI systems today.