Skip to content

a notebook containing scripts, documentation, and examples for finetuning musicgen

Notifications You must be signed in to change notification settings

lyramakesmusic/finetune-musicgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

finetune-musicgen

a notebook containing scripts, documentation, and examples for finetuning musicgen.

the .ipynb in this repo may not be up to date, latest version is always at https://colab.research.google.com/drive/13tbcC3A42KlaUZ21qvUXd25SFLu8WIvb

Notebook features:

  • Preprocessing (splitting audio into 30s chunks and resampling to 44100hz)
  • Automatic labelling using essentia (genre, mood, instrument, key, bpm)
  • Environment setup (putting customized .yaml and .jsonl files in the right places)
  • Run command with updated params (default params optimized for large multi-gpu runs, mine ~50% faster)
  • Examples for saving/resuming checkpoints
  • Examples for exporting .bin files and loading them into musicgen for inference
  • Examples for various types of generating (unconditional, text guided, continuations, multiband diffusion)
  • Configs to finetune meta's stereo musicgen models
  • Instructions on environment setup for local finetuning
  • Example config to train from scratch using descript instead of encodec, allowing generations in 44.1khz

screenshot of the first section of the colab notebook

TODO:

  • improved examples for exporting/generating
  • automatically save checkpoint to drive and run inference example every epoch

for any bugs, questions, or feature requests - I'm @lyraaaa on twitter/X and lyraaaa on discord.

licensing: go ahead and use code from this if you like, credit is cool but optional

About

a notebook containing scripts, documentation, and examples for finetuning musicgen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published