magic-animate README

The project's README from github.com/magic-research/magic-animate. As one markdown file: README.md.

MagicAnimate: Temporally Consistent Human Image Animation using Diffusion Model

Zhongcong Xu · Jianfeng Zhang · Jun Hao Liew · Hanshu Yan · Jia-Wei Liu · Chenxu Zhang · Jiashi Feng · Mike Zheng Shou

Paper PDF Project Page
National University of Singapore   |   ByteDance

📢 News

🏃‍♂️ Getting Started

Download the pretrained base models for StableDiffusion V1.5 and MSE-finetuned VAE.

Download our MagicAnimate checkpoints.

Please follow the huggingface download instructions to download the above models and checkpoints, git lfs is recommended.

Place the based models and checkpoints as follows:

magic-animate
|----pretrained_models
  |----MagicAnimate
    |----appearance_encoder
      |----diffusion_pytorch_model.safetensors
      |----config.json
    |----densepose_controlnet
      |----diffusion_pytorch_model.safetensors
      |----config.json
    |----temporal_attention
      |----temporal_attention.ckpt
  |----sd-vae-ft-mse
    |----config.json
    |----diffusion_pytorch_model.safetensors
  |----stable-diffusion-v1-5
    |----scheduler
       |----scheduler_config.json
    |----text_encoder
       |----config.json
       |----pytorch_model.bin
    |----tokenizer (all)
    |----unet
       |----diffusion_pytorch_model.bin
       |----config.json
    |----v1-5-pruned-emaonly.safetensors
|----...

⚒️ Installation

prerequisites: python>=3.8, CUDA>=11.3, and ffmpeg.

Install with conda:

conda env create -f environment.yaml
conda activate manimate

or pip:

pip3 install -r requirements.txt

💃 Inference

Run inference on single GPU:

bash scripts/animate.sh

Run inference with multiple GPUs:

bash scripts/animate_dist.sh

🎨 Gradio Demo

Online Gradio Demo:

Try our online gradio demo quickly.

Local Gradio Demo:

Launch local gradio demo on single GPU:

python3 -m demo.gradio_animate

Launch local gradio demo if you have multiple GPUs:

python3 -m demo.gradio_animate_dist

Then open gradio demo in local browser.

🙏 Acknowledgements

We would like to thank AK(@_akhaliq) and huggingface team for the help of setting up oneline gradio demo.

🎓 Citation

If you find this codebase useful for your research, please use the following entry.

@inproceedings{xu2023magicanimate,
    author    = {Xu, Zhongcong and Zhang, Jianfeng and Liew, Jun Hao and Yan, Hanshu and Liu, Jia-Wei and Zhang, Chenxu and Feng, Jiashi and Shou, Mike Zheng},
    title     = {MagicAnimate: Temporally Consistent Human Image Animation using Diffusion Model},
    booktitle = {arXiv},
    year      = {2023}
}

magic-animate (magic-research/magic-animate)

Searching Database…

What is this?This is the official codebase for 'MagicAnimate' (CVPR 2024), a diffusion-model method that animates a reference human image according to a motion sequence to produce temporally consistent video.
Is this a ready-made app or just research code?It's the official research release for the paper - inference scripts and a Gradio demo built on top of Stable Diffusion V1.5, not a packaged library or installer.
How do I get it running?Download the Stable Diffusion V1.5 base model, the MSE-finetuned VAE, and the MagicAnimate checkpoints from Hugging Face, place them in the expected folder structure, then run the provided inference script.
What do I need installed before trying this?Python 3.8+, CUDA 11.3+, and ffmpeg; git-lfs is recommended for pulling the large pretrained checkpoints.
Any install pitfalls I should know about?You have to manually download several large pretrained checkpoints (SD base model, VAE, MagicAnimate weights) and place them in an exact folder layout before anything runs.
What makes MagicAnimate different from simple pose-transfer methods?It specifically targets temporal consistency across frames using a diffusion model conditioned on pose, reducing the flicker and appearance drift common in frame-by-frame animation approaches.
Can I try it without installing anything?Yes, there's an online Gradio demo (set up with help from the Hugging Face team) you can use directly in your browser without local setup.
Is it free to use, including commercially?Yes, it's released under the BSD-3-Clause license, which is permissive and allows commercial use.
Size
24.9 MB
Stars
10.9K
Updated
CommitAug 29
Age
2y
Commits · 90 Days