How Diffusion Transformers Generate Images and Video

A diffusion transformer, commonly called a DiT, is the architecture behind most of today’s leading image and video generators. It replaces the U-Net backbone that earlier diffusion models relied on with a transformer, the same family of neural network that powers large language models. This swap turned out to unlock better scaling, sharper outputs, and more flexible conditioning on text prompts and other inputs. The architecture has spread quickly from image generation into video, 3D content, and even protein design, though its computational appetite remains a real obstacle.

How a Diffusion Transformer Works

A standard diffusion model learns to reverse a noise-adding process: you start with clean data, gradually add random noise until the image is pure static, and then train a neural network to predict and remove that noise step by step. In early diffusion models, the noise-prediction network was a U-Net, a convolutional architecture borrowed from medical image segmentation. A diffusion transformer swaps in a transformer for that job. The input image (or video frame, or latent representation of one) gets chopped into patches, each patch becomes a token, and the transformer processes those tokens through layers of self-attention, much like a language model processes words.

One of the architectural details that turned out to matter more than expected is how the model incorporates conditioning information like the current noise level (timestep) and any text prompts. The dominant approach uses a mechanism called adaptive layer normalization with zero initialization, or adaLN-Zero. Rather than feeding conditioning signals through cross-attention or simple concatenation, adaLN-Zero adjusts the scale and shift parameters of each normalization layer based on the timestep and prompt. Research into why this works so well found that the zero-initialization component is the most influential factor, more so than the overall structure or the order of updates. That zero initialization essentially lets the model start training with each transformer block acting as an identity function, gradually learning to contribute, which stabilizes early training and improves optimization efficiency.

1arXiv. Unveiling the Secret of AdaLN-Zero in Diffusion Transformer

The Attention Bottleneck

The transformer’s biggest advantage is also its biggest headache. Self-attention lets every token interact with every other token, which is how the model captures long-range relationships in an image. But the computational cost of self-attention grows with the square of the number of tokens. Double the image resolution and you roughly quadruple the token count, which means the attention computation alone can balloon by a factor of sixteen. At high resolutions, this becomes the dominant cost. Tokenizing a 2K-by-2K image can produce around 16,000 tokens, and computing attention over that many tokens takes several seconds even on a top-end GPU like an NVIDIA A100.

2arXiv. DiTFastAttn: Attention Compression for Diffusion Transformer Models

This cost profile means that generating a single high-resolution image is already expensive, and generating video, where you add a time dimension on top of spatial resolution, makes the problem dramatically worse. Much of the current research around diffusion transformers is aimed squarely at this bottleneck, either by compressing the latent representation so the transformer sees fewer tokens or by finding ways to approximate or skip attention computations that contribute little to the final output.

Shrinking the Problem with Better Compression

One strategy is to push more of the compression workload onto the autoencoder that sits in front of the transformer. In a latent diffusion setup, the model does not operate directly on raw pixels. Instead, a variational autoencoder (VAE) first encodes the image into a much smaller latent space, and the diffusion transformer works in that compressed space. The question is how aggressively you can compress without losing quality.

Research on deep compression autoencoders found that directly training the autoencoder to reach a high spatial compression ratio produces better results than combining a low-compression autoencoder with a separate downsampling trick inside the transformer. In other words, shifting more of the spatial compression burden from the transformer to the autoencoder consistently improves image quality as measured by standard benchmarks.

3arXiv. Deep Compression Autoencoder for Efficient High-Resolution Diffusion Models

Quantization offers another angle. Normally, neural network weights and activations are stored in 32-bit or 16-bit floating-point numbers. Quantization squeezes those down to 8-bit or even 4-bit integers, which cuts memory use and speeds up computation. But diffusion transformers are tricky to quantize because they have channels with extreme magnitudes and because the distribution of important activations shifts across timesteps. Specialized post-training quantization methods have been developed to handle these quirks, successfully compressing DiTs to 8-bit precision for both weights and activations while preserving image quality, and pushing weight precision down to 4 bits for the first time.

4NeurIPS. PTQ4DiT: Post-Training Quantization for Diffusion Transformers

From Images to Video

Video generation is where diffusion transformers have arguably had their most visible impact. The jump from images to video means the model has to handle not just spatial coherence within each frame but temporal coherence across frames, keeping objects, lighting, and motion consistent over time. Several architectures have tackled this by extending the DiT framework to work with spatiotemporal tokens.

Latte, one of the earlier video-focused diffusion transformers, takes the straightforward approach of extracting spatiotemporal tokens from input video clips and then running them through a series of transformer blocks that model the video’s distribution in latent space.

5arXiv. Latte: Latent Diffusion Transformer for Video Generation

Getting video generation fast enough to be practical requires extreme compression. LTX-Video pushes this further with a Video-VAE that achieves a compression ratio of 1:192, meaning each token in the transformer’s input represents a block of 32×32×8 pixels worth of spatiotemporal information. The key design choice is relocating the patchifying operation (the step that chops input into token-sized pieces) from the transformer’s input to the VAE’s input, which lets the autoencoder handle that spatial and temporal downsampling more efficiently.

6arXiv. LTX-Video: Realtime Video Latent Diffusion

There’s a deeper question lurking behind video generation: are these models actually learning anything resembling physics? Scaling up video diffusion transformers has led to the emergence of spatial consistency and behaviors that look like physical world simulation. But whether these models truly discover physical laws from visual data alone, or just learn convincing surface-level patterns, remains contested. Researchers examining this from a physical-law perspective have raised skepticism about conflating visual plausibility with genuine physical understanding.

7PubMed Central. How Far is Video Generation from World Model: A Physical Law Perspective

What DiTs Actually Learn Inside

Interpretability research has revealed that diffusion transformers develop surprisingly meaningful internal representations. Work on probing the features inside DiT attention layers found that the models learn highly interpretable concepts, and that these internal representations can be repurposed for tasks like image segmentation without any additional training.

One counterintuitive finding: you might expect that later timesteps in the diffusion process (when the image is almost fully denoised and contains the most information) would produce the best internal representations for segmentation. Instead, the middle timesteps, roughly halfway through the denoising process, yield the strongest segmentation performance. The features at those intermediate stages seem to capture a useful balance between high-level semantic structure and low-level spatial detail.

8arXiv. ConceptAttention: Diffusion Transformers Learn Highly Interpretable Features

This matters beyond academic curiosity. If DiTs develop rich semantic understanding of the scenes they generate, those internal features could be reused for other computer vision tasks, turning a generative model into a dual-purpose tool for both creation and analysis.

Beyond Pictures and Video

The diffusion transformer framework has started appearing in domains that have nothing to do with photographs or films. One striking example is protein design. ProDiT, a multimodal diffusion transformer trained on sequences, 3D structures, and functional annotations for 214 million proteins, can generate novel proteins that preserve known active and binding site motifs. It can be conditioned on specific molecular functions spanning 465 Gene Ontology terms, essentially letting researchers specify what biological role they want a protein to fill and having the model design one from scratch.

9PubMed Central. Generating functional and multistate proteins with a multimodal diffusion transformer

The reason the architecture transfers so well across domains is that the core idea, learning to reverse a noise process using a transformer, does not assume anything specific about images. As long as you can represent your data as a sequence of tokens in some latent space, the same machinery applies. Protein structures, 3D point clouds, audio spectrograms, and molecular conformations can all be tokenized and denoised. The transformer’s ability to model complex dependencies between tokens gives it an edge in domains where long-range relationships matter, which is most domains worth caring about.

The Autoregressive Alternative

Diffusion transformers are not the only game in town for high-quality image generation. Autoregressive (AR) models, which generate data token by token in a fixed order the way a language model generates text word by word, have been the dominant approach in language and have made inroads into images. For a while, diffusion transformers held a clear quality advantage over AR image generators. That lead has narrowed.

Visual Autoregressive Modeling (VAR) introduced a next-scale prediction approach that, for the first time, made AR models surpass diffusion transformers on the standard ImageNet benchmark. VAR improved the baseline AR model’s image quality score dramatically and achieved roughly 20 times faster inference speed than DiT. The researchers verified that VAR outperformed the diffusion transformer across multiple dimensions including image quality, inference speed, data efficiency, and scalability.

10NeurIPS Proceedings. Visual Autoregressive Modeling Scalable Image Generation via Next-Scale Prediction

That said, benchmark leaderboards and real-world deployment are different things. DiTs still dominate commercial image and video generation products, partly because the diffusion framework offers natural advantages for tasks like inpainting, style transfer, and controlled generation that are harder to shoehorn into a purely autoregressive pipeline. The two paradigms are also starting to blur: some newer architectures combine autoregressive and diffusion elements, generating at multiple scales or using AR for coarse structure and diffusion for fine detail.

Customization Without Full Retraining

One of the practical challenges with any large generative model is personalization. If you want a diffusion transformer to generate images of a specific person, product, or style, fine-tuning the entire model on new examples is expensive and slow. Low-Rank Adaptation (LoRA) has become the standard solution: instead of updating all the model’s weights, you train a small set of low-rank weight matrices that adjust the model’s behavior. The base model stays frozen, and the LoRA weights are cheap to store and swap.

Researchers have pushed this further in two interesting directions. DiffLoRA uses a diffusion model itself as a hypernetwork to predict personalized LoRA weights directly from reference images. Instead of training LoRA weights through iterative optimization, the system generates them in a single forward pass, enabling zero-shot personalization with no post-processing step needed.

11arXiv. DiffLoRA: Generating Personalized Low-Rank Adaptation Weights with Diffusion

In-Context LoRA takes a different tack by exploiting the in-context learning abilities that DiTs naturally develop. The approach is remarkably simple: concatenate multiple images (rather than just their tokens), write joint captions describing them, and apply task-specific LoRA tuning on very small datasets of 20 to 100 samples. This lets the model learn to perform new visual tasks from just a handful of examples, similar to how large language models can learn new tasks from a few in-context demonstrations.

12arXiv. In-Context LoRA for Diffusion Transformers

Training Infrastructure Pressures

Training a large diffusion transformer is an infrastructure challenge that goes beyond just having enough GPUs. Video models in particular create severe load-balancing problems because different video clips in a training batch can have wildly different lengths and resolutions, leading to uneven work distribution across GPU workers. Some GPUs finish early and sit idle while others are still processing their longer clips.

Work on adaptive load balancing for video diffusion transformer training has demonstrated that straightforward rebalancing strategies can meaningfully improve efficiency. On the Wan 2.1 video model, for example, adaptive load distribution reduced the computational imbalance rate from about 39% to 19%, improved peak memory utilization efficiency by roughly 23%, and boosted overall training throughput by about 27%.

13arXiv. AdaptiveLoad: Towards Efficient Video Diffusion Transformer Training

These numbers hint at how much performance is being left on the table with naive training setups. As models continue to scale, the engineering around training, not just the architecture itself, increasingly determines what is practically buildable.

Watermarking Generated Video

As video diffusion transformers produce increasingly realistic output, the question of how to identify AI-generated content becomes pressing. Watermarking embeds an invisible signal into generated content that can later be decoded to confirm its origin. Doing this for video is harder than for images because a video watermark has to survive not only standard image distortions like compression and cropping but also temporal attacks like frame dropping or reordering.

LVMark is a watermarking method designed specifically for latent video diffusion models. It works by embedding watermarks into model layers that have minimal impact on visual appearance, using an importance-based weighting strategy, and decoding them using the consistency between adjacent frames. The approach combines low-frequency components from a three-dimensional wavelet decomposition with color features, achieving 512-bit watermark capacity while remaining robust to distortions and visually invisible.

14arXiv. LVMark: Robust Watermark for Latent Video Diffusion Models

The 512-bit capacity is worth noting because it is large enough to encode meaningful metadata, like a model identifier, timestamp, or user ID, not just a single-bit “yes this was generated” flag. Whether watermarking will be required by regulation or adopted voluntarily by model providers remains an open question, but the technical capability is advancing in parallel with generation quality.

The Role of Training Data Quality

Architecture and scale get most of the attention, but training data quality shapes what a diffusion transformer can do in surprisingly specific ways. Research on text rendering in generated images, one of the classic failure modes of image generators, found that the level of caption refinement in training data directly affected model accuracy. Models trained on less-refined captions performed worse than those trained on highly refined ones.

More unexpectedly, simply expanding the dataset with synthetic image-caption pairs containing only text content actually hurt performance. Adding random character datasets helped at large scale but not at small scale. And relying solely on synthetic data caused a significant drop in the model’s ability to generate accurate visual text.

15arXiv. Improving Text Generation on Images with Synthetic Captions

These findings push back against the intuition that more data is always better. For diffusion transformers, the composition and quality of training data can matter as much as quantity, and naive strategies for augmenting datasets with synthetic examples can backfire in ways that are hard to predict without careful experimentation.