Camera Movements in AnimateDiff

How to animate camera movements in AnimateDiff?

1. If you haven’t installed AnimateDiff, go to install AnimateDiff from github.
2. Go to hugging face animatediff, download “v2_lora_PanLef.ckpt”, “v2_lora_PanRight.ckpt”, “v2_lora_RollingAnticlockwise.ckpt”, “v2_lora_RollingClockwise.ckpt”, “v2_lora_TiltDown.ckpt”, “v2_lora_TiltUp.ckpt”, “v2_lora_ZoomIn.ckpt”, “v2_lora_ZoomOut.ckpt”, and put them at “models\MotionLoRA.”
3. Under “AnimatedDiff” directory, go to “configs\prompts\v2”. Open “v2-2-RealisticVision-MotionLoRA.yaml.” This file generates animations for all 8 camera movements.
4. It is easier to run one camera movement at a time. I suggest you split the file into 8 files for each type, rename the files. For example, “v2-2-RealisticVision-MotionLoRA-ZoomIn.yaml” is for zoom-in . Open one file and edit it.
5. In the field of dreambooth_path, compare the name of checkpoint with the name of checkpoint in “models\DreamBooth_LoRA.” If they have different version numbers, update in the script to match with the name in the directory.
6. In the field of motion_module, make sure you have downloaded the motion module “mm_sd_v15_v2.ckpt”, and it is in “models\Motion_Module” directory.
7. The default width and height of the output video is 512×512. If you want to render faster, you can set the width and height smaller. Add this in the script
W: 256
H: 256
8. Change your prompt to describe your scene.
9. Open an Anaconda Prompt. Run command:
>conda activate animatediff
10. In the Anaconda prompt, go to the directory “AnimateDiff,” run one of your yaml file, for example:
>python -m scripts.animate –config configs/prompts/v2/v2-2-RealisticVision-MotionLoRA-ZoomIn.yaml
11. Monitor the progress in the Anaconda console. When it finishes, the result can be found at “samples” directory.
12. Modify your prompts and run again until you find good results.

How many camera movements in AnimateDiff?

There are 8 camera movements:
1. Zoom in
2. Zoom out
3. Pan left
4. Pan right
5. Tile up
6 Tile down
7. Rotate clockwise
8. Rotate anti-clockwise