This is the official repository for our paper: “D3PIA: A Discrete Denoising Diffusion Model for Piano Accompaniment Generation” (accepted at ICASSP 2026).
We propose a discrete diffusion-based piano accompaniment generation model, D3PIA, leveraging the locally aligned structure of musical accompaniments with the lead sheet in the piano roll representation. Our model incorporates Neighborhood Attention (NA) to both encode the lead sheet and condition it for predicting note states in the piano accompaniment, which enhances local contextual modeling by efficiently attending to nearby melody and chord conditions.
- Interactive Demo: Demo Page
- POP909 Dataset
Click Download Repository.
# install uv from https://docs.astral.sh/uv/getting-started/installation/
uv venv --python 3.10
uv sync
# install midisym (private midi library)
./install_midisym.sh- Pretrained D3PIA model link
Unzip the pre-trained D3PIA model and change the unzipped directory as ./checkpoints.
Place the dataset folder inside ./data and split the dataset. We utilized random split (train:val:test=8:1:1) and used the pre-processed MIDI of POP909 by WholeSongGen, which can be downloadable from here.
uv run python main_cli.py fit -c ./configs/D3PIA_default.yaml# first, you need to update ckpt_path of config file.
# you can choose checkpoint from ./logs/{exp_id} (last checkpoint) or ./checkpoints/{exp_id}.
uv run python main_cli.py test -c ./logs/{exp_id}/config.yaml
# convert midi file from npy
uv run python pr_mat_to_midi.py --wandb_id {exp_id}By utilizing config files in the checkpoint, you can inference with pretrained checkpoints.
This project is licensed under The MIT License.
@inproceedings{choi2026d3pia,
title = {D3PIA: A Discrete Denoising Diffusion Model for Piano Accompaniment Generation from Lead Sheet},
author = {Choi, Eunjin and Kim, Hounsu and Bang, Hayeon and Kwon, Taegyun and Nam, Juhan},
booktitle = {Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP)},
year = {2026},
publisher = {IEEE}
}