Make Stable Diffusion videos that actually move to the music
It generates videos by wandering Stable Diffusion's latent space between prompts, optionally locking the morph speed to an audio track.

What it does
stable-diffusion-videos wraps the standard Hugging Face diffusers pipeline to generate short videos by interpolating through latent space between text prompts. Feed it a sequence of prompts and seeds, and it renders the in-between frames to create a morphing video. Hand it an audio file, and the interpolation rate locks to the track so the visuals pulse with the beat.
The interesting bit
The audio sync is the real hook. Instead of slapping a soundtrack over a pre-rendered clip, the library uses the audio to drive how fast the latent walk progresses between prompts—so the morphing literally accelerates and decelerates with the music. It is essentially a Karpathy gist that grew up, got a UI, and learned to dance.
Key highlights
- Built on
diffusersand the standardCompVis/stable-diffusion-v1-4model, so it works with familiar weights. - Supports audio-reactive generation: pass an
audio_filepathand frame offsets, and the interpolation pacing follows the track. - Includes a local
InterfaceUI for point-and-click generation. - Ships with a Colab notebook for cloud GPU experimentation.
- Exposes a single
StableDiffusionWalkPipeline.walk()method that handles frame generation, interpolation, and video export.
Caveats
- Apple M1 users must switch from the default
torch.float16totorch.float32, as MPS does not support half-precision. - The optional Real-ESRGAN 4× upsampling feature is currently disabled due to dependency issues.
- The README is vague on exactly how the audio analysis translates to interpolation steps; expect to experiment with
audio_offsetsandfpsto get tight sync.
Verdict
Worth a look if you want to turn text-to-image prompts into hypnotic video loops or rough music visuals without writing latent-space interpolation boilerplate. Skip it if you need precise motion control, keyframing, or a traditional video editing workflow.
Frequently asked
- What is nateraw/stable-diffusion-videos?
- It generates videos by wandering Stable Diffusion's latent space between prompts, optionally locking the morph speed to an audio track.
- Is stable-diffusion-videos open source?
- Yes — nateraw/stable-diffusion-videos is open source, released under the Apache-2.0 license.
- What language is stable-diffusion-videos written in?
- nateraw/stable-diffusion-videos is primarily written in Python.
- How popular is stable-diffusion-videos?
- nateraw/stable-diffusion-videos has 4.7k stars on GitHub.
- Where can I find stable-diffusion-videos?
- nateraw/stable-diffusion-videos is on GitHub at https://github.com/nateraw/stable-diffusion-videos.