NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diff-TONE: Timestep Optimization for iNstrument Editing in Text-to-Music Diffusion Models

Teysir Baoueb, Xiaoyu Bie, Xi Wang, Gaël RichardarXiv 2025 · DOI

Introduction

Text-to-music diffusion models, such as Stable Audio, have demonstrated remarkable capabilities in generating high-quality audio from natural language descriptions. However, these models remain notoriously difficult to control for specific editing tasks. A primary challenge is "instrument editing"—the ability to change the timbre of a musical piece (e.g., swapping a piano for a violin) while maintaining the original melody, rhythm, and structure. Because diffusion models are highly sensitive to prompt variations, even minor changes often result in entirely different compositions, even when using the same random seed.

Diff-TONE (Timestep Optimization for iNstrument Editing) addresses this by identifying the "sweet spot" in the denoising process where instrumental characteristics are defined. By precisely timing a prompt swap, the method achieves high-fidelity instrument transfer without requiring model retraining or specialized adapter modules.

Methodology

The core insight of Diff-TONE is that diffusion models generate audio hierarchically. The process typically begins by establishing the global structure (melody and rhythm), followed by the infusion of instrumental characteristics (timbre), and concluding with the refinement of fine-grained acoustic details.

The Diff-TONE Pipeline

Diff-TONE leverages a pretrained instrument classifier to guide the editing process. The pipeline operates as follows:

  1. Initial Generation: The process starts with a noisy latent $x_T$ and a source prompt (e.g., "A soft piano arpeggio").
  2. Classifier Guidance: At each reverse diffusion step $t$, the model computes an approximation of the final audio ($\tilde{x}_0$). This approximation is passed to a specialized instrument classifier.
  3. Timestep Optimization: The classifier monitors the "perceived" instrument in the latent space. The "optimal intermediate timestep" is identified as the final moment the classifier changes its prediction—this indicates the point where the model is beginning to commit to a specific timbre.
  4. The Prompt Swap: At this precise moment, the text prompt is swapped to the target instrument (e.g., "violin"). The generation then proceeds using the new prompt to guide the remaining denoising steps.
The Diff-TONE pipeline: using a classifier to find the optimal moment to swap prompts.

To ensure computational efficiency, the authors distilled a large music understanding model (MERT) into a smaller student model. This student model operates directly on the diffusion model's latent representations, avoiding the overhead of decoding audio at every step.

Experimental Setup and Results

The instrument classifier was trained using the IRMAS dataset, which contains 11,000 recordings across 11 instrument classes. For evaluation, the authors utilized a set of 100 diverse prompts generated by ChatGPT to test the system's ability to perform consistent edits across various musical styles.

The "Goldilocks" Timestep

The success of the edit depends entirely on the timing of the swap. Swapping the prompt too early (e.g., $t=39$) disrupts the established melody, while swapping too late (e.g., $t=9$) fails to alter the instrument because the timbre is already "baked into" the latent state. Diff-TONE identifies the optimal middle ground (e.g., $t=21$) where the melody is preserved but the instrument successfully changes.

Spectrogram showing the optimal instrument swap at t=21, which successfully changes the timbre while preserving the original melodic structure.

Quantitative Performance

Diff-TONE was compared against baseline strategies such as swapping at a fixed midpoint or random timesteps:

  • Content Preservation: Diff-TONE achieved a Chromagram Similarity distance of 0.099, significantly better than the midpoint baseline (0.189), indicating superior retention of the original notes.
  • Audio Quality: The method also led in Kernel Audio Distance (KAD) with a score of 18.265, compared to 20.716 for the midpoint approach, suggesting higher overall generation quality.
  • State-of-the-Art Comparison: When compared to MusicMagus, a zero-shot editing model, Diff-TONE demonstrated higher accuracy in instrument transfer and better preservation of musical content.

Discussion and Limitations

Diff-TONE provides a flexible, training-free framework for precise music editing. By operating in the latent space, it adds negligible computational overhead to the generation process. However, the method's efficacy is tied to the accuracy of the instrument classifier; if the classifier fails to detect the timbre transition, the edit may not occur. Currently designed for single-instrument tracks, future work aims to extend this methodology to complex, multi-instrument arrangements and real-world audio inversion.

Summary updated

BibTeX
@misc{baoueb2025diff,
  author = {Teysir Baoueb and Xiaoyu Bie and Xi Wang and Gaël Richard},
  title = {{Diff-TONE: Timestep Optimization for iNstrument Editing in Text-to-Music Diffusion Models}},
  year = {2025},
  eprint = {2506.15530},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.15530},
}
Figure