本文简单记录介绍一下AnimateDiff。
AnimateDiff可以个性化为文生图添加动画效果,支持SD WebUI插件。
AnimateDiff可以让用户无需特定调整就能够为个性化的文本到图像扩散模型添加动画效果。
使用AnimateDiff需要使用基础文生图模型和运动模块微调模型,官方提供了预训练好的个性化模型。有了这些就可以通过运行特定命令来生成动画。
0、安装主项目
git clone https://github.com/guoyww/AnimateDiff.git
cd AnimateDiff
conda env create -f environment.yaml
conda activate animatediff
1、基础文生图模型使用SD模型
在此处下载模型https://huggingface.co/runwayml/stable-diffusion-v1-5 models/StableDiffusion/
2、下载运动模块微调参数
在此处下载https://huggingface.co/guoyww/animatediff
3、下载官方提供的预训练好的模型
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
模型在CivitAI上。
4、运行
一个生成动画效果的例子python -m scripts.animate --config configs/prompts/1-ToonYou.yaml
目前AnimateDiff还支持SD WebUI的插件运行,非常方便,基础文生图模型可以使用各种优秀的基于SD的模型。
参考文章:
本文仅作为个人学习记录。
本文与HBlog保持同步。