Modern text-to-video models like OpenAI's Sora build a video by first compressing it into a grid of "spacetime patches," then having a transformer iteratively strip noise from that grid while conditioning every step on your text prompt. The result is a clip whose frames agree with each other and with the prompt. Here is how that pipeline works, stage by stage.

Introduction to Text-to-Video AI and Sora

Text-to-video generation has become one of the most active frontiers in generative AI, because it aims to produce not just a realistic image but a sequence of frames with high visual fidelity and coherent transitions through time, as a recent academic review of the field notes. That extra dimension is what makes video uniquely hard: the model must keep characters, objects, and backgrounds consistent while producing motion that looks natural.

OpenAI's February 2024 technical report on Sora describes a representative solution: text-conditional diffusion models trained jointly on videos and images of variable durations, resolutions, and aspect ratios, with a transformer architecture operating on spacetime patches of video and image latent codes. That one sentence packs in the three ideas this article unpacks: a compressed latent representation, a diffusion process, and a transformer that ties everything to the prompt. We will use Sora as the running example, not because it is the only such model, but because its creators have described the architecture publicly.

Video as Spacetime Patches: The Foundation

A video is far too large to feed into a model pixel by pixel, so the first stage compresses it. OpenAI's report describes a network that compresses raw video into a latent space; the model does its generative work in that compressed space, and a corresponding decoder turns latent representations back into full video. This is analogous to how large language models never see raw text, only tokens.

Within that latent space, the video is chopped into "spacetime patches" — small chunks that cover both spatial regions of the frame and moments in time. Because a patch carries position in time as well as in space, the model can treat a video clip as a single unified sequence of pieces rather than as separate frames to be stitched together afterward. This unified handling of spatial and temporal information is what lets later stages reason about motion, and OpenAI explicitly frames these patches as the token-like building blocks its transformer operates on.