Executive Summary
Text-to-video (T2V) models frequently struggle with compositional prompts involving multiple subjects and complex relationships. Comp-Attn introduces a training-free, "plug-and-play" module that resolves these issues through a novel "Present-and-Align" paradigm. By ensuring all requested subjects appear and are positioned correctly, Comp-Attn boosts benchmark scores by up to 15.7% with a negligible 5% increase in inference time, offering a highly efficient solution for state-of-the-art video generation.
The Challenge of Compositional Video Generation
Despite the impressive capabilities of modern video generation models like Wan2.1 and CogVideoX, they often fail when tasked with "compositional" scenes—prompts requiring multiple subjects with specific spatial or interactive relationships (e.g., "a cat and a dog running to the left, while a bear stays on the right").
The authors identify two primary failure modes in current architectures:
- Subject Omission: The model "forgets" a subject because its semantic embedding is overshadowed or interfered with by other subjects during the conditioning phase.
- Relational Misalignment: Even when all subjects are generated, they often appear in incorrect locations or interact unnaturally due to a lack of explicit spatial guidance.
Existing workarounds, such as inference-time optimization or hard layout controls, are either computationally expensive or produce rigid, unnatural videos. Comp-Attn aims to solve both issues simultaneously without requiring additional training or massive compute.
Methodology: The "Present-and-Align" Paradigm
Comp-Attn addresses these challenges by modifying the cross-attention layers of Diffusion Transformers (DiTs) and U-Nets. It decouples the generation process into two distinct steps:
1. Subject-aware Condition Interpolation (SCI) — The "Present" Step
To prevent subject omission, SCI calculates a Subject Saliency Score to measure how much a subject's "pure" embedding is suppressed by the rest of the prompt. If a subject is being ignored, SCI adaptively injects its original, un-interfered semantics back into the model. This ensures the model "remembers" to render every entity mentioned in the text.
2. Layout-forcing Attention Modulation (LAM) — The "Align" Step
To ensure correct positioning, the system utilizes a Large Language Model (LLM) to generate a rough bounding-box layout for the subjects. Rather than forcing the model into these boxes using rigid masks, LAM employs IoU-guided attention modulation. It compares the model's internal attention maps with the planned layout and applies a soft bias to align them. This provides spatial guidance while preserving the model's flexibility to generate natural movements and diverse shapes.
Datasets and Evaluation
The researchers evaluated Comp-Attn across several rigorous benchmarks:
- T2V-CompBench: A large-scale benchmark specifically designed for compositional video generation, focusing on attributes, relations, and interactions.
- VBench: Used to verify that compositional improvements do not degrade the overall visual quality of the generated video.
- T2I-CompBench: Demonstrated the method's scalability to text-to-image (T2I) models like FLUX.
Key Results and Insights
- Significant Performance Gains: Comp-Attn achieved substantial improvements on T2V-CompBench, including a +15.7% boost on Wan2.1-14B and a +29.8% increase on CogVideoX-5B.
- State-of-the-Art Composition: The method outperformed existing compositional techniques like LVD and ViCo across nearly all metrics, excelling particularly in spatial relationships and object interactions.
- High Efficiency: Unlike optimization-based methods that can inflate generation time by 5x to 10x, Comp-Attn adds only about 5.1% to inference latency, making it highly practical for real-world use.
- Broad Compatibility: The module was successfully integrated into diverse architectures, including Wan2.1/2.2 (DiT), CogVideoX (MM-DiT), VideoCrafter2 (U-Net), and FLUX (T2I), proving its versatility.
Limitations and Future Work
While Comp-Attn effectively resolves "who" is in the video and "where" they are, it cannot fix the "how" of underlying physics. If the foundational model lacks an understanding of physical laws (e.g., fluid dynamics or complex collisions), Comp-Attn cannot correct those inherent flaws.
Future research directions include:
- Training dedicated, smaller LLMs specifically for layout planning to reduce API costs.
- Exploring "human-in-the-loop" layout planning for more precise creative control.
- Enhancing the base models' reasoning capabilities regarding physical interactions.
Summary updated