FateZero: Fusing Attentions for Zero-shot Text-based Video Editing

Chenyang Qi, Xiaodong Cun, Yong Zhang, Chenyang Lei, Xintao Wang, Ying Shan, Qifeng Chen

Introduction

While diffusion models have revolutionized text-to-image generation, applying them to real-world video editing remains a significant challenge due to temporal inconsistency. Because diffusion processes involve inherent randomness, editing frames individually often leads to jarring visual jumps, or "flickering," between frames. Existing solutions typically require time-consuming per-video fine-tuning or rely on manual masks that struggle with complex 3D motions and shape changes.

FateZero is a novel zero-shot framework that enables high-quality, text-driven video editing without the need for per-video training or user-provided masks. By capturing and fusing attention maps during the diffusion inversion process, it achieves remarkable temporal consistency and allows for complex shape-aware modifications while preserving the original video's motion.

Figure 2: FateZero demonstrates zero-shot object shape editing (jeep to Porsche) and style editing (watercolor painting) while maintaining temporal consistency.

The FateZero Framework

FateZero moves away from simply manipulating latent noise and instead focuses on Attention Fusion. The framework operates through a multi-stage pipeline designed to anchor the edited content to the original video's structure.

1. Inversion Attention Storage

During the initial DDIM inversion—where the source video is converted into latent noise—FateZero stores all intermediate self-attention and cross-attention maps. The researchers discovered that these maps are far more effective at "remembering" the original motion and structure than the latent noise itself. These maps serve as a "skeleton" for the subsequent editing process.

2. Attention Blending Block

When generating the edited video, the model utilizes an Attention Blending Block. This block takes the source cross-attention map as a spatial mask, allowing the model to preserve the background (e.g., a road or forest) from the original video while injecting the new target shape (e.g., a "Porsche") only where intended. This prevents "semantic leakage," where the original object's features might otherwise bleed into the background of the edited version.

Figure 5: The FateZero pipeline involves storing attention maps during DDIM inversion and fusing them via the Attention Blending Block during denoising to guide the edit.

3. Spatial-Temporal Reform

To ensure the appearance of the object remains consistent from frame to frame, the U-Net’s self-attention mechanism is reformed into a spatial-temporal one. This forces the model to attend to a "warped" version of a reference frame, ensuring that the visual identity of the edited subject remains stable over time.

Evaluation and Key Results

The researchers evaluated FateZero using the DAVIS dataset and various "in-the-wild" videos featuring complex backgrounds and motions. The framework utilized pre-trained models like Stable Diffusion v1.4 for style editing and Tune-A-Video for shape-aware editing.

  • Temporal Consistency: FateZero achieved a CLIP temporal consistency score of 0.965, the highest among all tested methods, including SDEdit and standard Tune-A-Video.
  • User Preference: In a user study, FateZero was ranked first for editing quality, image fidelity, and temporal consistency, often by a significant margin.
  • Shape-Aware Editing: The model successfully demonstrated difficult edits, such as changing a "silver jeep" to a "red Porsche" or a "black swan" to a "pink flamingo," while maintaining the exact path and posture of the original subjects.

Conclusion and Future Work

FateZero represents a significant step forward in zero-shot video editing by leveraging the structural information embedded in attention maps. While highly effective, the model faces limitations when the target prompt requires extreme geometric changes (e.g., turning a swan into a pterosaur), as the original attention "skeleton" can be too restrictive. Future work may involve moving toward native video diffusion models to further improve the generation of entirely new motions during the editing process.

Summary updated

BibTeX
@inproceedings{qi2023fatezero,
  author = {Chenyang Qi and Xiaodong Cun and Yong Zhang and Chenyang Lei and Xintao Wang and Ying Shan and Qifeng Chen},
  title = {{FateZero: Fusing Attentions for Zero-shot Text-based Video Editing}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure