TL;DR
Editing videos with modern Diffusion Transformers (DiTs) requires dragging massive, redundant sequences of source video tokens through dozens of neural network layers at every single denoising step. TriDiT speeds up this core denoising stage by up to $2.49\times$ on its own—and $3.61\times$ when stacked with other accelerators—by compressing the source video tokens down to a smartly chosen 20% representative budget. Better yet, it saves the fine-grained mathematical "leftovers" (residuals) so no region of the video is permanently blurred out, periodically unpacking and re-evaluating which tokens matter most as the edit progresses.
What Problem Does This Paper Address?
When you ask a Diffusion Transformer (DiT) to edit a video—say, turning an animal into a tiger or changing a daytime scene into a warm sunset—the model relies on source conditioning. It breaks both the original source video and the noisy target video into thousands of spatiotemporal patches called tokens, processing them together so the target inherits the source's motion, lighting, and unedited background.
As video duration and resolution climb, processing the full sequence of source tokens across every transformer layer and denoising step becomes brutally expensive—not just in attention, where tokens talk to each other, but also in linear projections and feed-forward networks.
Existing speedups try to skip redundant attention calculations (sparse attention) or reuse cached features in unedited regions. However, they still drag the entire sequence of source states through the rest of the network. Furthermore, source tokens aren't created equal: a blank wall is repetitive and easy to summarize, while a textured jacket button is unique. If you naively merge tokens to save compute, how do you allocate your token budget wisely, and how do you keep merged tokens from losing their identity forever?
Methods
TriDiT leaves the target video tokens completely intact to preserve output crispness, focusing entirely on dynamically compressing the source tokens (retaining 20% by default) while keeping the main generation model frozen.
Here is how the pipeline works across groups of 5 consecutive transformer layers:
- Tri-Factor Demand Scoring: Instead of treating all source patches equally (like prior facility-location methods such as ToMA), TriDiT scores every token's "demand" using three factors:
- Predicted Attention ($a$): A lightweight, offline-trained predictor estimates how much the target video queries actually want to look at this source token.
- Irreplaceability ($q$): How scarce are good substitutes among nearby spatiotemporal neighbors?
- Local Content Complexity ($C$): How different is a patch from its immediate spatial neighbors? (High-frequency details score higher).
- Submodular Representative Selection: Picking the best 20% of tokens isn't just taking the top scores—if twenty high-scoring tokens sit right next to each other, picking all twenty wastes budget. TriDiT frames this as a facility-location problem (like placing fire stations to cover a city weighted by population demand). Because this objective has diminishing returns (monotone submodularity), an exact "lazy-greedy" algorithm rapidly finds a near-optimal set of representatives with a mathematical $(1 - 1/e)$ quality guarantee.
- Mean Merging & Residual Recovery: The remaining 80% of tokens are grouped with their closest representative via unweighted averaging. Crucially, TriDiT subtracts the group mean from each original token and saves that difference—the per-position residual—on the side. After 5 transformer layers update the compressed 20% representatives, TriDiT "unmerges" them: every original position gets its representative's update plus its saved residual, restoring local details so previously merged tokens can compete fairly in the next round of selection.
Datasets
In the main text, the authors evaluate TriDiT on a test set of 100 videos and 400 editing tasks (including a 380-task non-style subset for masked evaluations and a 50-task subset for latency benchmarking), alongside a separate development set used for ablations. Specific dataset provenance, task construction, and training data splits for the offline attention predictor are deferred to the appendices and not detailed in the main text.
Key Insights and Ideas
- Popularity isn't enough; diversity matters: Selecting tokens purely by attention scores (Attention-only) underperforms TriDiT's three-factor coverage. Why? Because attention clusters around focal objects; framing selection as weighted coverage naturally penalizes redundant neighbors and forces the budget to cover complex background context too.
- Compression is orthogonal to sparse attention: Because TriDiT physically shortens the source sequence before it hits projections, attention, and feed-forward layers, it stacks cleanly with operator-level sparse attention (Spark-H3) and regional target caching (SpotEdit).
- Residuals act as memory anchors: Without saving per-position residuals ($e_i$), tokens merged into the same representative become mathematically identical forever. Keeping residuals preserves pre-aggregation local differences (like jacket motifs or button edges) across layer groups without paying the compute cost of updating every token.
Key Results
Tested primarily on the MiniMax-H3-Base-Ref2VA backbone (7-step LoRA, 4× A100 GPUs):
- Standalone Speedup & Quality: At 20% token retention, TriDiT cuts DiT-stage latency from $30.45\text{ s}$ to $12.229\text{ s}$—a $2.49\times$ speedup—with negligible quality loss compared to the uncompressed Dense baseline (GT PSNR drops by just $0.21\text{ dB}$, from $27.84$ to $27.63\text{ dB}$). It also beats adaptations of ToMe, VidToMe, and ToMA at the same budget.
- Stacked Acceleration: Combining TriDiT with Spark-H3 and SpotEdit pushes DiT latency down to $8.435\text{ s}$ ($3.61\times$ speedup over Dense, and $1.75\times$ faster than Spark-H3 + SpotEdit alone), while lowering peak GPU memory by $12.5\%$ ($47.2\text{ GB} \rightarrow 41.3\text{ GB}$).
- Cross-Architecture Transfer: TriDiT generalizes across other video editing backbones, achieving full-DiT speedups of $1.79\times$ on UniVideo, $1.85\times$ on UNIC, and $1.15\times$ on Wan-VACE.
Limitations and Future Work
The authors are refreshingly candid about where the magic has limits:
- DiT-Stage vs. End-to-End: The $3.61\times$ speedup applies strictly to the DiT denoising loop; fixed costs like VAE video encoding/decoding and text encoding dilute the end-to-end wall-clock speedup.
- Approximate Trajectories & Predictor Shift: Saved residuals stay static inside a 5-layer group, meaning they cannot capture non-linear updates those tokens missed. Moreover, the attention predictor is trained offline on clean, uncompressed states, so feeding it approximately restored states at inference introduces a slight distribution shift.
- Future Directions: Storing full-position residuals still requires memory and specific backbone interfaces. Testing how representative coverage and accumulated reconstruction errors hold up on much longer videos and rapid scene cuts remains an open frontier.
Summary updated