Skip to content

Sora and Diffusion Transformers (DiT): Video Generation as World Simulation

Authors: William Peebles, Saining Xie (DiT); OpenAI (Sora) Published: DiT: December 2022; Sora: February 2024 Papers: DiT: arxiv.org/abs/2212.09748 | Sora Technical Report


Why This Matters

Sora and DiT brought Transformers to diffusion models and unlocked video generation:

  • 🎬 First convincing AI video - 60-second photorealistic videos from text
  • 🏗️ Transformers + Diffusion - Combined the two most powerful architectures
  • 🌍 "World simulators" - OpenAI framed video models as learning physics
  • 📐 Flexible resolution - Any aspect ratio, duration, resolution via patches
  • 📈 Scalable - Clear scaling laws for video quality

Real-world impact: - Launched the AI video generation industry - Competitors (Runway, Pika, Kling, Veo) scrambled to match - Raised questions about deepfakes, creative industries, and reality - Proved Transformers can replace U-Nets in diffusion models

The insight: Treat video frames as patches (like ViT treats images), apply diffusion in latent space with a Transformer backbone, and video generation scales predictably with compute.


The DiT Foundation

What is a Diffusion Transformer?

Traditional diffusion models use U-Net:

Image diffusion (Stable Diffusion):
  Noise → U-Net predicts noise → Denoise → Image
  U-Net: CNN-based, good but limited scaling

DiT replaces U-Net with a Transformer:

Image diffusion (DiT):
  Noise → Transformer predicts noise → Denoise → Image
  Transformer: Attention-based, scales much better

Why Transformers Beat U-Nets

U-Net limitations:
- Fixed resolution architecture
- Limited scaling properties
- CNN inductive biases (local receptive fields)
- Hard to adapt to different modalities

Transformer advantages:
- Flexible input sizes (patch-based)
- Proven scaling laws
- Global attention (sees everything at once)
- Same architecture works for text, image, video, audio

DiT Architecture

Input: Noisy latent image (from VAE encoder)
  ↓
Split into patches (like ViT)
  ↓
Add positional embeddings
  ↓
Transformer blocks with:
  - Self-attention (patches attend to each other)
  - Cross-attention (condition on text/class)
  - AdaLN (adaptive layer norm for timestep)
  ↓
Predict noise (or velocity)
  ↓
Denoise step
  ↓
Repeat for T steps
  ↓
VAE decoder → Final image

DiT Scaling Results

Larger DiT = better images (predictable):

Model Parameters FID (lower = better)
DiT-S/2 33M 68.4
DiT-B/2 130M 43.5
DiT-L/2 458M 23.3
DiT-XL/2 675M 9.62

Clear scaling law: Every ~4x increase in parameters roughly halves FID.


Sora: DiT for Video

From Images to Video

Key extension: spacetime patches

Image (DiT):
  Split into 2D patches → [patch1, patch2, ..., patchN]

Video (Sora):
  Split into 3D spacetime patches → [patch(x,y,t) for all positions]
  Each patch = small cube of video (e.g., 2x16x16 pixels over 2 frames)

This means: - Same architecture handles any resolution, duration, aspect ratio - Just change the patch grid dimensions - Short video = fewer patches, long video = more patches

Sora Pipeline

1. Video Compression
   Spatiotemporal VAE compresses video:
   Raw video (e.g., 1080p, 60fps, 10s)
   ↓
   Compressed latent representation (~100x smaller)

2. Noising
   Add Gaussian noise to compressed video
   ↓
   Noisy latent spacetime volume

3. Denoising (DiT backbone)
   Transformer processes spacetime patches
   Conditioned on text prompt (via cross-attention)
   Predicts and removes noise iteratively
   ↓
   Clean latent representation

4. Decoding
   VAE decoder → Final video

What Sora Can Generate

Capabilities demonstrated:
- 60-second coherent videos
- Complex camera movements (tracking shots, zooms)
- Multiple characters interacting
- Consistent physics (mostly)
- Reflections, shadows, lighting
- Text in videos (signs, labels)
- Various styles (photorealistic, animation, artistic)

Prompt example:
"A stylish woman walks down a Tokyo street filled with
warm glowing neon and animated city signage"
→ Photorealistic 10-second video with consistent character

Emergent Capabilities

OpenAI described Sora as a "world simulator":

Without explicit physics training, Sora learned:
- Object permanence (things exist when occluded)
- 3D consistency (objects have depth and volume)
- Gravity and basic physics
- Light and shadow behavior
- Material properties (reflections, transparency)

But NOT perfectly:
- Physics sometimes breaks (objects morph)
- Long videos lose coherence
- Hands and fine details still problematic
- Cause-and-effect sometimes wrong

Technical Details

Spacetime Compression

Video encoder:
  Input: 1080p video, 24fps, 10 seconds = 240 frames
  Spatial compression: 8x (1080p → 135p latent)
  Temporal compression: 4x (240 frames → 60 latent frames)
  Total compression: ~128x

Result: Manageable latent volume for Transformer processing

Conditioning

Text conditioning:
  Text → CLIP/T5 text encoder → Text embeddings
  Text embeddings → Cross-attention in DiT blocks

Timestep conditioning:
  Diffusion timestep t → Sinusoidal embedding
  → AdaLN (adaptive layer normalization)

Image/video conditioning:
  For image-to-video: First frame encoded as condition
  For video extension: Last frames as condition

Training

Training data:
- Large-scale video dataset (undisclosed size)
- High-quality captions (likely re-captioned with vision models)
- Variable resolution and duration

Training approach:
- Progressive training (low-res → high-res)
- Random crop/duration during training
- Classifier-free guidance for quality

Impact on the Field

Launched the AI Video Industry

Before Sora (early 2024):
  AI video = 4-second, low-quality clips
  Runway Gen-2: ~4s, 768p, inconsistent

After Sora (2024-2025):
  AI video = 60s, 1080p, mostly coherent
  Spawned: Runway Gen-3, Pika 1.0, Kling, Google Veo
  Industry investment: billions in video generation

DiT Became Standard

DiT replaced U-Net in:
- Stable Diffusion 3 (Stability AI) - uses DiT/MMDiT
- Flux (Black Forest Labs) - DiT-based
- Playground v3 - DiT-based
- DALL-E 3 - uses DiT internally
- Most modern image generators

The architecture won.

Societal Impact

Concerns raised:
- Deepfake videos becoming trivial to create
- Creative industry disruption
- Misinformation potential
- Copyright questions (trained on what data?)

Responses:
- C2PA metadata standards for AI content
- Detection tools development
- Regulatory discussions worldwide

Practical Usage

DiT for Images (Open Source)

# Using DiT for image generation
import torch
from diffusers import DiTPipeline

pipe = DiTPipeline.from_pretrained(
    "facebook/DiT-XL-2-256",
    torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

# Generate image (class-conditioned)
image = pipe(
    class_labels=[207],  # ImageNet class: golden retriever
    num_inference_steps=50,
    guidance_scale=4.0
).images[0]

image.save("dit_output.png")

Sora API (OpenAI)

# Sora video generation (via OpenAI API)
from openai import OpenAI

client = OpenAI()

response = client.videos.generate(
    model="sora",
    prompt="A cat sitting on a windowsill watching rain fall outside",
    duration=10,  # seconds
    resolution="1080p"
)

# Download generated video
video_url = response.data[0].url

Limitations

1. Physics Breaks

Sora sometimes generates:
- Objects morphing shape
- Impossible physical interactions
- Gravity violations
- Cause without effect

2. Long-Form Coherence

60-second limit
Quality degrades in longer videos
Character consistency can drift
Scene continuity issues

3. Fine Details

Hands and fingers still problematic
Small text often garbled
Complex mechanical interactions fail
Counting objects unreliable

4. Computational Cost

Generating one video takes minutes to hours
Enormous GPU requirements
Much more expensive than image generation

Key Takeaways

  1. DiT > U-Net - Transformers scale better than CNNs for diffusion models
  2. Spacetime patches - Treat video as 3D patches for flexible generation
  3. World simulation - Video models learn implicit physics from data
  4. Scalable - Clear scaling laws for video quality improvement
  5. Industry catalyst - Launched the AI video generation race

Bottom line: DiT proved that Transformers belong in diffusion models, and Sora proved that video generation is a scaling problem. Together, they created a new category of AI capability and an entirely new industry.


Further Reading

Original Papers

  • DiT: https://arxiv.org/abs/2212.09748
  • Sora Technical Report: https://openai.com/index/video-generation-models-as-world-simulators/

Open Source Alternatives

  • Open-Sora: https://github.com/hpcaitech/Open-Sora
  • Stable Video Diffusion: https://huggingface.co/stabilityai/stable-video-diffusion-img2vid
  • Stable Diffusion (latent diffusion): https://arxiv.org/abs/2112.10752
  • ViT (patch-based vision): https://arxiv.org/abs/2010.11929

Published: DiT (December 2022), Sora (February 2024) Impact: 🔥🔥🔥🔥 HIGH - Created the AI video industry, DiT became standard Citations: DiT 2,000+; Sora tech report widely cited Current Relevance: DiT is the standard architecture for modern diffusion models Legacy: Proved Transformers + Diffusion is the winning combination

Modern Status (March 2026): DiT has replaced U-Net in virtually all modern diffusion models. Sora has competition from Runway Gen-3, Google Veo 2, and open-source alternatives, but the DiT architecture it popularized remains dominant. AI video quality continues to improve rapidly.