
AnimateDiff MotionDirectorを4060tiローカル環境で動かした
主に自分用メモ。
まとめ
4060ti16GBでもトレーニングできた!
temporalがmotion Lora。spatialは普通のLora
公式通りやってもうまくいかなかった
環境構築
やったことメモ。試行錯誤したので、再現性あるかは分からない。
情報科目は素人なので、変なことやってるかも。
再度環境構築するときの備忘録程度に。
Anacondaつかった。Anaconda promptから実行。
conda activate animatediff-motiondirector
torchが入ってないとエラー。
conda install pytorch torchvision -c pytorch
'chardet'がないとエラー
pip install chardet
pip install accelerateよく分からないけど入れた
xformersエラー
>PyTorch 2.2.0+cu121 with CUDA 1201 (you have 2.2.0)
>Python 3.10.11 (you have 3.10.13)
conda install python=3.10.11
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
tritonがないとエラー
⇒無視しても動いている
\configs\training\motion_director\my_video.yamlの中身がおかしいので修正。
# Model From Huggingface Diffusers
pretrained_model_path: "diffusers/stable-diffusion-v1-5"
⇒pretrained_model_path: "models/StableDiffusion/"
# Must be CKPT from https://huggingface.co/guoyww/animatediff/tree/main
motion_module_path: "v3_sd15_mm.ckpt"
⇒motion_module_path: "models/Motion_Module/v3_sd15_mm.ckpt"
# Must be CKPT from https://huggingface.co/guoyww/animatediff/tree/main
# Optional for training, but highly recommended as a starting point.
domain_adapter_path: "" #"v3_sd15_adapter.ckpt"
⇒domain_adapter_path: "models/Motion_Module/v3_sd15_adapter.ckpt"
トレーニング時間
解像度や尺の違う動画で試してみたけど、いずれもトレーニング時間は30分程度で安定。
生成結果
動いた!
temporalをmotion Loraとして、spatialは普通のLoraとして挿す。
spatialの使いかた気づくまで時間かかった。
temporalって「一時的」ではなく、「時間的」なのか。
