Create 🔥 videos with Stable Diffusion by exploring the latent space and morphing between text prompts
stable-diffusion-videos is a Python library for creating videos with Stable Diffusion by exploring its latent space and morphing between text prompts. It is built for developers and AI artists who want to turn a sequence of prompts into a continuous, animated video instead of generating single static images, and it is released as open source on GitHub.
A StableDiffusionWalkPipeline is loaded from a pretrained Stable Diffusion checkpoint and given a list of prompts and seeds; it then walks between the resulting latent representations over a chosen number of interpolation steps, rendering a frame at each step and assembling the frames into a video saved to an output directory. A guidance scale controls how closely each frame follows its prompt.
The library can add a music track to a video, using the audio to set the rate of interpolation so the visuals move to the beat. It also ships an Interface class that launches a UI around the pipeline instead of requiring a script, and a notebook version runs the walk entirely in Google Colab.
stable-diffusion-videos installs with pip install stable_diffusion_videos and is released under the Apache-2.0 license. It runs on a CUDA GPU using torch.float16 by default, though Apple M1 hardware needs torch.float32 since float16 is not available on MPS; a Flax notebook version is also provided in the repository, and example scripts are included for common workflows.