AI Foundations

Text-to-Video Generation

By Aditya Kumar Jha, Engineer

Text-to-video generation synthesizes a coherent video clip directly from a natural-language prompt. It extends text-to-image diffusion to the time dimension, which makes keeping motion smooth and objects consistent across frames the central difficulty.

What Text-to-Video Generation Is

Text-to-video generation is the task of producing a short video clip from a natural-language description. A prompt such as "a red fox trotting across fresh snow at sunrise" is mapped to a sequence of frames that, played in order, depict the described scene with plausible motion. The output is not a single image but a temporal signal, so the model must decide both what each frame looks like and how the content changes from one frame to the next.

Formally, a clip is a tensor over time. Where a still image is a height by width by channel array, a video adds a frame axis of length T, giving a four-dimensional structure. The model learns a conditional distribution over that tensor given the text, then samples from it. Because every additional frame multiplies the number of values to predict, the problem grows far larger than image synthesis at the same resolution.

Text-to-video sits inside the broader family of generative AI and is closely related to text-to-image. The two share encoders, training objectives, and diffusion machinery, but video adds the requirement that successive frames agree with one another in geometry, lighting, and object identity. That agreement, called temporal consistency, is what separates a convincing clip from a flickering slideshow.

x ∈ ℝ^{T×H×W×C}, p_θ(x | c) where c = encode(prompt)
A video x has T frames of height H, width W, and C channels. The model learns the conditional distribution p_θ over this tensor given the text condition c, and generation samples from it.
  • Input is text; output is an ordered sequence of frames, not a single image.
  • A clip is represented as a tensor with a time axis added to the image axes.
  • Temporal consistency across frames is the defining extra constraint.
  • The field is a direct extension of text-to-image diffusion to the time dimension.

Why Video Is Much Harder Than Images

The most visible difficulty is temporal consistency. An object's color, shape, and position must evolve smoothly, so a person's face cannot change identity between frames and a car cannot swap shape as it moves. Independent frame-by-frame generation produces flicker and drift because nothing ties one frame to the next. Models therefore have to reason jointly across the whole clip rather than treat frames in isolation.

Motion dynamics add a second layer. A good clip respects rough physics: objects fall, fluids flow, limbs articulate, and occluded regions reappear consistently when something passes in front of them. Capturing this requires the model to represent how the scene changes over time, not just how it looks at one instant. Failures show up as objects that morph, limbs that multiply, or motion that ignores gravity and contact.

Compute and data costs are the third barrier. Predicting many frames at once means more tokens, more memory, and longer training, so video models are typically far more expensive to train and to sample than their image counterparts. High-quality, well-labeled video data is also scarcer than image-text data, which constrains how much the model can learn about real-world motion.

  • Temporal consistency: appearance and identity must persist across frames without flicker.
  • Motion dynamics: clips should respect approximate physics like gravity and occlusion.
  • Compute: many frames at once raise memory and training cost sharply over images.
  • Data: labeled, high-quality video is scarcer than image-text pairs.

The Dominant Technical Approach

Most modern systems extend diffusion models to the time dimension. A diffusion model learns to reverse a gradual noising process: training corrupts data with Gaussian noise across many steps, and the network learns to denoise. For video, the same denoising operates over the full spatiotemporal tensor, so a single denoising step updates all frames together and lets the model enforce consistency between them.

To make this affordable, systems usually work in latent space. A learned autoencoder compresses frames into a smaller latent representation, diffusion runs there, and a decoder reconstructs pixels at the end. This is latent video diffusion: the denoising target carries an explicit temporal axis, so the network attends across frames as well as within them. Compressing both space and time before denoising is what keeps memory tractable for clips of useful length.

Architecturally, the field has shifted from U-Net backbones toward diffusion transformers (DiT). Here the latent video is cut into spacetime patches, small cubes spanning a few frames and a small spatial region, which become tokens for a transformer denoiser. OpenAI's Sora popularized this design; per OpenAI's technical report, it operates on "spacetime patches of video and image latent codes," which lets one model handle variable durations, resolutions, and aspect ratios.

L = E_{z,c,ε,t} [ ‖ ε − ε_θ(z_t, t, c) ‖² ], z_t over (T×h×w) latent grid
Latent video diffusion trains a network ε_θ to predict the noise ε added to a latent z_t at step t, conditioned on text c. The latent grid spans T frames as well as spatial h and w, so the same loss enforces denoising across time.
  • Diffusion denoising is applied to the whole video tensor so frames are generated jointly.
  • Latent video diffusion compresses space and time, then denoises with a temporal axis.
  • Diffusion transformers tokenize the latent into spacetime patches for a transformer denoiser.
  • Patch-based tokens allow variable length, resolution, and aspect ratio in one model.

Milestone Systems and Their Dates

The modern era began in 2022. Researchers from Tsinghua University and the Beijing Academy of Artificial Intelligence released CogVideo, a 9.4-billion-parameter model often described as the earliest large text-to-video system. Meta announced Make-A-Video on September 29, 2022, trained on paired image-text data plus unlabeled video. Google followed with Imagen Video on October 5, 2022, a cascade of video diffusion models that could reach 1280 by 768 resolution at 24 frames per second, though Google did not release it publicly.

OpenAI's Sora marked the next jump. It was announced on February 15, 2024, alongside the technical report "Video generation models as world simulators," which described a diffusion transformer denoising 3D latent patches and demonstrated clips up to about one minute. Sora was not generally available at announcement. A faster product version, Sora Turbo, was released to ChatGPT Plus and Pro subscribers on December 9, 2024, generating clips up to roughly twenty seconds at up to 1080p. Distinguishing announcement from availability matters: the February report was a preview, not a launch.

A competitive market followed. Runway shipped Gen-2 in 2023 and Gen-3 Alpha in 2024. Pika released a consumer text-to-video product, Google introduced Veo, and two systems launched in June 2024: Kuaishou's Kling and Luma's Dream Machine. These tools differ in clip length, resolution, motion quality, and the degree of camera and scene control they expose, but they share the latent diffusion and transformer lineage described above.

  • 2022: CogVideo (Tsinghua/BAAI), Make-A-Video (Meta, Sept 29), Imagen Video (Google, Oct 5).
  • Sora announced Feb 15, 2024 as a report; Sora Turbo released Dec 9, 2024 to ChatGPT Plus/Pro.
  • Runway Gen-2 (2023) and Gen-3 Alpha (2024) brought text-to-video to a wide audience.
  • Kling and Luma Dream Machine both launched in June 2024; Google Veo and Pika followed similar timing.

Evaluation, Limitations, and Provenance

Evaluation remains unsettled. Older automatic metrics such as Frechet Video Distance and benchmarks like UCF-101 measure distributional similarity but correlate weakly with human judgments of motion realism. Newer benchmark suites score multiple axes at once, including subject and background consistency, motion smoothness, and prompt alignment, yet human review is still standard for judging whether a clip looks physically plausible.

Limitations are concrete and well documented. Physics can break, so objects pass through one another or fail to conserve shape; temporal flicker appears in fine textures; clip length is short, typically seconds rather than minutes; and fine control over camera path, timing, and object placement is limited compared with traditional tools. Long clips also tend to accumulate drift as small errors compound across frames.

Provenance and safety are now part of the pipeline. Because realistic synthetic video raises deepfake risk, providers attach signals that mark content as AI-generated. Google's SynthID embeds an imperceptible watermark that survives common transformations, while C2PA Content Credentials record creator, tool, and edit history as signed metadata. The two are complementary: metadata can be stripped by re-encoding, and a durable watermark fills that gap, which is why major labs combine both.

  • Automatic metrics (FVD, UCF-101) correlate weakly with perceived realism, so humans still judge.
  • Common failures: physics violations, texture flicker, short clip length, weak controllability.
  • Errors compound over long clips, causing identity and geometry drift.
  • Provenance combines SynthID watermarks with C2PA Content Credentials to mitigate deepfake risk.

A Minimal Text-to-Video Pipeline

Open-source libraries make the core loop concrete. The Hugging Face diffusers library exposes the ModelScope text-to-video model through its standard pipeline interface, so a prompt becomes a list of frames in a few lines. The example below loads the model in half precision, runs the diffusion sampler for a set number of steps, and writes the resulting frames to an MP4 file.

The pattern mirrors text-to-image usage but returns many frames instead of one. The number of inference steps trades quality against speed, and memory offloading keeps the model runnable on a single consumer GPU. The same conceptual call, encode the prompt, denoise a latent video, decode to frames, underlies the larger proprietary systems even though their models and scale differ greatly.

Reproducing higher quality requires far more compute, larger models, and longer training data than this checkpoint represents. The snippet is a teaching example of the interface, not a state-of-the-art result, and outputs from small open models are short and lower in fidelity than the milestone systems described above.

python
import torch
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
from diffusers.utils import export_to_video

# ModelScope text-to-video checkpoint hosted on the Hugging Face Hub
pipe = DiffusionPipeline.from_pretrained(
    "ali-vilab/text-to-video-ms-1.7b",
    torch_dtype=torch.float16,
    variant="fp16",
)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()  # fit on a single consumer GPU

prompt = "a red fox trotting across fresh snow at sunrise"
frames = pipe(prompt, num_inference_steps=25).frames
export_to_video(frames, "out.mp4")
A minimal diffusers text-to-video call using the ali-vilab/text-to-video-ms-1.7b checkpoint, which returns a list of frames written to an MP4 file.
  • diffusers wraps a text-to-video model behind the same pipeline API as image models.
  • The call returns a sequence of frames that a helper writes to a video file.
  • num_inference_steps trades sample quality against generation speed.
  • CPU offloading lets the model fit on a single consumer GPU.

Key takeaways

  • Text-to-video turns a prompt into an ordered sequence of frames, represented as a tensor x in ℝ^{T×H×W×C}.
  • It is harder than text-to-image because of temporal consistency, motion dynamics, and far higher compute and data cost.
  • The dominant approach is diffusion extended over time, usually latent video diffusion with diffusion-transformer denoisers on spacetime patches.
  • Milestones: CogVideo, Make-A-Video (Sept 29 2022), and Imagen Video (Oct 5 2022), then Sora (announced Feb 15 2024, released Dec 9 2024).
  • Limitations include physics errors, temporal flicker, short clip length, weak control, and drift over long clips.
  • Provenance now layers SynthID watermarks with C2PA Content Credentials to address deepfake risk.

Frequently asked questions

Text-to-image produces one still picture, while text-to-video produces an ordered sequence of frames. The added requirement is temporal consistency, meaning appearance, motion, and object identity must stay coherent from frame to frame. This makes video far more compute-intensive and data-hungry at the same resolution.
Sora was announced on February 15, 2024, alongside the technical report titled "Video generation models as world simulators." That was a preview with sample clips, not a public product. A faster version called Sora Turbo became available to ChatGPT Plus and Pro subscribers on December 9, 2024.
In 2022, CogVideo from Tsinghua University and BAAI was an early large model at 9.4 billion parameters. Meta announced Make-A-Video on September 29, 2022, and Google detailed Imagen Video on October 5, 2022. Imagen Video could reach 1280 by 768 resolution at 24 frames per second but was not released publicly.
Most use diffusion models extended to the time dimension, frequently latent video diffusion that compresses both space and time before denoising. Recent systems use diffusion-transformer architectures that split the latent video into spacetime patches treated as transformer tokens. Sora is the best-known example of this spacetime-patch design.
Clips are short, usually seconds rather than minutes, and physics can break so objects deform or pass through each other. Fine textures can flicker between frames, and control over camera path and object placement is limited. Errors also tend to compound over longer clips, causing identity and geometry drift.
Providers attach provenance signals so content can be identified as AI-generated. Google's SynthID embeds an imperceptible watermark that survives common transformations, and C2PA Content Credentials record creator, tool, and edit history as signed metadata. The two are combined because metadata can be stripped while a durable watermark persists.