IC-Effect: Precise and Efficient Video Effects Editing via In-Context Learning

Yuanhang Li, Yiren Song, Junzhe Bai, Xinran Liang, Hu Yang, Libiao Jin, Qi MaoarXiv 2025 · DOI

Introduction

Adding high-quality visual effects (VFX) to existing video footage—such as mystical auras, realistic particle disintegration, or dynamic light trails—remains a significant challenge for generative AI. Current video editing frameworks often struggle with two primary issues: global over-editing, where the background "drifts" or loses original detail, and a heavy dependency on manual masking to protect non-target regions. IC-Effect addresses these challenges by reframing video editing as an In-Context Learning (ICL) task within a Diffusion Transformer (DiT) framework.

Methodology: In-Context Learning for Video

The core innovation of IC-Effect is treating the source video as "context" rather than just a conditional input. By leveraging the inherent attention mechanisms of Diffusion Transformers, the model can attend to clean source frames to preserve background fidelity while simultaneously generating complex, non-linear effects.

Architecture and Tokenization

To manage the computational load of processing high-resolution video, IC-Effect introduces Spatiotemporal Sparse Tokenization (STST). This strategy uses a downsampled version of the source video to capture motion ($Z_S^\downarrow$) and a high-resolution first frame ($Z_I$) to serve as a spatial anchor. This sparse approach maintains high fidelity while significantly reducing GPU memory usage and inference time.

The IC-Effect architecture utilizes a Diffusion Transformer (DiT) with Causal Attention and Spatiotemporal Sparse Tokenization to efficiently process source video context.

Causal Attention and Training

A critical component of the architecture is the Causal Attention Mask. This ensures that "clean" source video tokens are not contaminated by the noise introduced during the diffusion process. Clean tokens only attend to themselves, while the noisy latent tokens ($Z_T$) can attend to both the clean context and the evolving generation.

The model is trained in two stages:

  1. General Adaptation: A backbone "Video-Editor" is pre-trained on 50,000 high-quality paired samples to teach general instruction following.
  2. Effect-LoRA: Low-rank adaptation (LoRA) is used to fine-tune the model on specific VFX categories, allowing it to learn the unique physics of effects like fire or particles without degrading background preservation.

Experimental Results

The researchers evaluated IC-Effect using the newly created VideoVFX Dataset, which includes 15 high-quality effect categories.

Quantitative Performance

In comparative studies against state-of-the-art baselines like InsV2V and Lucy Edit, IC-Effect demonstrated superior structural preservation. Using a GPT-4o-based evaluation metric, IC-Effect achieved a score of 4.79/5.0, outperforming the next best baseline (4.34). Furthermore, the STST strategy proved highly efficient; the sparse model reduced inference time from 5880s to 2790s and VRAM requirements from 74.7GB to 64.0GB compared to a full-tokenization baseline.

Qualitative Analysis

Visual results demonstrate the model's ability to inject complex effects while keeping the background 100% untouched. For instance, the model can add a "Fa Xiang Tian Di" mystical aura or a particle aggregation effect to a subject without altering the surrounding environment or requiring manual masks.

Qualitative examples demonstrating IC-Effect's ability to add diverse VFX like growth, dynamic lines, and particle effects while preserving the original background.

Conclusion

IC-Effect represents a paradigm shift in video editing, moving away from labor-intensive masking toward a more intuitive in-context learning approach. By effectively isolating noise and utilizing sparse tokenization, the framework achieves a balance of precision and efficiency. Future work aims to extend this capability to zero-shot VFX editing, where effects can be extracted from reference videos without the need for category-specific fine-tuning.

Reference: Li, Y., et al. (2025). IC-Effect: Precise and Efficient Video Effects Editing via In-Context Learning. arXiv:2512.15635v1.

Summary updated

BibTeX
@misc{li2025ic,
  author = {Yuanhang Li and Yiren Song and Junzhe Bai and Xinran Liang and Hu Yang and Libiao Jin and Qi Mao},
  title = {{IC-Effect: Precise and Efficient Video Effects Editing via In-Context Learning}},
  year = {2025},
  eprint = {2512.15635},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.15635},
}
Figure