Abstract
The advent of Video Diffusion Transformers (Video DiTs) marks a milestone in video generation. However, directly applying existing video editing methods to Video DiTs often incurs substantial computational overhead, due to resource-intensive attention modification or finetuning. To alleviate this problem, we present DFVEdit, an efficient zero-shot video editing method tailored for Video DiTs. DFVEdit eliminates the need for both attention modification and fine-tuning by directly operating on clean latents via flow transformation. To be more specific, we observe that editing and sampling can be unified under the continuous flow perspective. Building upon this foundation, we propose the Conditional Delta Flow Vector (CDFV) -- a theoretically unbiased estimation of DFV -- and integrate Implicit Cross Attention (ICA) guidance as well as Embedding Reinforcement (ER) to further enhance editing quality. DFVEdit excels in practical efficiency, offering at least 20x inference speed-up and 85% memory reduction on Video DiTs compared to attention-engineering-based editing methods. Extensive quantitative and qualitative experiments demonstrate that DFVEdit can be seamlessly applied to popular Video DiTs (e.g., CogVideoX and Wan2.1), attaining state-of-the-art performance on structural fidelity, spatial-temporal consistency, and editing quality.
The Challenge: Memory Explosion in Video DiTs
The recent shift from U-Net architectures to Diffusion Transformers (DiTs) has revolutionized video generation quality, as seen in models like CogVideoX and Wan2.1. However, editing these videos remains a computational nightmare. Traditional "zero-shot" editing methods rely on attention engineering—caching and modifying the massive internal attention maps of the model to ensure the edited video maintains the structure of the original.
In Video DiTs, these attention maps can consume hundreds of gigabytes of VRAM, making them impossible to run on consumer-grade or even many professional GPUs. Methods that avoid attention often suffer from "flickering" or lose the structural integrity of the original video.
Methodology: Editing as Continuous Flow
The core innovation of DFVEdit is treating video editing as a continuous flow transformation. Instead of hacking the model's internal weights or attention layers, DFVEdit operates directly on the "clean latents" (the compressed representation of the video). The authors identify that the standard sampling process and the editing process are isomorphic, allowing them to derive a mathematically grounded update rule.
Key components of the framework include:
- Conditional Delta Flow Vector (CDFV): This provides a theoretically unbiased estimate of the flow difference needed to move from the source video to the edited target.
- Implicit Cross Attention (ICA) Guidance: To maintain background stability and structural correctness without the memory cost of full attention caching, ICA extracts a binarized mask from specific layers of the DiT's attention blocks to act as a lightweight spatial constraint.
- Embedding Reinforcement (ER): In long videos, the influence of the text prompt can diminish as visual tokens grow. ER amplifies the target prompt's embeddings to ensure the model remains focused on the requested edit (e.g., changing a "brown bear" into a "polar bear").
Key Results and Efficiency
DFVEdit sets a new bar for both efficiency and quality in the DiT era:
- Efficiency: It achieves at least a 20x inference speed-up and an 85% reduction in VRAM usage compared to attention-engineering methods like FateZero.
- Quantitative Performance: On the CogVideoX-5B benchmark, DFVEdit outperformed all baselines in temporal consistency (CLIP-F), structural fidelity (Masked PSNR), and prompt alignment (CLIP-T).
- Qualitative Quality: In side-by-side comparisons, DFVEdit preserves the motion of the original video while accurately changing subjects without background warping or character flickering.
Conclusion and Future Work
DFVEdit provides a "Transformer-native" solution to video editing by shifting from discrete attention manipulation to continuous flow transformation. While it excels at appearance and attribute editing, future work will focus on improving fine detail preservation and handling large layout variations where the underlying skeletal structure of objects changes significantly.
Summary updated