export_to_gif(frames, "i2v.gif")  initial image  generated video  AnimateDiff AnimateDiff is an adapter model that inserts a motion module into a pretrained diffusion model to animate an image. The adapter is trained on video clips to learn motion which is used to condition the generation process to create a video. It is faster and easier to only train the adapter and it can be loaded into most diffusion models, effectively turning them into “video models”. Start by loading a MotionAdapter.   Copied import torch