Scalable latent video diffusion via transformers

By integrating a transformer backbone with a unified latent space and parameter-efficient architecture, the latent video diffusion model addresses memory constraints and scalability issues, achieving efficient video generation with high quality and reduced artifacts.

WO2025111468A1PCT designated stage expired Publication Date: 2025-05-30GOOGLE LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/US2024/056907
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-22
Filing Date
2024-11-21
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Current latent video diffusion models face challenges in integrating transformers due to memory constraints and the need for efficient spatiotemporal processing, which limits their scalability and performance in generating high-resolution videos.

Method used

The integration of a transformer backbone in latent video diffusion models, featuring an encoder that compresses 3D video volumes and 2D images into a unified latent space, and a parameter-efficient transformer architecture that performs spatial and spatiotemporal self-attention operations, enabling efficient joint training on image and video datasets.

Benefits of technology

This approach achieves computational efficiency, enables joint training on diverse datasets, and produces high-quality, temporally consistent videos with fewer model parameters and reduced flickering artifacts, outperforming prior works in various video generation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2024056907_30052025_PF_FP_ABST
    Figure US2024056907_30052025_PF_FP_ABST
Patent Text Reader

Abstract

Methods, systems, and apparatus for scalable latent video diffusion via transformers. In one aspect a method includes generating, using an encoder and from respective videos and collections of images, latent tensors, each latent tensor representing a respective one of the videos or a respective one collection of images, wherein each latent tensor is included in a same latent space; and training a transformer backbone using the latent tensors, the transformer backbone comprising: one or more first self-attention layers that each perform spatial self-attention operations modeling spatial relations in each latent tensor; and one or more second self-attention layers that each perform spatiotemporal self-attention operations modeling spatiotemporal dynamics in latent tensors generated from videos.
Need to check novelty before this filing date? Find Prior Art

Description

[0001]Attorney Docket No.: 56113-0590WO1 SCALABLE LATENT VIDEO DIFFUSION VIA TRANSFORMERS BACKGROUND This specification relates to model systems, and in particular, latent video diffusion models. Transformers are highly scalable and parallelizable neural network architectures. Transformers are increasingly favored over domain-specific architectures in the fields of language, audio, speech, vision and robotics. An exception to this trend, however, is generative modeling of videos. Diffusion models have emerged as a leading paradigm for generative modeling of images and videos. The U-Net architecture, consisting of a series of convolutional and self- attention layers, has been the predominant back bone in video diffusion approaches. This preference stems from the fact that the memory demands of full attention mechanisms in transformers scale quadratically with input sequence length. Such scaling leads to prohibitively high costs when processing high-dimensional signals like video. Latent diffusion models (LDMs) reduce computational requirements by operating in a lower-dimensional latent space derived from an autoencoder. A critical design choice in this context is the type of latent space employed: spatial compression (per frame latents) versus spatiotemporal compression. Spatial compression is often preferred because it enables leveraging pre-trained image autoencoders and LDMs, which are trained on large paired image-text datasets. However, this choice increases network complexity and limits the use of transformers as backbones, especially in generating high-resolution videos due to memory constraints. On the other hand, while spatiotemporal compression can mitigate these issues, it precludes the use of paired image-text datasets, which are much larger and diverse than their video counterparts. SUMMARY This specification describes system and methods for integrating transformers in latent video diffusion models. This written description describes systems and method for integrating transformers as the core backbone in latent video diffusion models. This is achieved through the design of two features. The first feature is an encoder designed to compress 3D video volumes and 2D images within a single, unified latent space. The second features is a parameter-efficient Attorney Docket No.: 56113-0590WO1 transformer architecture tailored for spatiotemporal generative modeling within the diffusion framework. In an implementation, a computer-implemented method comprises generating, using an encoder and from respective videos and collections of images, latent tensors, each latent tensor representing a respective one of the videos or a respective one collection of images, wherein each latent tensor is included in a same latent space; and training a transformer backbone using the latent tensors, the transformer backbone comprising: one or more first self-attention layers that each perform spatial self-attention operations modeling spatial relations in each latent tensor; and one or more second self-attention layers that each perform spatiotemporal self-attention operations modeling spatiotemporal dynamics in latent tensors generated from videos. In this way, the transformer backbone may be configured for use in one or more machine learning tasks, e.g. a machine learning task such as a visual generation task (e.g. image or video generation). The machine learning task may be class-conditional image or video generation. The machine learning task may be textconditioned image or video- generation, e.g. text-to-image generation or text-to-video generation. The machine learning task may be video frame prediction. The machine learning task may be super-resolution image or video refinement. In an additional aspect, one or more layers of the transformer backbone are configured to perform operations comprising applying cross-attention for text-condition generation of an output, comprising cross-attending the latent tensors with latent representations of a query and a conditioning signal. In an additional aspect, generating the latent tensors comprises, for each respective video, encoding a first frame of the video independently from subsequent frames of the video. In an additional aspect, the encoder is a causal autoencoder. In an additional aspect, the spatialtemporal layers comprise an identity attention mask for each latent tensors generated from a respective collection of images. In an additional aspect, the transformer backbone comprises adaptive normalization layers. In an additional aspect, training the transformer backbone comprises concatenating a model estimate of the transformer backbone with an input along a channel dimension to self- condition. In an additional aspect, a system comprises one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more Attorney Docket No.: 56113-0590WO1 computers, to cause the one or more computers to perform the operations of the method described above. In an additional aspect, a computer storage medium is encoded with instructions that, when executed by one or more computers, cause the one or more computers to perform the operations of method described above. Some implementations of the subject matter described herein may realize, in certain instances, one or more of the following advantages. Examples of the presently described systems and methods achieve computational efficiency (since, e.g., the use of local window attention significantly lowers computational demands) and enable joint training on image and video datasets, where spatial layers independently process images and video frames whilst spatiotemporal layers are dedicated to modeling the temporal relationships in videos. Further, in contrast to methods based on frame level autoencoders, examples of the presently described systems and methods do not suffer from flickering artifacts, which often result from encoding and decoding video frames independently. In applications of the presently described systems and methods to image prediction, the presently described systems and methods outperform prior works without requiring specialized schedules, convolution inductive bias, improved diffusion losses, and classifier free guidance. Although some prior works have slightly better Fréchet Inception Distance score, their models also have significantly more parameters (2B). In applications of the presently described systems and methods to video generation, the presently described systems and methods achieve state-of-the-art performance with less model parameters (compared to prior works), and only 50 Denoising Diffusion Implicit Models (DDIM) inference steps. The details of one or more embodiments of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other potential features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims. DESCRIPTION OF DRAWINGS FIG.1 is a block diagram of an example Window Attention Latent Transformer (WALT) system for scalable latent video diffusion. FIG.2 is a block diagram of an example transformer block. Attorney Docket No.: 56113-0590WO1 FIG.3 is a flow chart of an example process for training a transformer backbone in a latent video diffusion model. FIG.4 shows two tables the compare the performance of the presently described WALT systems and methods to prior work. FIG.5 shows frames from an example video generated by the presently described WALT system and methods. FIG.6 shows frames from an example video generated presently described WALT system and methods. Like reference symbols in the various drawings indicate like elements. DETAILED DESCRIPTION This specification describes a transformer-based method and system for latent video diffusion models (LVDMs) referred to as Window Attention Latent Transformer (WALT). An autoencoder maps videos and images into a unified, lower-dimensional latent space. This enables training a single generative model jointly on image and video datasets and significantly reduces the computational burden for generating high resolution videos. The encoded videos and images are processed through transformer blocks in a latent video diffusion model. The transformer blocks are composed of self-attention layers that alternate between non-overlapping, window-restricted spatial and spatiotemporal attention. FIG.1 is a block diagram of an example Window Attention Latent Transformer (WALT) system 100 for scalable latent video diffusion. The example WALT system 100 is an example of a system implemented as computer programs on one or more computers in one or more locations, in which the systems, components, and techniques described herein can be implemented. The example WALT system 100 includes a joint causal 3D encoder 102 and a latent video diffusion model 104, which in turn includes a transformer backbone 106. The components of the example WALT system 100 can be connected via a network, e.g., a local area network (LAN), wide area network (WLAN), the Internet, or a combination thereof, which can be accessed over a wired and / or a wireless communications link. The joint causal 3D encoder 102 is configured to encode a collection of images 108 and videos 110 into latent tensors 112 in a shared latent space. The shared latent space representation can be a shared and unified compressed visual representation that can be used for generative modeling of both images and videos. The unified aspect of the representation Attorney Docket No.: 56113-0590WO1 can be important because joint image-video learning is preferable due to a scarcity of labeled video data, such as text-video pairs. In more detail, the videos 110 can include a video sequence ^^ ∈ ℝ^^ା்^ൈுൈ^ൈ^, where ^^ represents temporal dimension, ^^ represents heightdimension, ^^ represents width dimension, and ^^ represents channel dimension. The joint causal 3D encoder 102 learns a corresponding low dimensional representation (latent tensor) ^^ ∈ ℝ^^ା௧^ൈ^ൈ௪ൈ^ that performs spatial-temporal compression by a factor of ^^^ ൌ ^^ / ℎ ൌ^^ / ^^ in space and a factor of ^^௧ ൌ ^^ / ^^ in time. To enable a unified representation for bothvideos and static images, the first frame can be encoded independently from the rest of the video. This allows static images ^^ ∈ ℝ^ൈுൈ^ൈ^ to be treated as videos with a single frame,i.e. ^^ ∈ ℝ^ൈ^ൈ௪ൈ^.In some implementations this design can be instantiated with a causal 3D CNN encoder-decoder architecture, e.g., the architecture of the MAGVIT-v2 tokenizer. Typically, encoder-decoders include multiple regular 3D convolution layers which cannot process the first frame independently. This limitation stems from the fact that a regular convolutional kernel of size ^^^௧, ^^^ ,^^௪^ will operate on ^^^ି^ ଶ^frames before and^^^ଶ^f frames after theinput frames. This issue can be solved 3D layers, as the convolutional kernel operates on only the past ^^௧ െ 1 frames. This ensures that the output foreach frame is influenced solely by the preceding frames, enabling the model to tokenize the first frame independently. The joint causal 3D encoder 102 is configured to output a batch of latent tensors 112 ^^ ∈ ℝ^^ା௧^ൈ^ൈ௪ൈ^ that represent a single video or a stack of 1 ^ ^^ independent images. those different to the present disclosure) the latent representation is real-valued and quantization-free. The batch of latent tensors 112 are provided to the latent video diffusion model 104 as input, e.g., to the transformer backbone 106. The transformer backbone 106 is configured to jointly process the latent tensors, e.g., as a mixed batch of images and videos. In some implementations, each latent tensor is “patchified” independently by converting it into a sequence of non-overlapping ℎ^ ൈ ^^^patches where ℎ^ ൌ ℎ / ^^, ^^^ ൌ ^^ / ^^ and ^^ is the patch size. In some implementationslearnable positional embeddings can be used, which are the sum of space and time positional embeddings. The position embeddings can be added to the linear projections of the patches. For images, the temporal position embedding corresponding to the first latent frame is added. Attorney Docket No.: 56113-0590WO1 The transformer backbone 106 processes the latent tensors using one or more transformer blocks. Transformer backbones composed entirely of global self-attention modules incur significant compute and memory costs, especially for video tasks. For efficiency and for processing images and videos jointly, the transformer backbone 106 computes self-attention in windows, based on two types of nonoverlapping configurations: spatial (S) and spatiotemporal (ST). Spatial Window (SW) attention is restricted to all thetokens within a latent frame of size 1 ൈ ℎ^ ൈ ^^^ (the first dimension is time). SW modelsthe spatial relations in images and videos. Spatiotemporal Window (STW) attention isrestricted within a 3D window of size ^1 ^ ^^^ ൈ ℎᇱ^ ൈ ℎ௪ᇱ , modeling the temporalrelationships among video latent frames. For images, an identity attention mask can be used to ensure that the value embeddings corresponding to the image frame latents are passed through the layer as is. Finally, in addition to absolute position embeddings, relative position embeddings can be used. In some implementations pretrained image latent video diffusion models with transformer backbones can be leveraged by interleaving STW layers. An example transformer block is described below with reference to FIG.2. In some implementations, the latent video diffusion model 104 can be trained to perform conditional video generation. To enable conditional video generation, in addition to conditioning on timestep t, diffusion models are sometimes conditioned on additional conditional information ^^ such as class labels, natural language, past frames or low resolution videos. In some implementations the transformer backbone 106, can incorporate one or more of the following types of conditioning mechanisms: cross attention, AdaLN-LoRA, or self- conditioning. For cross-attention, in addition to the self-attention layers in the window transformer blocks, a cross-attention layer for text conditioned generation is added. When training models on just videos, the cross-attention layer employs the same window-restricted attention as the self-attention layer, meaning S / ST blocks will have SW / STW cross-attention layers. However, for joint training, only SW cross attention layers are used. For cross-attention, the input signal (query) can be concatenated with the conditioning signal (key, value) since this has shown to achieve improved performance. For AdaLN-LoRA, adaptive normalization layers are an important component in a broad range of generative and visual synthesis models. In some implementations adaptive layer normalization can be incorporated by including, for each layer ^^, a multilayerperceptron (MLP) layer to regress a vector of conditioning parameters ^^^ ൌ ^^^^^^^^^ ^ ^^^, Attorney Docket No.: 56113-0590WO1where ^^^ ൌ ^^^^^^^^^^^^^^^ ^ ^ൈௗ^, ^^ଶ,^^^,^^ଶ,^^^,^^ଶ^, ^^ ∈ ℝ ^^^^^ , and ^^ ∈ ℝௗ^^^^^ , ^^ ∈ ℝௗ^^^^^ arethe condition and timestep embeddings. In the transformer block, γ and β scale and shift the both the multi-head attention and MLP layers. The parameter count of these additional MLP layers scales linearly with the number of layers and quadratically with the model’s dimensional size (num blocks × ^^^^ௗ^^× 6 × ^^^^ௗ^^). For example, in a ViT-g model with 1B parameters, the MLP layers contribute an additional 475M parameters. A solution referred to herein as AdaLN-LoRA can be implemented to reduce the model parameters. For each layer, conditioning parameters are regressed as ^^^ ൌ ^^^^^^^^^ ^ ^^^, ^^^ ൌ ^^^ ^ ^^^^^^^^^^^ ^ ^^^ ∀^^ ് 1,where ^^^^ ∈ ℝௗ^^^^^ൈ^, ^^^^ ∈ ℝ^ൈ^^ൈௗ^^^^^^. This reduces the number of trainable modelsignificantly when ^^ ≪ ^^^^ௗ^^. For example, a ViT-g model with ^^ ൌ 2 reducesparameters from 475M to 12M. In addition to being conditioned on external inputs, iterative generative algorithms can also be conditioned on their own previously generated samples during inference. The training process for diffusion models can be modified such that with some probability ^^^^themodel first generates a sample ^^^^ ൌ ^^ఏ^^^௧; 0, ^^, ^^^ and then refines this estimate usinganother forward pass conditioned on this initial sample: ^^ఏ^^^௧; ^^^^^^^^^^^^^^^^^^^^^ ^, ^^, ^^^. Withprobability 1 െ ^^^^, only a single forward pass is done. The model estimate is concatenatedwith the input along the channel dimension. This technique can be particularly beneficial when used in conjunction with v-prediction. In some implementations, the latent video diffusion model 104 can be trained jointly on the task of frame prediction, e.g., for generating long videos via autoregressive prediction. This can be achieved by training the model on past frames with a probability of ^^^^duringtraining. Specifically, the model is conditioned using ^^^^ ൌ ^^^^^^^^^^^^^^^^^ ◦ ^^௧ ,^^^^^, where^^ is a binary mask. The binary mask indicates the used conditioning. The model can be conditioned on either 1 latent frame (image to video generation) or 2 latent frames (video prediction). This conditioning can be integrated into the model through concatenation along the channel dimension of the noisy latent input. During inference, classifier-free guidance with ^^^^as the conditioning signal can be used. Attorney Docket No.: 56113-0590WO1 In some implementations, the latent video diffusion model 104 can be trained to generate high-resolution videos. Generating high-resolution videos with a single model is computationally prohibitive. In some implementations, a cascaded approach can be used with three models operating at increasing resolutions. A base model generates videos at a first resolution, e.g., 128 × 128 resolution, which are subsequently up-sampled twice via two super resolution stages. The low resolution input ^^^^(video or image) can be spatially upscaled using a depth-to-space convolution operation. Unlike training where ground truth low-resolution inputs are available, inference relies on latents produced by preceding stages. To reduce this discrepancy and improve the robustness of the super-resolution stages in handling artifacts generated by lower resolution stages, noise conditioning augmentation can be used. For example, noise can be added in accordance with γ(t), by sampling a noise levelas ^^^^ ∼ ^^^0, ^^୫ୟ^ _^^^^^^ and be provided as input to the AdaLN-LoRA layers. In someimplementations aspect-ratio finetuning can be performed. For example, to simplify training and leverage broad data sources with different aspect ratios, the base stage can be trained using a square aspect ratio. The base stage can then be fine-tuned on a subset of data to generate videos with a different aspect ratio, e.g., 9 : 16 aspect ratio, by interpolating position embeddings. FIG.2 is a block diagram of an example transformer block 200 in a transformer backbone, e.g., the transformer backbone 106 of FIG.1. The transformer block includes a spatial window which, in turn, includes a spatial self-attention layer 202 and a spatial cross attention layer 204. The spatial self-attention layer 202 is configured to perform spatial self- attention operations that model spatial relations in each latent tensor. In some implementations the spatial window attention is restricted to all the tokens within a latentframe of size 1 ൈ ℎ^ ൈ ^^^ (the first dimension is time).The transformer block 200 also includes a spatiotemporal window which, in turn, includes a spatiotemporal self-attention layer 206 and a spatial cross attention layer 208. The spatiotemporal self-attention layer 206 is configured to perform spatiotemporal self-attention operations that model spatiotemporal dynamics in latent tensors generated from videos. In some implementations the spatiotemporal window attention is restricted within a 3D windowof size ^1 ^ ^^^ ൈ ℎᇱ^ ൈ ℎ௪ᇱ , modeling the temporal relationships among video latentframes. In some the spatiotemporal layers self-attention include an identity attention mask for each latent tensors generated from a respective collection of images. In Attorney Docket No.: 56113-0590WO1 some implementations the transformer backbone also includes one or more adaptive normalization layers. In FIG. 2, ^^ ^^.^^ା௧^^ൈ^ ൈ௪ ൈ^^ ∈ ℝ ^ ^ is an input signal (query), ^^௧ ∈ℝ^^.^^^ൈ^^ା௧^ൈ^ᇱ^ൈ௪ᇱ^ൈ^ and ^^ ^^ ^^^^^^^^^^^^^^^^, ^^5௫^ ^^^^^^^^^^^ are the conditioning signal(key, . layers 204, 208, the input signal is concatenated with the performance. FIG.3 is a flow chart of an example process 300 for training a transformer backbone in a latent video diffusion model. For convenience, the process 300 will be described as being performed by a system of one or more computers located in one or more locations. For example, a WALT system, e.g., the WALT system 100 of FIG.1, appropriately programmed, can perform example process 300. The system uses an encoder to generate latent tensors from respective videos and collections of images (step 302). Each latent tensor represents a respective one of the videos or a respective one collection of images, where each latent tensor is included in a same latent space. In some implementations the encoder is a causal autoencoder. In some implementations the system encodes a first frame of the video independently from subsequent frames of the video. The system trains a transformer backbone using the latent tensors (step 304). The transformer backbone includes one or more first self-attention layers that each perform spatial self-attention operations modeling spatial relations in each latent tensor. The transformer backbone also includes one or more second self-attention layers that each perform spatiotemporal self-attention operations modeling spatiotemporal dynamics in latent tensors generated from videos. In some implementations the second layer self-attention include an identity attention mask for each latent tensors generated from a respective collection of images. In some implementations the transformer backbone also includes one or more adaptive normalization layers. One or more layers of the transformer backbone can be configured to apply cross-attention for text-condition generation of an output, e.g., by cross- attending the latent tensors with latent representations of a query and a conditioning signal. Training the transformer backbone can include concatenating a model estimate of the transformer backbone with an input along a channel dimension to self-condition. The system trains the transformer backbone to perform tasks related to image and video generation, e.g., conditional generation, autoregressive generation, or high-resolution Attorney Docket No.: 56113-0590WO1 video generation. In high-resolution video generation, the system can use a cascaded approach with three latent video diffusion models with respective transformer backbones. In some implementations the system can train a base stage using a square aspect ratio. The base stage can then be fine-tuned on a subset of data to generate videos with a non-square aspect ratio, e.g., a 9 : 16 aspect ratio. The absolute and relative position embeddings can be interpolated and window sizes can be scaled. After the transformer backbone (or more generally the latent video diffusion model) has been trained, the latent video diffusion model can be used at inference to perform a machine learning task, e.g. an image or video generation task (306). Performing the machine learning task may comprise processing a conditioning input using the model and generating a respective output. For example, for class-conditional image or video generation, the conditioning input may identify a class, and the output may comprise an image or video in that class. For text conditioned image or video generation (e.g. text-to-image generation or text-to-video generation), the conditioning input may comprise text describing the desired output image or video. For video frame prediction, the conditioning input may comprise one or more past frames, and the output may comprise one or more predicted frames. For super- resolution image or video refinement, the conditioning input may comprise an image or video respectively, and the output may comprise a refined image or video respectively. Example images / frames generated using example process 300 are shown in FIGS.5 and 6. In some implementations, e.g., long video generation, the latent video diffusion model can be trained jointly on the task of frame prediction. During inference, videos can be generated as follows: given a natural language description of a video, generate an initial number of frames, e.g., 17 frames, using a base model. Then, encode a last number of frames, e.g., 5 frames, into a smaller number of frames, e.g., 2 latent frames, using the causal 3D encoder. Providing 2 latent frames as input for subsequent autoregressive generation helps ensure that the model can maintain continuity of motion and produce temporally consistent videos. FIG.4 shows two tables the compare the performance of the presently described WALT systems and methods to prior work. The first table 400 shows results for video generation, with evaluation on frame prediction on the Kinetics-600 (K600) dataset for video prediction with 5 conditioning frames and class-conditional generation on the dataset UCF- 101 (UCF). The evaluation metric is Fréchet Video Distance (FVD), which measures the quality and realism of generated videos by comparing the distributions of generated video representations to those of real video data. As shown, across both datasets, the presently Attorney Docket No.: 56113-0590WO1 described WALT significantly outperforms all prior video diffusion models (TrIVD-GAN- FP, Video Diffusion, RIN, TATS, Phenaki, MAGVIT, MAGVITv2). Compared to the prior video diffusion models, the presently described WALT system achieves state-of-the-art performance with less model parameters, and only 50 Denoising Diffusion Implicit Models (DDIM) inference steps. Table 410 shows results for image generation. A WALT system was trained for a standard ImageNet class-conditional setting. For evaluation, the Fréchet Inception Distance (FID) and Inception scores calculated on 50K samples generated in 50 DDIM steps. In Table 510, the presently described WALT system and method is compared to state-of-the-art image generation methods (BigGAN-deep, LDM-4, DiT-XL / 2, ADM, MDT, MaskDiT, Rin, simple diffusion, VDM++) for 256 × 256 resolution. As shown, WALT model outperforms prior works without requiring specialized schedules, convolution inductive bias, improved diffusion losses, and classifier free guidance. Although VDM++ has slightly better FID score, the model has significantly more parameters (2B). FIG.5 shows frames from an example video generated by the presently described WALT system and methods from a natural language prompt “an astronaut riding a horse” at 512 × 896 resolution over 3.6 seconds duration at 8 frames per second. As shown, the WALT model is able to generate temporally consistent photorealistic videos that align with the textual prompt. FIG.6 shows frames from an example video generated presently described WALT system and methods from a natural language prompt “camera turns around a bunny, studio lighting, 360 degree rotation.” The corresponding video shows a consistent 3D camera motion. This specification uses the term “configured” in connection with systems and computer program components. For a system of one or more computers to be configured to perform particular operations or actions means that the system has installed on it software, firmware, hardware, or a combination of them that in operation cause the system to perform the operations or actions. For one or more computer programs to be configured to perform particular operations or actions means that the one or more programs include instructions that, when executed by data processing apparatus, cause the apparatus to perform the operations or actions. Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in Attorney Docket No.: 56113-0590WO1 this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non transitory storage medium for execution by, or to control the operation of, data processing apparatus. The computer storage medium can be a machine- readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Alternatively, or in addition, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The term “data processing apparatus” refers to data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). The apparatus can optionally include, in addition to hardware, code that creates an execution environment for computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A computer program, which may also be referred to or described as a program, software, a software application, an app, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub programs, or portions of code. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a data communication network. In this specification, the term “database” is used broadly to refer to any collection of data: the data does not need to be structured in any particular way, or structured at all, and it Attorney Docket No.: 56113-0590WO1 can be stored on storage devices in one or more locations. Thus, for example, the index database can include multiple collections of data, each of which may be organized and accessed differently. Similarly, in this specification the term “engine” is used broadly to refer to a software-based system, subsystem, or process that is programmed to perform one or more specific functions. Generally, an engine will be implemented as one or more software modules or components, installed on one or more computers in one or more locations. In some cases, one or more computers will be dedicated to a particular engine; in other cases, multiple engines can be installed and running on the same computer or computers. The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and one or more programmed computers. Computers suitable for the execution of a computer program can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, e.g., a universal serial bus (USB) flash drive, to name just a few. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT Attorney Docket No.: 56113-0590WO1 (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user’s device in response to requests received from the web browser. Also, a computer can interact with a user by sending text messages or other forms of message to a personal device, e.g., a smartphone that is running a messaging application, and receiving responsive messages from the user in return. Data processing apparatus for implementing machine learning models can also include, for example, special-purpose hardware accelerator units for processing common and compute-intensive parts of machine learning training or production, i.e., inference, workloads. Machine learning models can be implemented and deployed using a machine learning framework, e.g., a TensorFlow framework, a Microsoft Cognitive Toolkit framework, an Apache Singa framework, or an Apache MXNet framework. Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface, a web browser, or an app through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet. The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some embodiments, a server transmits data, e.g., an HTML page, to a user device, e.g., for Attorney Docket No.: 56113-0590WO1 purposes of displaying data to and receiving user input from a user interacting with the device, which acts as a client. Data generated at the user device, e.g., a result of the user interaction, can be received at the server from the device. While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially be claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination. Similarly, while operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products. Particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.

Claims

Attorney Docket No.: 56113-0590WO1 CLAIMS What is claimed is:

1. A computer-implemented method, comprising: generating, using an encoder and from respective videos and collections of images, latent tensors, each latent tensor representing a respective one of the videos or a respective one collection of images, wherein each latent tensor is included in a same latent space; and training a transformer backbone using the latent tensors, the transformer backbone comprising: one or more first self-attention layers that each perform spatial self-attention operations modeling spatial relations in each latent tensor; and one or more second self-attention layers that each perform spatiotemporal self- attention operations modeling spatiotemporal dynamics in latent tensors generated from videos.

2. The computer-implemented method of claim 1, wherein one or more layers of the transformer backbone are configured to perform operations comprising: applying cross-attention for text-condition generation of an output, comprising cross- attending the latent tensors with latent representations of a query and a conditioning signal.

3. The computer-implemented method of claim 1, wherein generating the latent tensors comprises, for each respective video, encoding a first frame of the video independently from subsequent frames of the video.

4. The computer-implemented method of claim 2, wherein the encoder is a causal autoencoder.

5. The computer-implemented method of claim 1, wherein the spatiotemporal layers comprise an identity attention mask for each latent tensors generated from a respective collection of images.

6. The computer-implemented method of claim 1, wherein the transformer backbone comprises adaptive normalization layers.Attorney Docket No.: 56113-0590WO1 7. The computer-implemented method of claim 1, wherein training the transformer backbone comprises concatenating a model estimate of the transformer backbone with an input along a channel dimension to self-condition.

8. A system comprising one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: generating, using an encoder and from respective videos and collections of images, latent tensors, each latent tensor representing a respective one of the videos or a respective one collection of images, wherein each latent tensor is included in a same latent space; and training a transformer backbone using the latent tensors, the transformer backbone comprising: one or more first self-attention layers that each perform spatial self-attention operations modeling spatial relations in each latent tensor; and one or more second self-attention layers that each perform spatiotemporal self- attention operations modeling spatiotemporal dynamics in latent tensors generated from videos.

9. The system of claim 8, wherein one or more layers of the transformer backbone are configured to perform operations comprising: applying cross-attention for text-condition generation of an output, comprising cross- attending the latent tensors with latent representations of a query and a conditioning signal.

10. The system of claim 8, wherein generating the latent tensors comprises, for each respective video, encoding a first frame of the video independently from subsequent frames of the video.

11. The system of claim 8, wherein the encoder is a causal autoencoder.

12. The system of claim 8, wherein the spatiotemporal layers comprise an identity attention mask for each latent tensors generated from a respective collection of images.

13. The system of claim 8, wherein the transformer backbone comprises adaptive normalization layers.Attorney Docket No.: 56113-0590WO1 14. The system of claim 8, wherein training the transformer backbone comprises concatenating a model estimate of the transformer backbone with an input along a channel dimension to self-condition.

15. A computer storage medium encoded with instructions that, when executed by one or more computers, cause the one or more computers to perform operations comprising: generating, using an encoder and from respective videos and collections of images, latent tensors, each latent tensor representing a respective one of the videos or a respective one collection of images, wherein each latent tensor is included in a same latent space; and training a transformer backbone using the latent tensors, the transformer backbone comprising: one or more first self-attention layers that each perform spatial self-attention operations modeling spatial relations in each latent tensor; and one or more second self-attention layers that each perform spatiotemporal self- attention operations modeling spatiotemporal dynamics in latent tensors generated from videos.

16. The computer storage medium of claim 15, wherein one or more layers of the transformer backbone are configured to perform operations comprising: applying cross-attention for text-condition generation of an output, comprising cross- attending the latent tensors with latent representations of a query and a conditioning signal.

17. The computer storage medium of claim 15, wherein generating the latent tensors comprises, for each respective video, encoding a first frame of the video independently from subsequent frames of the video.

18. The computer storage medium of claim 15, wherein the spatiotemporal layers comprise an identity attention mask for each latent tensors generated from a respective collection of images.

19. The computer storage medium of claim 15, wherein the transformer backbone comprises adaptive normalization layers.Attorney Docket No.: 56113-0590WO1 20. The computer storage medium of claim 15, wherein training the transformer backbone comprises concatenating a model estimate of the transformer backbone with an input along a channel dimension to self-condition.