https://github.com/danielbinschmid/audio-diffusion-training
Training diffusion models for generating audio and music.
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Repository
Training diffusion models for generating audio and music.
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
audio-diffusion-training
This repository is a repository with minimal dependencies for training diffusion models for audio, based on TorchJaekwon.
This repository has submodules. Pull them explicitely using
sh
git submodule update --init --recursive
Setup
- Create venv
pip install --upgrade pip- Install torch
2.7.0(with torchaudio) pip install -r requirements.txt- Install submodules
sh $ cd ./code/deps/TorchJaekwon $ pip install -e . $ cd ../werkzeug $ pip install -e .
Diffusers Dependency
If you want to run our pre-trained latent diffusion model, you need to install diffusers. For the LDM, diffusers is required because we took the VAE from there. In this case, run in addition:
sh
$ pip install -r requirements_diffusers_extra.txt
Inference
- Download the model weights from our googledrive
- Use the command line tool for inference and the provided pre-trained models. Install it via
sh $ cd code $ pip install -e . - Configure the paths in
code/configs/dm. Set the paths to the weights and configuration files. - Configure the number of samples to generate and sampler configuration in the relevant
infer.yamlscript. - Run inference using lookup table below.
|Model|Inference Command|Required Weight Files|
|-|-|-|
|MedleySolosDB Unconditional|dm medley uncond code/configs/dm/unconditional_medley_v0/infer.yaml|U-Net: melddpm_v0.pth, HifiGAN:hifigan-ckpt(only generator)|
|MedleySolosDB Categorical|dm medley cond code/configs/dm/cond_medley_v0/infer.yaml|U-Net: medley_cond.pth, HifiGAN:hifigan-ckpt(only generator)|
|MoisesDB Mel|dm moises mel code/configs/dm/moises_guitar_mel/infer.yaml|U-Net: moises_mel.pth, HifiGAN:hifigan-ckpt(only generator)|
|MoisesDB LDM|dm moises ldm code/configs/dm/moises_guitar_ldm/infer.yaml|U-Net: moises_ldm.pth, VAE and vocoder: From diffusers|
Training
Datasets
|Datasets|URL|Note| |-|-|-| |MedleySolosDB|Download from zenodo|| |MoisesDB|Download from the homepage of music.ai/research|The script will automatically create a training and test split. The split is documented using a csv file. To re-use the split, make sure to backup this csv file safely.|
Mel-Spectrogram Based Diffusion Model
- Compute normalisation scale of the mel-spectrogram by adapting
code/experiments/compute_melminmax.py. Alternatively, re-use the scales pre-computed in the provided pre-trained models in foldercode/configs/dm - Generate config by running e.g.
code/medley_uncond.shafter settingsh # basic flags EXEC_GENERATE_CFG=true EXEC_TRAIN=false EXEC_TEST=false - Set paths in the generated config file. Make sure to set the path to the pre-trained neural vocoder.
- Run training by running e.g.
code/medley_uncond.shafter settingsh # basic flags EXEC_GENERATE_CFG=false EXEC_TRAIN=true EXEC_TEST=false
Latent Diffusion Model
- Make sure that a pre-trained VAE and vocoder is prepared. If you want to train our
MelLDM, make sure to have the dependencies in requirementsdiffusersextra.txt installed. - Train as described above.
Owner
- Name: danielbin
- Login: danielbinschmid
- Kind: user
- Repositories: 1
- Profile: https://github.com/danielbinschmid
Informatics Master's student at TU Munich.
GitHub Events
Total
- Release event: 1
- Watch event: 1
- Push event: 1
- Public event: 1
- Create event: 1
Last Year
- Release event: 1
- Watch event: 1
- Push event: 1
- Public event: 1
- Create event: 1
Dependencies
- matplotlib ==3.10.1
- pydantic ==2.11.4
- pydub ==0.25.1
- tqdm ==4.67.1
- accelerate ==1.6.0
- diffusers ==0.33.1
- nnAudio ==0.3.1
- transformers ==4.47.1