高速な動画生成AIを試してみようと思います。AnimateDiffは画像生成モデルを少し拡張したもののため、Stable Video DiffusionやSoraといった動画生成用に作られたモデルよりも低めのスペックでも実行しやすい手法になっています。そしてその後継であるAnimateDiff-Lightningは1/10のステップ数で生成できるため、単純計算で10倍高速と言えます。
AnimateDiff-Lightning is 何?
AnimateDiffとは
こちらでまとめてるので読んでみてください。
>-
AnimateDiff-Lightningとは
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
We propose a diffusion distillation method that achieves new state-of-the-art in one-step/few-step 1024px text-to-image generation based on SDXL. Our method combines progressive and adversarial distillation to achieve a balance between quality and mode coverage. In this paper, we discuss the theoretical analysis, discriminator design, model formulation, and training techniques. We open-source our distilled SDXL-Lightning models both as LoRA and full UNet weights.
- Lightning系モデルは2024年2月にByteDanceから発表された論文に基づいている
- Adversarial DistillationとProgressive Distillationを組み合わせた蒸留方法で高速化
- 教師モデルが複数ステップで推論した結果を、生徒モデルが1ステップで直接推論できるように訓練する
- 最初はMSE損失を使用して基礎的なトレーニングを行い、その後に敵対的損失を追加することで画質を向上させる
モデルとかは特に変わらなそうなので必要スペックは変わらなそうです。
ComfyUIで実際に試してみる
comfyUIのインストール
インストール方法については次の記事を参考にしてください
>-
準備手順
- ワークフローをcomfyUIにLoad
- 必要なモジュールをcomfyUIにインストール(ComfyUI-Manager経由でも可)
-
GitHub - Kosinkadink/ComfyUI-AnimateDiff-Evolved: Improved AnimateDiff for ComfyUI and Advanced Sampling Support
Improved AnimateDiff for ComfyUI and Advanced Sampling Support - Kosinkadink/ComfyUI-AnimateDiff-Evolved
-
GitHub - Kosinkadink/ComfyUI-VideoHelperSuite: Nodes related to video workflows
Nodes related to video workflows. Contribute to Kosinkadink/ComfyUI-VideoHelperSuite development by creating an account on GitHub.
-
- 使用したいcheckpointを
/models/checkpoints/に置く - AnimateDiff-Lightningのcheckpointを
/custom_nodes/ComfyUI-AnimateDiff-Evolved/models/に配置
1. ワークフローをcomfyUIにLoad
Workflow: animatediff_lightning_workflow.json
2. 必要なモジュールをcomfyUIにインストール
ComfyUI-Managerを使用してインストールするのが一番楽(custom_nodesディレクトリ内に以下をそれぞれgit cloneする、でも可)
-
GitHub - Kosinkadink/ComfyUI-AnimateDiff-Evolved: Improved AnimateDiff for ComfyUI and Advanced Sampling Support
Improved AnimateDiff for ComfyUI and Advanced Sampling Support - Kosinkadink/ComfyUI-AnimateDiff-Evolved
-
GitHub - Kosinkadink/ComfyUI-VideoHelperSuite: Nodes related to video workflows
Nodes related to video workflows. Contribute to Kosinkadink/ComfyUI-VideoHelperSuite development by creating an account on GitHub.
自分はgit cloneの方法でエラーが出たのでComfyUI-ManagerをインストールしてからManager経由でインストールしました。
3. 使用したいcheckpointを/models/checkpoints/に置く
公式がおすすめしてるモデルは↓。
- Realistic
-
epiCRealism - Natural Sin RC1 VAE | Stable Diffusion 1.x Checkpoint | Civitai
Natural Sin Final and last of epiCRealism Since SDXL is right around the corner , let's say it is the final version for now since I put a lot effor...
-
Realistic Vision V6.0 B1 - V5.1 Hyper (VAE) | Stable Diffusion 1.x Checkpoint | Civitai
Check my exclusive models on Mage: ParagonXL / NovaXL / NovaXL Lightning / NovaXL V2 / NovaXL Pony / NovaXL Pony Lightning / RealDreamXL / RealDrea...
-
DreamShaper - 8 | Stable Diffusion 1.x Checkpoint | Civitai
DreamShaper - V∞! Please check out my other base models , including SDXL ones! Check the version description below (bottom right) for more info and...
-
AbsoluteReality - v1.8.1 | Stable Diffusion 1.x Checkpoint | Civitai
AbsoluteReality That feeling after you wake up from a dream Add a ❤️ to receive future updates. This took much time and effort, please be supportive...
-
majicMIX realistic 麦橘写实 - v7 | Stable Diffusion 1.x Checkpoint | Civitai
V7 is here. So far so good for me. ASIAN ALERT! 推荐参数 Recommended Parameters for V7: Sampler: Euler a, Euler, restart Steps: 20~40 Hires upscaler: E...
-
- Anime & Cartoon
-
ToonYou - Beta 6 🌟 | Stable Diffusion 1.x Checkpoint | Civitai
ToonYou - Beta 6 is up! Silly, stylish, and.. kind of cute? 😅 A bit of detail with a cartoony feel, it keeps getting better! With your support, Too...
-
IMP - v1.0 | Stable Diffusion 1.x Checkpoint | Civitai
Hello Guys, I hope you like the model. Subscribe to my Channel, https://www.youtube.com/@world-ai => I will be very grateful ♥. If you want too ...
-
Mistoon_Anime - v1.0 noobai | Illustrious Checkpoint | Civitai
You can use this model on SeaArt here . Mistoon_Anime is my blend of SD models that tries to achieve a more "cartoony" anime style with thick borde...
-
DynaVision - DynaVisionV2.0 (BakedVae) | Stable Diffusion 1.x Checkpoint | Civitai
This is DynaVision , a new merge based off a private model mix I've been using for the past few months. The output is kind of like stylized rendere...
-
RCNZ Cartoon 3d - v2.0 | Stable Diffusion 1.x Checkpoint | Civitai
Got a potato for a PC?? Try this model for free on Happy Accidents -------------------------- Took the awesome merge Disney Pixar Cartoon Type A , ...
-
majicMIX reverie 麦橘梦幻 - v1.0 | Stable Diffusion 1.x Checkpoint | Civitai
A 2.5D model I merged based on majicMIX_lux . It has a similar approach as majicMIX_fantasy but is not directly related, so I named it "reverie". Y...
-
4. AnimateDiff-Lightning用のcheckpointを配置
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
実行
QueuePromptを押して少し待つと、右下のvideo combineのところに動画が出力されます。
パラメータとPCのスペックによりますが,自分の場合はデフォルト設定で10秒かからないくらいで出力されました。

結果がこちら

パラメータのチューニングをしてないのでぼやぼやですが、何とかそれっぽく生成できてます。
(というか4ステップでこれって考えたらAnimateDiffと比べてかなりすごい精度…)
終わり
実行できて満足したのでここまでにします。
動画生成に関連する他の手法を試したい方は下記のリンク集をぜひご活用ください。
>-








