On Thursday, a pair of techies launched Riffusion, an AI mannequin that generates music from textual content cues by creating a visible illustration of sound and changing it to audio for playback. It makes use of an improved model of the Secure Diffusion 1.5 picture synthesis mannequin, which applies visible latent diffusion to sound processing in a novel manner.
Created as a pastime undertaking by Seth Forsgren and Hayk Martiros, Riffusion works by producing sonograms, which retailer audio in a two-dimensional picture. On a sonogram, the X axis represents time (the order wherein the frequencies are performed, from left to proper) and the Y axis represents the frequency of sounds. In the meantime, the colour of every pixel within the picture represents the amplitude of the sound at that given second.
Since a sonogram is a kind of picture, Secure Diffusion can course of it. Forsgren and Martiros skilled a custom-made secure diffusion mannequin utilizing pattern sonograms linked to descriptions of the sounds or musical genres they represented. With that data, Riffusion can generate new music on the fly based mostly on textual content prompts that describe the kind of music or sound you wish to hear, akin to “jazz”, “rock” and even typing on a keyboard.
After producing the sonogram picture, Riffusion makes use of Torchaudio to vary the sonogram to sound and play it again as audio.
“That is the v1.5 secure diffusion mannequin with no modifications, simply fitted on spectrogram pictures paired with textual content,” the creators of Riffusion write on their explainer web page. “You possibly can generate infinite variations of an advert by various the seed. All the identical net UIs and strategies like img2img, inpainting, destructive adverts, and interpolation work out of the field.”
Guests to the Riffusion web site can experiment with the AI mannequin due to an interactive net software that generates interpolated sonograms (easily merged for seamless playback) in actual time whereas viewing the spectrogram repeatedly on the left aspect of the web page.
It’s also possible to merge types. For instance, writing “clean tropical dance jazz” brings collectively parts from totally different genres for a novel end result, encouraging experimentation by way of mixing types.
In fact, Riffusion is not the primary AI-powered music generator. Earlier this 12 months, Harmonai launched Dance Diffusion, an AI-powered generative music mannequin. OpenAI’s Jukebox, introduced in 2020, additionally generates new music with a neural community. And web sites like Soundraw create continuous music on the go.
In comparison with these extra streamlined AI music efforts, Riffusion feels extra just like the pastime undertaking it’s. The music it generates ranges from attention-grabbing to unintelligible, but it surely’s nonetheless a exceptional software of latent diffusion know-how that manipulates audio in a visible house.
The Riffusion mannequin code and checkpoint can be found on GitHub.