MELFuSION: Synthesizing Music from Image and Language Cues Using Diffusion Models

Sanjoy Chowdhury, Sayan Nag, K. J. Joseph, Balaji Vasan Srinivasan, Dinesh Manocha

Abstract

MeLFusion is a novel diffusion-based framework that synthesizes high-quality music by jointly conditioning on both textual descriptions and images. By introducing a "visual synapse" that bridges a pre-trained image diffusion model with a music generation model, MeLFusion achieves a 67.98% improvement in audio quality (FAD score) over text-only state-of-the-art methods. This approach effectively captures the fine-grained aesthetic and emotional nuances of visual scenes that are often lost in text-only prompts.

Introduction

While text-to-image and text-to-video models have seen significant advancement, text-to-music generation remains a challenge. Most existing models rely solely on text prompts, which are often a "lossy" medium for describing the emotional "vibe" or fine-grained aesthetic of a scene. For content creators and filmmakers, describing desired music in words is often insufficient to capture the nuances present in a visual reference.

Problem setting and comparison with alternate approaches.

Previous attempts to bridge this gap used "cascaded" approaches—generating a text caption from an image first—which often leads to generic, sub-optimal results. MeLFusion addresses this by semantically aligning music generation with both a reference image and a text instruction, leveraging the rich semantic information inherent in visual data.

Methods

MeLFusion is built on the architecture of Latent Diffusion Models (LDMs). The core innovation is the "Visual Synapse," a parameter-efficient handshake between two different modalities.

The Visual Synapse Architecture

Instead of using a global image embedding, MeLFusion leverages a pre-trained Stable Diffusion model. The input image is "inverted" into the latent space using DDIM inversion. As the image model runs, internal self-attention features (Keys and Values) are extracted from its decoder layers. These features contain rich, spatial, and semantic information about the image.

The MeLFusion architecture featuring the Visual Synapse.

These extracted visual features are injected into the cross-attention layers of a text-to-music LDM. The fusion is controlled by a learnable parameter, $\alpha$, for each layer, allowing the model to learn the optimal "visual weight" for different parts of the music generation process. The music backbone converts waveforms into mel-spectrograms in a latent space, using FLAN-T5 as the text encoder.

Datasets and Evaluation

To support multi-modal training, the authors introduced two key resources:

  • MeLBench: A benchmark of 11,250 triplets (Image, Text, Music) annotated by 18 professional musicians across 15 genres.
  • Extended MusicCaps: A supplement to the popular MusicCaps dataset, adding relevant images to existing text-music pairs.

Additionally, the authors proposed the Image Music Similarity Metric (IMSM). This metric uses language as a bridge, combining CLIP (image-text) and CLAP (audio-text) scores to mathematically measure how well the generated music fits the reference image.

Key Results

Experimental results demonstrate that visual guidance significantly enhances audio quality and relevance:

  • Objective Quality: On MeLBench, MeLFusion achieved a Frechet Audio Distance (FAD) of 1.05, a 67.98% relative improvement over the text-only state-of-the-art, MusicGen (FAD: 3.28).
  • Subjective Quality: In user studies with 75 participants, MeLFusion consistently outperformed baselines like TANGO++ and MusicLM in Overall Quality (OVL) and Relevance (REL).
  • Robustness: The model demonstrated steady performance across diverse genres, from Hip-Hop to Classical, proving the generalizability of the visual synapse.

Conclusion and Future Work

MeLFusion demonstrates that images provide fine-grained semantic information—such as the "tranquility" of a starry night—that text prompts often miss. While highly effective for still images, future work will focus on extending the visual synapse to handle the temporal dynamics of video. Additionally, optimizing the architecture for faster inference and lower memory usage remains a priority for real-time creative applications.

Summary updated

BibTeX
@inproceedings{chowdhury2024melfusion,
  author = {Sanjoy Chowdhury and Sayan Nag and K. J. Joseph and Balaji Vasan Srinivasan and Dinesh Manocha},
  title = {{MELFuSION: Synthesizing Music from Image and Language Cues Using Diffusion Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure