Code for Movies

Code for Movies Team

Demo Video

TL;DR: We maintain the state of a movie as explicit 3D code and persistent appearance/scene knowledge bases, render each clip from the current state with identity-colored Three.js blockouts, and feed each generated clip back to correct drift across cuts.

Abstract

A movie requires arbitrary duration, several scenes, many shots, and consistency. Video generation models infer each clip rather than compute it, so no spatial structure survives a shot, and a single call is bounded in length. Code is a viable alternative representation, but existing code-based pipelines are open loop, so errors accumulate and textures drift across viewpoints. We present Code for Movies, a closed-loop Markov process over code. A language model, as the primary generator, maintains the state of the movie as code, a video model renders each clip from the current state alone, and each clip is fed back to correct the state. A movie can thus grow to arbitrary length, and a cut becomes a change of camera within the same state. Knowledge bases of characters, scenes, and textures keep content consistent, and an efficient pipeline runs the loop. Movie Bench probes three capabilities, keeping appearance, keeping spatial relations plausible, and knowing what should change, under five kinds of test. To our knowledge, this is the first model that automatically generates arbitrarily long movies with natural shot transitions and consistent content, at low latency and cost.