Network Bending of Diffusion Models for Audio-Visual Generation

Luke Dzwonczyk, Carmine Emanuele Cella, and David Ban
DAFx 2024



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/DAFX2024



Videos

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



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.