Awesome
Enhance-A-Video
This repository is the official implementation of Enhance-A-Video: Better Generated Video for Free.
π₯ Demo
<div align="center"> <video src="https://github.com/user-attachments/assets/be4feddd-aa6d-4346-adbc-f8e52b85c3f8" width="50%"> </div>The video has been heavily compressed to GitHub's policy. For more demos, please visit our blog.
π₯π₯π₯News
- 2024-12-22: Our work achieves improvements on LTX-Video and has been added to ComfyUI-LTX. Many thanks to kijai π!
- 2024-12-22: Our work is added to ComfyUI-Hunyuan π!
- 2024-12-20: Enhance-A-Video is now available for CogVideoX and HunyuanVideo!
- 2024-12-20: We have released code and blog for Enhance-A-Video!
π Method
We design an Enhance Block as a parallel branch. This branch computes the average of non-diagonal elements of temporal attention maps as cross-frame intensity (CFI). An enhanced temperature parameter multiplies the CFI to enhance the temporal attention output.
π οΈ Dependencies and Installation
Install the dependencies:
conda create -n enhanceAvideo python=3.10
conda activate enhanceAvideo
pip install -r requirements.txt
π Requirements
The following table shows the requirements for running HunyuanVideo/CogVideoX model (batch size = 1) to generate videos:
Model | Setting<br/>(height/width/frame) | Denoising step | GPU Peak Memory |
---|---|---|---|
HunyuanVideo | 720px1280px129f | 50 | 60GB |
CogVideoX-2B | 480px720px49f | 50 | 10GB |
𧱠Inference
Generate videos:
python cogvideox.py
python hunyuanvideo.py
π BibTeX
@misc{luo2024Enhance-A-Video,
title={Enhance-A-Video: Better Generated Video for Free},
author={Yang Luo and Xuanlei Zhao and Mengzhao Chen and Kaipeng Zhang and Wenqi Shao and Kai Wang and Zhangyang Wang and Yang You},
year={2024},
}