Generating Music Reactive Videos by Applying Network Bending to Stable Diffusion

Luke Dzwonczyk, Carmine Emanuele Cella, and David Ban
Journal of the Audio Engineering Society



Abstract

In this paper we present the first steps towards the creation of a tool which enables artists to create music visualizations using pre-trained, generative, machine learning models. First, we investigate the application of network bending, the process of applying transforms within the layers of a generative network, to image generation diffusion models by utilizing a range of point-wise, tensor-wise, and morphological operators. We identify a number of visual effects that result from various operators, including some that are not easily recreated with standard image editing tools. We find that this process allows for a continuous, fine-grain control of image generation which can be helpful for creative applications. Next, we generate music-reactive videos using Stable Diffusion by passing audio features as parameters to network bending operators. Finally, we comment on certain transforms which radically shift the image and the possibilities of learning more about the latent space of Stable Diffusion based on these transforms.

https://github.com/dzluke/JAES2025



Videos (with machine-crafted audio features)

audio: "Singularity" by John Hopkins
prompt: "shapes"
operator: tensor contraction; feature: EnCodec
layer: 1

audio: "Ghosts" by Mako
prompt: "shapes"
operator: tensor contraction; feature: EnCodec
layer: 1

audio: "Singularity" by John Hopkins
prompt: "shapes"
operator: R6 (six plane rotation); feature: EnCodec
layer: 1




Videos (with hand-crafted audio features)

audio: solo piano
prompt: "3D mesh geometry"
operator: rotate R1; feature: RMS
layer: 40

audio: solo piano
prompt: "3D mesh geometry"
operator: rotate R1; feature: spectral flux
layer: 40

audio: opening of Beethoven's Coriolan Overture
prompt: begins with "starry night" and ends with "forest with river"
operator: rotate R1; feature: RMS
layer: 40


audio: opening of Beethoven's Coriolan Overture
prompt: "Thunderstorm with lightning"
operator: rotate R1; feature: RMS
layer: 0

audio: opening of Beethoven's Coriolan Overture
prompt: "Thunderstorm with lightning"
operator: rotate R1; feature: RMS
layer: 40

audio: opening of Beethoven's Coriolan Overture
prompt: "Bass"
operator: rotate R1; feature: RMS
layer: 0


audio: electric guitar (Gabriel Sarnoff)
prompt: multiple prompts used
operator: rotate R1; feature: RMS
layer: 40



The Breathing of this Celestial Machine

An audio-visual piece created by Luke Dzwonczyk makes use of our system to create videos that change based on audio. Each video is the result of the same series of prompts, but with different random seeds, giving each a slight variation. Different stems of the audio are visualized in each of the four rectangular videos, using RMS and the rotation bending function.



Images

Card image

Rotation by R1

Applying rotation by R1 at different layers with changing angle to the prompt "a floating orb"

Card image

Rotation by R2

Applying rotation by R2 at different layers with changing angle to the prompt "a floating orb"

Card image

Rotation by R3

Applying rotation by R3 at different layers with changing angle to the prompt "a floating orb"

Card image

Rotation by R4

Applying rotation by R4 at different layers with changing angle to the prompt "a floating orb"

Card image

Semantic shift

Applying rotation by R1 at different layers with changing angle to the prompt "crane"

Card image

Hard threshold

Applying thresholding at different with changing r to the prompt "a floating orb"

Card image

Addition of scalar to single dimension

Adding scalar r to only first dimension of the latent tensor with prompt "a floating orb"

Card image

Reflection

Applying a reflection across each dimension with prompt "a floating orb"

Card image

Addition of scalar (sparse)

Adding scalar r to a randomly selected 5% of features of the latent tensor with prompt "a floating orb"

Card image

Inversion

Applying inversion at different layers with changing r to the prompt "a floating orb".
Each row is for a different value of r.

Card image

Dilation with normalization

Applying dilation with normalization at different layers to the prompt "a floating orb".
Each column shows normalization happening across a different dimension.

Card image

Erosion with normalization

Applying erosion with normalization at different layers to the prompt "a floating orb".
Each column shows normalization happening across a different dimension.