結果
作成動画はGoogle Bloggerに載せています。
support-touchsp.blogspot.com
環境
Windows 11 CUDA 11.7 Python 3.10 Git for Windows 2.39.0
Python環境構築
1行で完結します。pip install -r https://raw.githubusercontent.com/dai-ichiro/myEnvironments/main/AnimateDiff/requirements_cu117_win.txt
実行方法
リポジトリのクローン
git clone https://github.com/guoyww/AnimateDiff cd AnimateDiff
Stable Diffusion 1.5のダウンロード
cd models/StableDiffusion git lfs install git clone https://huggingface.co/runwayml/stable-diffusion-v1-5
Motion Modulenのダウンロード
こちらから「mm_sd_v15_v2.ckpt」をダウンロードして「models/Motion_Module」フォルダに保存します。使用するモデルのダウンロード
好きなモデルをCivitaiなどからダウンロードして「models/DreamBooth_LoRA」フォルダに保存します。「****.safetensors」という拡張子を持ったファイルです。今回は「yabalMixTrue25D_v4.safetensors」というモデルを使わせてもらいました。Configファイルの作成
以下のようなYAMLファイルを作成して「configs/prompts/v2」フォルダに保存します。「original_config.yaml」という名前にしました。# 1-animation - dreambooth_path: "models/DreamBooth_LoRA/yabalMixTrue25D_v4.safetensors" lora_model_path: "" inference_config: "configs/inference/inference-v2.yaml" motion_module: "models/Motion_Module/mm_sd_v15_v2.ckpt" seed: [1000000000] steps: 40 guidance_scale: 8.5 prompt: - "a girl, dancing, blue denim, white plain t-shirt, best quality, extremely detailed" n_prompt: - "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality"
あとは実行するのみ
python -m scripts.animate --config configs/prompts/v2/original_config.yaml
追記
Motion Module v3が公開されたのでそちらに関する記事を書きました。touch-sp.hatenablog.com
touch-sp.hatenablog.com