zsxkib / animate-diff

🎨 AnimateDiff (w/ MotionLoRAs for Panning, Zooming, etc): Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning

replicate.com
Total runs: 56.6K
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Github
Model's Last Updated: October 06 2023

Introduction of animate-diff

Model Details of animate-diff

Readme

AnimateDiff

This repository is the official implementation of AnimateDiff .

AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
Yuwei Guo, Ceyuan Yang*, Anyi Rao, Yaohui Wang, Yu Qiao, Dahua Lin, Bo Dai

*Corresponding Author

arXiv Project Page Open in OpenXLab Hugging Face Spaces Replicate

Features
  • [2023/09/25] Release MotionLoRA and its model zoo, enabling camera movement controls ! Please download the MotionLoRA models ( 74 MB per model , available at Google Drive / HuggingFace / CivitAI ) and save them to the models/MotionLoRA folder. Example: python -m scripts.animate --config configs/prompts/v2/5-RealisticVision-MotionLoRA.yaml

    Zoom In Zoom Out Zoom Pan Left Zoom Pan Right
    Tilt Up Tilt Down Rolling Anti-Clockwise Rolling Clockwise

  • [2023/09/10] New Motion Module release! mm_sd_v15_v2.ckpt was trained on larger resolution & batch size, and gains noticeable quality improvements. Check it out at Google Drive / HuggingFace / CivitAI and use it with configs/inference/inference-v2.yaml . Example: python -m scripts.animate --config configs/prompts/v2/5-RealisticVision.yaml Here is a qualitative comparison between mm_sd_v15.ckpt (left) and mm_sd_v15_v2.ckpt (right):

  • GPU Memory Optimization, ~12GB VRAM to inference

  • User Interface: Gradio , A1111 WebUI Extension sd-webui-animatediff (by @continue-revolution )
  • Google Colab: Colab (by @camenduru )
Model Zoo
Motion Modules
Name Parameter Storage Space
mm_sd_v14.ckpt 417 M 1.6 GB
mm_sd_v15.ckpt 417 M 1.6 GB
mm_sd_v15_v2.ckpt 453 M 1.7 GB
MotionLoRAs
Name Parameter Storage Space
v2_lora_ZoomIn.ckpt 19 M 74 MB
v2_lora_ZoomOut.ckpt 19 M 74 MB
v2_lora_PanLeft.ckpt 19 M 74 MB
v2_lora_PanRight.ckpt 19 M 74 MB
v2_lora_PanUp.ckpt 19 M 74 MB
v2_lora_PanDown.ckpt 19 M 74 MB
v2_lora_RollingClockwise.ckpt 19 M 74 MB
v2_lora_RollingAnticlockwise.ckpt 19 M 74 MB
Common Issues
Installation

Please ensure the installation of xformer that is applied to reduce the inference memory.
Back to Top

Various resolution or number of frames

Currently, we recommend users to generate animation with 16 frames and 512 resolution that are aligned with our training settings. Notably, various resolution/frames may affect the quality more or less.
Back to Top

How to use it without any coding

1) Get lora models: train lora model with A1111 based on a collection of your own favorite images (e.g., tutorials English , Japanese , Chinese ) or download Lora models from Civitai .

2) Animate lora models: using gradio interface or A1111 (e.g., tutorials English , Japanese , Chinese )

3) Be creative together with other techniques, such as super resolution, frame interpolation, music generation, etc.
Back to Top

Animating a given image

We totally agree that animating a given image is an appealing feature, which we would try to support officially in the future. For now, you may enjoy other efforts from the talesofai .
Back to Top

Contributions from community

Contributions are always welcome!! The dev branch is for community contributions. As for the main branch, we would like to align it with the original technical report :)
Back to Top

Setups for Inference
Prepare Environment

We updated our inference code with xformers and a sequential decoding trick. Now AnimateDiff takes only ~12GB VRAM to inference, and run on a single RTX3090 !!

git clone https://github.com/guoyww/AnimateDiff.git
cd AnimateDiff

conda env create -f environment.yaml
conda activate animatediff
Download Base T2I & Motion Module Checkpoints

We provide two versions of our Motion Module, which are trained on stable-diffusion-v1-4 and finetuned on v1-5 seperately. It’s recommanded to try both of them for best results.

git lfs install
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 models/StableDiffusion/

bash download_bashscripts/0-MotionModule.sh

You may also directly download the motion module checkpoints from Google Drive / HuggingFace / CivitAI , then put them in models/Motion_Module/ folder.

Prepare Personalize T2I

Here we provide inference configs for 6 demo T2I on CivitAI. You may run the following bash scripts to download these checkpoints.

bash download_bashscripts/1-ToonYou.sh
bash download_bashscripts/2-Lyriel.sh
bash download_bashscripts/3-RcnzCartoon.sh
bash download_bashscripts/4-MajicMix.sh
bash download_bashscripts/5-RealisticVision.sh
bash download_bashscripts/6-Tusun.sh
bash download_bashscripts/7-FilmVelvia.sh
bash download_bashscripts/8-GhibliBackground.sh
Inference

After downloading the above peronalized T2I checkpoints, run the following commands to generate animations. The results will automatically be saved to samples/ folder.

python -m scripts.animate --config configs/prompts/1-ToonYou.yaml
python -m scripts.animate --config configs/prompts/2-Lyriel.yaml
python -m scripts.animate --config configs/prompts/3-RcnzCartoon.yaml
python -m scripts.animate --config configs/prompts/4-MajicMix.yaml
python -m scripts.animate --config configs/prompts/5-RealisticVision.yaml
python -m scripts.animate --config configs/prompts/6-Tusun.yaml
python -m scripts.animate --config configs/prompts/7-FilmVelvia.yaml
python -m scripts.animate --config configs/prompts/8-GhibliBackground.yaml

To generate animations with a new DreamBooth/LoRA model, you may create a new config .yaml file in the following format:

NewModel:
  inference_config: "[path to motion module config file]"

  motion_module:
    - "models/Motion_Module/mm_sd_v14.ckpt"
    - "models/Motion_Module/mm_sd_v15.ckpt"

    motion_module_lora_configs:
    - path:  "[path to MotionLoRA model]"
      alpha: 1.0
    - ...

  dreambooth_path: "[path to your DreamBooth model .safetensors file]"
  lora_model_path: "[path to your LoRA model .safetensors file, leave it empty string if not needed]"

  steps:          25
  guidance_scale: 7.5

  prompt:
    - "[positive prompt]"

  n_prompt:
    - "[negative prompt]"

Then run the following commands:

python -m scripts.animate --config [path to the config file]
Steps for Training
Dataset

Before training, download the videos files and the .csv annotations of WebVid10M to the local mechine. Note that our examplar training script requires all the videos to be saved in a single folder. You may change this by modifying animatediff/data/ dataset.py .

Configuration

After dataset preparations, update the below data paths in the config .yaml files in configs/training/ folder:

train_data:
  csv_path:     [Replace with .csv Annotation File Path]
  video_folder: [Replace with Video Folder Path]
  sample_size:  256

Other training parameters (lr, epochs, validation settings, etc.) are also included in the config files.

Training

To train motion modules

torchrun --nnodes=1 --nproc_per_node=1 train.py --config configs/training/training.yaml

To finetune the unet’s image layers

torchrun --nnodes=1 --nproc_per_node=1 train.py --config configs/training/image_finetune.yaml
Gradio Demo

We have created a Gradio demo to make AnimateDiff easier to use. To launch the demo, please run the following commands:

conda activate animatediff
python app.py

By default, the demo will run at localhost:7860 .

Gallery

Here we demonstrate several best results we found in our experiments.

Model: ToonYou

Model: Counterfeit V3.0

Model: Realistic Vision V2.0

Model: majicMIX Realistic

Model: RCNZ Cartoon

Model: FilmVelvia

Community Cases

Here are some samples contributed by the community artists. Create a Pull Request if you would like to show your results here😚.

Character Model: Yoimiya (with an initial reference image, see WIP fork for the extended implementation.)

Character Model: Paimon ; Pose Model: Hold Sign

## BibTeX
@article{guo2023animatediff,
  title={AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning},
  author={Guo, Yuwei and Yang, Ceyuan and Rao, Anyi and Wang, Yaohui and Qiao, Yu and Lin, Dahua and Dai, Bo},
  journal={arXiv preprint arXiv:2307.04725},
  year={2023}
}
## Contact Us **Yuwei Guo**: [[email protected]]( mailto:[email protected] ) **Ceyuan Yang**: [[email protected]]( mailto:[email protected] ) **Bo Dai**: [[email protected]]( mailto:[email protected] ) ## Acknowledgements Codebase built upon [Tune-a-Video]( https://github.com/showlab/Tune-A-Video ).

Pricing of animate-diff replicate.com

Run time and cost

This model costs approximately $0.28 to run on Replicate, or 3 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker .

This model runs on Nvidia A40 GPU hardware . Predictions typically complete within 9 minutes. The predict time for this model varies significantly based on the inputs.

Runs of zsxkib animate-diff on replicate.com

56.6K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About animate-diff replicate.com Model

animate-diff replicate.com

animate-diff replicate.com is an AI model on replicate.com that provides animate-diff's model effect (🎨 AnimateDiff (w/ MotionLoRAs for Panning, Zooming, etc): Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning), which can be used instantly with this zsxkib animate-diff model. replicate.com supports a free trial of the animate-diff model, and also provides paid use of the animate-diff. Support call animate-diff model through api, including Node.js, Python, http.

animate-diff replicate.com Url

https://replicate.com/zsxkib/animate-diff

zsxkib animate-diff online free

animate-diff replicate.com is an online trial and call api platform, which integrates animate-diff's modeling effects, including api services, and provides a free online trial of animate-diff, you can try animate-diff online for free by clicking the link below.

zsxkib animate-diff online free url in replicate.com:

https://replicate.com/zsxkib/animate-diff

animate-diff install

animate-diff is an open source model from GitHub that offers a free installation service, and any user can find animate-diff on GitHub to install. At the same time, replicate.com provides the effect of animate-diff install, users can directly use animate-diff installed effect in replicate.com for debugging and trial. It also supports api for free installation.

animate-diff install url in replicate.com:

https://replicate.com/zsxkib/animate-diff

animate-diff install url in github:

https://github.com/guoyww/AnimateDiff

Url of animate-diff

animate-diff replicate.com Url

animate-diff Owner Github

Provider of animate-diff replicate.com

Other API from zsxkib

replicate

Blip 3 / XGen-MM, Answers questions about images ({blip3,xgen-mm}-phi3-mini-base-r-v1)

Total runs: 1.2M
Run Growth: 0
Growth Rate: 0.00%
Updated:May 13 2024
replicate

📖 PuLID: Pure and Lightning ID Customization via Contrastive Alignment

Total runs: 1.2M
Run Growth: 0
Growth Rate: 0.00%
Updated:May 16 2024
replicate

Make realistic images of real people instantly

Total runs: 848.9K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2024
replicate

Create song covers with any RVC v2 trained AI voice from audio files.

Total runs: 637.4K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 16 2023
replicate

⚡️FLUX PuLID: FLUX-dev based Pure and Lightning ID Customization via Contrastive Alignment🎭

Total runs: 601.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 16 2024
replicate

🎨 Fill in masked parts of images with FLUX.1-dev 🖌️

Total runs: 349.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 20 2024
replicate

Add sound to video using the MMAudio V2 model. An advanced AI model that synthesizes high-quality audio from video content, enabling seamless video-to-audio transformation.

Total runs: 283.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 02 2025
replicate

✍️✨Prompts to auto-magically relights your images

Total runs: 207.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:May 21 2024
replicate

Age prediction using CLIP - Patched version of `https://replicate.com/andreasjansson/clip-age-predictor` that works with the new version of cog!

Total runs: 189.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 07 2023
replicate

✨DiffBIR: Towards Blind Image Restoration with Generative Diffusion Prior

Total runs: 132.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 12 2023
replicate

allenai/Molmo-7B-D-0924, Answers questions and caption about images

Total runs: 88.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 27 2024
replicate

Jina-CLIP v2: 0.9B multimodal embedding model with 89-language multilingual support, 512x512 image resolution, and Matryoshka representations

Total runs: 76.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 28 2024
replicate

📽️ Increase Framerate 🎬 ST-MFNet: A Spatio-Temporal Multi-Flow Network for Frame Interpolation

Total runs: 51.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 09 2023
replicate

Hunyuan-Video LoRA Explorer + Trainer

Total runs: 31.4K
Run Growth: 0
Growth Rate: 0.00%
Updated:January 25 2025
replicate

Monster Labs' Controlnet QR Code Monster v2 For SD-1.5 on top of AnimateDiff Prompt Travel (Motion Module SD 1.5 v2)

Total runs: 10.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 01 2023
replicate

🖼️✨Background images + prompts to auto-magically relights your images (+normal maps🗺️)

Total runs: 10.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:May 21 2024
replicate

Real-Time Open-Vocabulary Object Detection

Total runs: 9.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:February 12 2024
replicate

AuraSR v2: Second-gen GAN-based Super-Resolution for real-world applications

Total runs: 9.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 01 2024
replicate

Create your own Realistic Voice Cloning (RVC v2) dataset using a YouTube link

Total runs: 8.4K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 21 2023
replicate

Text-to-Video + Image-to-Video: Pyramid Flow Autoregressive Video Generation method based on Flow Matching

Total runs: 8.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 11 2024
replicate

🎨 Fill in masked parts of images with FLUX.1-schnell 🖌️

Total runs: 6.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 16 2024
replicate

🎨AnimateDiff Prompt Travel🧭 Seamlessly Navigate and Animate Between Text-to-Image Prompts for Dynamic Visual Narratives

Total runs: 5.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 19 2023
replicate

FlashFace: Human Image Personalization with High-fidelity Identity Preservation

Total runs: 4.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 23 2024
replicate

Make realistic images of real people instantly (w/ ip-adapter-plus-face_sdxl_vit-h)

Total runs: 3.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:July 15 2024
replicate

Upscale videos + images with BSRGAN

Total runs: 2.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:January 29 2025
replicate

Transform your portrait photos into any style or setting while preserving your facial identity

Total runs: 2.4K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 03 2025
replicate

MimicMotion: High-quality human motion video generation with pose-guided control

Total runs: 2.4K
Run Growth: 0
Growth Rate: 0.00%
Updated:July 16 2024
replicate

AuraSR: GAN-based Super-Resolution for real-world

Total runs: 2.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 28 2024
replicate

🖼️ Super fast 1.5B Image Captioning/VQA Multimodal LLM (Image-to-Text) 🖋️

Total runs: 2.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:February 02 2024
replicate

Idefics3-8B-Llama3, Answers questions and caption about images

Total runs: 2.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 15 2024
replicate

Qwen 2: A 7 billion parameter language model from Alibaba Cloud, fine tuned for chat completions

Total runs: 1.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
replicate

A state-of-the-art text-to-video generation model capable of creating high-quality videos with realistic motion from text descriptions

Total runs: 1.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2024
replicate

Cubiq's ComfyUI InstantID node running `instantid_basic.json` example

Total runs: 1.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 20 2024
replicate

🎼FluxMusic Text-to-Music Generation with Rectified Flow Transformer🎶

Total runs: 1.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 26 2024
replicate

✨Stable Diffusion 3 w/ ⚡InstantX's Canny, Pose, and Tile ControlNets🖼️

Total runs: 1.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:June 22 2024
replicate

Image tagger fine-tuned on WaifuDiffusion w/ (SwinV2, SwinV2, ConvNext, and ViT)

Total runs: 1000
Run Growth: 0
Growth Rate: 0.00%
Updated:May 22 2024
replicate

🫦 Realistic facial expression manipulation (lip-syncing) using audio or video

Total runs: 1000
Run Growth: 0
Growth Rate: 0.00%
Updated:June 12 2024
replicate

Unofficial Re-Trained AnimateAnyone (Image + DWPose Video → Animated Video of Image)

Total runs: 853
Run Growth: 0
Growth Rate: 0.00%
Updated:January 19 2024
replicate

🎙️Hololive text-to-speech and voice-to-voice (Japanese🇯🇵 + English🇬🇧)

Total runs: 850
Run Growth: 0
Growth Rate: 0.00%
Updated:June 04 2024
replicate

MEMO is a state-of-the-art open-weight model for audio-driven talking video generation.

Total runs: 678
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2024
replicate

🐲 DragGAN 🐉 - "Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold"

Total runs: 583
Run Growth: 0
Growth Rate: 0.00%
Updated:July 07 2023
replicate

Easily create video datasets with auto-captioning for Hunyuan-Video LoRA finetuning

Total runs: 532
Run Growth: 0
Growth Rate: 0.00%
Updated:April 02 2025
replicate

Surrealist digital art featuring whimsical, anthropomorphic characters with exaggerated textures and vibrant color blocking

Total runs: 480
Run Growth: 0
Growth Rate: 0.00%
Updated:October 09 2024
replicate

Transform your text into a beautiful two-tone color gradient that represents your emotions.

Total runs: 417
Run Growth: 0
Growth Rate: 0.00%
Updated:June 06 2023
replicate

STAR Video Upscaler: Spatial-Temporal Augmentation with Text-to-Video Models for Real-World Video Super-Resolution

Total runs: 382
Run Growth: 0
Growth Rate: 0.00%
Updated:February 01 2025
replicate

Super High Quality Depth Maps 🗺️: An End-to-End Tile-Based Framework 🏗️ for High-Resolution Monocular Metric Depth Estimation 🔍📏

Total runs: 362
Run Growth: 0
Growth Rate: 0.00%
Updated:December 27 2023
replicate

Qwen 2: A 1.5 billion parameter language model from Alibaba Cloud, fine tuned for chat completions

Total runs: 207
Run Growth: 0
Growth Rate: 0.00%
Updated:June 26 2024
replicate

Qwen 2: A 0.5 billion parameter language model from Alibaba Cloud, fine tuned for chat completions

Total runs: 198
Run Growth: 0
Growth Rate: 0.00%
Updated:June 25 2024
replicate

Generates realistic talking face animations from a portrait image and audio using the CVPR 2025 Sonic model

Total runs: 148
Run Growth: 0
Growth Rate: 0.00%
Updated:April 03 2025
replicate

Powerful text-to-video model that generates high-quality videos up to 6 seconds at 15 FPS and 720p resolution from simple text prompt

Total runs: 128
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2024
replicate

Convert speech in audio to text w/ `tiny`, `small`, `base`, and `large-v3` models

Total runs: 126
Run Growth: 0
Growth Rate: 0.00%
Updated:July 02 2024
replicate

SAMURAI: Adapting Segment Anything Model for Zero-Shot Visual Tracking with Motion-Aware Memory

Total runs: 100
Run Growth: 0
Growth Rate: 0.00%
Updated:November 28 2024
replicate

Generate high-quality videos from text prompts using StepVideo

Total runs: 93
Run Growth: 0
Growth Rate: 0.00%
Updated:February 25 2025
replicate

🗣️ TalkNet-ASD: Detect who is speaking in a video

Total runs: 92
Run Growth: 0
Growth Rate: 0.00%
Updated:May 02 2024
replicate

A "Hello World" model for me to get to grips with `cog` and Replicate

Total runs: 44
Run Growth: 0
Growth Rate: 0.00%
Updated:June 06 2023
replicate

Cost-optimized MMAudio V2 (T4 GPU): Add sound to video using this version running on T4 hardware for lower cost. Synthesizes high-quality audio from video content.

Total runs: 21
Run Growth: 0
Growth Rate: 0.00%
Updated:April 02 2025
replicate

SAM 2: Segment Anything v2 (for in Images + Videos)

Total runs: 19
Run Growth: 0
Growth Rate: 0.00%
Updated:July 31 2024
replicate

Hibiki: High-Fidelity Simultaneous Speech-To-Speech Translation

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:February 11 2025
replicate

Remove background from images using BRIA-RMBG-2.0

Total runs: 2
Run Growth: 0
Growth Rate: 0.00%
Updated:November 25 2024