Closed carlthome closed 12 months ago
You need to export the model using the instructions over there https://github.com/facebookresearch/audiocraft/blob/main/docs/MUSICGEN.md#importing--exporting-models
Another solution would be to build directly the model using, e.g.
from audiocraft.models import MusicGen
from audiocraft.solvers import MusicGenSolver
solver = MusicGenSolver.get_eval_solver_from_sig('60625e70')
solver.model.cfg = solver.cfg
musicgen = MusicGen(name='mymusicgen', compression_model=solver.compression_model, lm=solver.model)
Let me know if that snippet of code worked for you and I will add it to the README.
Awesome! Thanks @adefossez!
Got that snippet to work but only by running it from the same working directory as the training (so same Dora directory).
Was hoping this would just work:
but I'm getting
so guess there's more to it.
How can I load the saved model during training, for testing some prompts?