Deploy Audiocraft Musicgen on Amazon SageMaker using SageMaker Endpoints for Async Inference.
Blog: Inference AudioCraft MusicGen models using Amazon SageMaker
This solution demonstrates deploying AudioCraft MusicGen models from HuggingFace on Amazon SageMaker. MusicGen models take natural language text as input prompt and generate music as output.

AudioCraft consists of three models: MusicGen, AudioGen, and EnCodec. This repo aims to deploy MusicGen models on Amazon SageMaker for Asynchronous inferencing.

facebook/musicgen-large model will be deployed to a SageMaker Asynchronous endpoint. This endpoint will be used to infer for music generation.HuggingFaceModel will be deployed to a SageMaker Asynchronous endpoint.facebook/musicgen-large in the scope of this blog, will be uploaded to S3 during the deployment. Also, during the inference, the generated outputs will be uploaded to S3.
The deployment notebooks used in this repo uses Huggingface as model provider for the musicgen models. The corresponding deployment and inference noteboks for the respective models are tablulated below.
| Huggingace Model ID | Deploy Notebook | Inference Notebook |
|---|---|---|
| facebook/musicgen-large | Deploy | Inference |
| facebook/musicgen-medium | Deploy | Inference |
| facebook/musicgen-small | Deploy | Inference |
See CONTRIBUTING for more information.
@inproceedings{copet2023simple,
title={Simple and Controllable Music Generation},
author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
}
This library is licensed under the MIT-0 License. See the LICENSE file.