MeDM: Mediating Image Diffusion Models for Video-to-Video Translation with Temporal Correspondence Guidance

Ernie Chu, Tzuhsuan Huang, Shuo-Yen Lin, Jun-Cheng Chen

Presented at AAAI 2024, MeDM (Mediating Diffusion Models) is a zero-shot framework designed for high-quality video-to-video translation. It achieves remarkable temporal consistency without requiring expensive video-specific training or intensive test-time optimization. By utilizing optical flow to "mediate" the denoising process of standard image diffusion models, MeDM ensures that pixels following the same motion trajectory remain consistent throughout a generated sequence.

The Challenge of Temporal Consistency

While image diffusion models like Stable Diffusion produce high-fidelity stills, applying them to video often results in "flickering"—a chaotic shimmering effect where textures and details shift rapidly between frames. This occurs because the model makes independent creative choices for each frame during denoising.

Existing solutions typically fall into two categories:

  1. Video-native models: These require massive datasets and significant computational power.
  2. Zero-shot/Optimization-based methods: These adapt image models but often suffer from residual flickering or require slow per-video fine-tuning.

MeDM introduces a "middle ground" that is efficient, training-free, and enforces physical constraints to produce stable results.

Methodology: Flow Coding and Mediation

The core of MeDM involves treating video frames as overlapping views of a global pixel repository.

Flow Coding

The framework uses explicit optical flow to track pixel movement across frames. This information is used to build a Global Pixel Repository ($R^t$), which serves as a master list of unique points in the scene. Each pixel in every frame is "coded" with an index pointing back to this repository.

Illustration of temporal correspondence and flow-based tracking used in MeDM.

Mediation (Harmonization)

During denoising, the diffusion model provides independent "score" estimates for each frame. MeDM frames temporal consistency as a least-squares optimization problem: finding values in the global repository that best satisfy the estimates from all frames. The solution is a simple averaging of predicted values for all pixels mapping to the same global point.

To work with Latent Diffusion Models (LDM), MeDM projects noisy latents into a predicted pixel space, applies flow-based harmonization, and then projects the result back into the latent space for the subsequent denoising step.

Key Results and Evaluation

The authors evaluated MeDM using synthetic benchmarks (MPI Sintel, Virtual KITTI 2) and real-world datasets (DAVIS 2016, CelebV-HQ).

Quantitative Performance

In tests on MPI Sintel, MeDM achieved an End-Point Error (EPE) of 1.456, significantly outperforming competitors like Rerender A Video (7.953) and vanilla ControlNet (12.757). A lower EPE indicates that the generated video's motion more accurately follows the original ground truth, resulting in smoother transitions.

Qualitative Analysis: Horizontal Scans

A key visualization technique used in the paper is the "horizontal scan," where thin vertical slices of consecutive frames are stacked side-by-side.

Horizontal scan visualization demonstrating the smooth, continuous temporal consistency achieved by MeDM.

In MeDM, these scans appear as smooth, continuous images. In contrast, baseline methods often produce jagged "barcode" patterns, which are a direct visual signature of heavy flickering.

Conclusion and Future Work

MeDM demonstrates that viewing video as multiple views of a single underlying world allows consistency to be treated as a mathematical averaging task. By enforcing the "constant color" assumption during the denoising phase, it prevents flickering from forming.

While highly effective, the model currently disregards dynamic lighting changes and is dependent on the accuracy of the underlying optical flow estimator. Future work aims to incorporate robust point tracking (e.g., TAPIR) to handle long-term occlusions and improve performance in scenes with extreme motion.

Summary updated

BibTeX
@inproceedings{chu2024medm,
  author = {Ernie Chu and Tzuhsuan Huang and Shuo-Yen Lin and Jun-Cheng Chen},
  title = {{MeDM: Mediating Image Diffusion Models for Video-to-Video Translation with Temporal Correspondence Guidance}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i2.27899},
}
Figure