This is the official implementation of MusicMamba.
Checkout our demo and paper : Demo | arXiv
-
Clone this Repo
git clone https://github.com/Wietc/MusicMamba.git
-
using python version 3.11.5
-
using pytorch version 2.2.1
-
install python dependencies
pip install -r requirements.txt
-
Mamba needs to be downloaded separately
pip install mamba_ssm
-
install checkpoints from Huggingface
https://huggingface.co/moersxm12138/MusicMamba
We currently do not offer fine-tuning functionality.
python generate.py
- The specification of the model path, data path, and other generated parameters are in the
utilities/argument_funcs.py
file.
`
├── data Stores train, test and val data.
│ └── FolkDB
│ ├── train
│ ├── test
│ └── val
├── dataset.py Progress datasets.
├── generate.py For generating music. (Detailed usage are written in the file)
├── model.py The MusicMamba Architecture.
├── midi_tokenize Remi-M tokenize.
├── utilities Tools for generating music.
│ ├── argument_funcs.py Some arguments for generating.
│ ├── constants.py
│ └── device.py
└── README.md Readme
If you find this work helpful and use our code in your research, please kindly cite our paper:
@article{MusicMamba,
title={MusicMamba: A Dual-Feature Modeling Approach for Generating Chinese Traditional Music with Modal Precision},
author={Jiatao Chen and Xing Tang and Tianming Xie and Jing Wang and Wenjing Dong and Bing Shi}, year={2024},
eprint={2409.02421},
archivePrefix={arXiv},
}