はじめに
RTX 3080 (VRAM12GB)を使って力任せに動画作成をしてみました。前回使用したText2Video-ZeroにControlNetを組み合わせています。touch-sp.hatenablog.com
あらたにスクリプトを書きました。
こちらです→「canny_video2video.py」
結果
Anything-v5.0 672x672
guidance_scale:9.0
controlnet_conditioning_scale:1.0
Anything-v5.0 512x512
guidance_scale:9.0
controlnet_conditioning_scale:1.0
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v5.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 1.0 ^ --guidance_scale 9.0 ^ --save_path conditioning_scale1.0_guidance_scale9.0.mp4
「prompt.txt」
a beautiful girl wearing sportswear running
Anything-v4.0
guidance_scale:5.0
controlnet_conditioning_scale:1.0
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 1.0 ^ --guidance_scale 5.0 ^ --save_path conditioning_scale1.0_guidance_scale5.0.mp4
「prompt.txt」
a beautiful girl wearing running
guidance_scale:7.0
controlnet_conditioning_scale:1.0
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 1.0 ^ --guidance_scale 7.0 ^ --save_path conditioning_scale1.0_guidance_scale7.0.mp4
「prompt.txt」
a beautiful girl wearing running
guidance_scale:9.0
controlnet_conditioning_scale:1.0
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 1.0 ^ --guidance_scale 9.0 ^ --save_path conditioning_scale1.0_guidance_scale9.0.mp4
「prompt.txt」
a beautiful girl wearing sportswear running
controlnet_conditioning_scale:0.8
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 0.8 ^ --guidance_scale 9.0 ^ --save_path conditioning_scale0.8_guidance_scale9.0.mp4
「prompt.txt」
a beautiful girl wearing running
controlnet_conditioning_scale:0.6
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 0.6 ^ --guidance_scale 9.0 ^ --save_path conditioning_scale0.6_guidance_scale9.0.mp4
「prompt.txt」
a beautiful girl wearing running
controlnet_conditioning_scale:0.4
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 0.4 ^ --guidance_scale 9.0 ^ --save_path conditioning_scale0.4_guidance_scale9.0.mp4
「prompt.txt」
a beautiful girl wearing running
guidance_scale:11.0
controlnet_conditioning_scale:1.0
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 1.0 ^ --guidance_scale 11.0 ^ --save_path conditioning_scale1.0_guidance_scale11.0.mp4
「prompt.txt」
a beautiful girl wearing running
guidance_scale:13.0
controlnet_conditioning_scale:1.0
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 1.0 ^ --guidance_scale 13.0 ^ --save_path conditioning_scale1.0_guidance_scale13.0.mp4
「prompt.txt」
a beautiful girl wearing sportswear running
controlnet_conditioning_scale:0.6
python canny_video2video.py ^ --video run.mp4 ^ --model model/anything-v4.0 ^ --vae vae/anime2_vae ^ --scheduler eulera ^ --low_threshold 50 ^ --high_threshold 50 ^ --prompt prompt.txt ^ --seed 20000 ^ --steps 30 ^ --conditioning_scale 0.6 ^ --guidance_scale 13.0 ^ --save_path conditioning_scale0.6_guidance_scale13.0.mp4
「prompt.txt」
a beautiful girl wearing sportswear running
補足
プロンプト
「prompt.txt」というテキストファイルを作成してスクリプトから読み込んでいます。GIFへの変換
mp4ファイルが作成されます。ブログに載せるためにffmpegを使ってGIFに変換しています。
ffmpeg -i output.mp4 -vf scale=320:-1 output.gif