Riffusion and Gradio: AI music video tutorial

Learn how a Colab notebook combines Riffusion audio, Stable Diffusion 1.5 images and Gradio waveform rendering into an MP4 video.

Player not loading? Watch on YouTube

This tutorial builds a Python app that turns a text prompt into generated music and an MP4 with a background image and waveform. The original riffusion-hobby model creates a spectrogram, and its audio helper converts that image into a WAV file. A separate Stable Diffusion pipeline generates the background from the same prompt, with extra tokens for the image's appearance.

Uploaded on December 16, 2022, the tutorial uses Stable Diffusion 1.5 from RunwayML. The description identifies Gradio 3.14 as the release context for the waveform feature; it does not specify a Riffusion version. The installation steps and launch settings reflect that period.

The walkthrough runs in Google Colab with a GPU runtime. The speaker reports a Tesla T4 with 16 GB of memory and explains model loading, CUDA placement and xformers memory-efficient attention. These are details of the demonstrated setup, rather than a tested minimum hardware requirement or a local AI installation guide.

Gradio's make_waveform function combines the saved audio and image. The result has a static background and waveform bars, rather than a fully animated scene. The final interface accepts a text prompt and returns separate audio and video outputs. The speaker reports roughly 40 seconds for one complete generation on Colab, but that timing is specific to the demonstration.