for frame in vid:
pil_image = Image.fromarray(frame)
images.append(pil_image)

return images

video = load_video("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/animatediff-vid2vid-input-1.gif")