Abstract
We are witnessing a revolution in conditional image synthesis with the recent success of large scale text-to-image generation methods. This success also opens up new opportunities in controlling the generation and editing process using multi-modal input. While spatial control using cues such as depth, sketch, and other images has attracted a lot of research, we argue that another equally effective modality is audio since sound and sight are two main components of human perception. Hence, we propose a method to enable audio-conditioning in large scale image diffusion models. Our method first maps features obtained from audio clips to tokens that can be injected into the diffusion model in a fashion similar to text tokens. We introduce additional audio-image cross attention layers which we finetune while freezing the weights of the original layers of the diffusion model. In addition to audio conditioned image generation, our method can also be utilized in conjuction with diffusion based editing methods to enable audio conditioned image editing. We demonstrate our method on a wide range of audio and image datasets. We perform extensive comparisons with recent methods and show favorable performance.
Introduction
While text-to-image models have reached incredible heights, text is an inherently manual and sometimes "incongruent" modality. A short text prompt often fails to capture the rich, atmospheric context of a scene—consider the difference between the generic word "rain" and the specific auditory texture of a light drizzle versus a torrential downpour.
SonicDiffusion addresses this by enabling high-quality image generation and editing guided by audio inputs. By mapping audio features into a token space compatible with pretrained models like Stable Diffusion, the system synthesizes images that capture nuanced ambiance and material properties—such as the specific sound of splashing water or the texture of a plastic bag—that text prompts often struggle to describe. This approach bridges the gap between auditory perception and visual synthesis without sacrificing the generative priors of large-scale models.
Methodology
SonicDiffusion introduces two primary architectural innovations to the standard Latent Diffusion Model (LDM) framework:
1. The Audio Projector
This module translates raw audio into a series of "audio tokens." It utilizes a pretrained CLAP (Contrastive Language-Audio Pretraining) encoder to extract features, which are then processed through 1D convolutional layers and self-attention blocks. The projector produces 77 tokens, matching the output format of the CLIP text encoder, ensuring the audio features live in a compatible semantic space.
2. Gated Cross-Attention Layers
Rather than overwriting existing text-conditioning layers, the authors introduce new cross-attention layers specifically for audio. These layers utilize a tanh gating mechanism. By initializing the gate to zero, the model begins training by relying entirely on its original knowledge and gradually learns to incorporate the audio modality. This ensures training stability and preserves the model's high-quality generative capabilities.
Training Strategy
The model is trained in two stages. First, the Alignment Stage teaches the Audio Projector to align audio tokens with the CLIP semantic space using MSE and InfoNCE losses, using BLIP-generated captions as a bridge. Second, the Fine-tuning Stage optimizes the gated cross-attention layers while keeping the original diffusion model weights frozen. This parameter-efficient approach requires only 34M trainable parameters.
Experimental Results
The model was evaluated across three distinct datasets: Landscape + Into the Wild (environmental ambiance), Greatest Hits (material properties), and RAVDESS (facial expressions).
SonicDiffusion consistently outperformed state-of-the-art competitors like GlueGen and AudioToken:
- Image Quality: Achieved superior FID (Fréchet Inception Distance) scores, notably reaching 89.6 on the RAVDESS dataset.
- Semantic Alignment: Scored highest in Audio-Image Content (AIC) on the Greatest Hits dataset (0.6050), demonstrating superior mapping of sounds to visual material properties.
- User Preference: In a user study, participants preferred SonicDiffusion's results over 64% of the time for landscape samples and 56% for material-based samples.
Discussion and Key Insights
- Audio as a Material Descriptor: The model excels at distinguishing materials based on sound. Because the auditory signature of a plastic bag is distinct from glass, the model renders these textures more accurately than generic text prompts.
- Multi-modal Flexibility: The gating mechanism allows for hybrid inputs. Users can provide a text prompt for style (e.g., "Comic-Book Style") and audio for content (e.g., "Squishing water").
- Interpolation and Control: The continuous embedding space allows for linear interpolation between sounds (e.g., blending "Rain" and "Fire crackling"). Additionally, adjusting audio volume directly correlates with the visual "intensity" of the generated edit.
Conclusion
SonicDiffusion demonstrates the power of audio as a rich, natural modality for image synthesis. While the model currently inherits some artifacts from Stable Diffusion v1.4 and faces challenges with complex DDIM inversions, it sets a new standard for audio-visual alignment in generative AI. Future work aims to extend these capabilities to video generation, where temporal alignment between sound and sight can create even more immersive experiences.
Summary updated