Skip to content

aws-samples/inference-audiocraft-musicgen-on-amazon-sagemaker

Inference Audiocraft Musicgen on Amazon SageMaker

Deploy Audiocraft Musicgen on Amazon SageMaker using SageMaker Endpoints for Async Inference.

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.

MusicGen Models

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

Asynchronous Inference Sequence flow for huggingface model facebook/musicgen-large on Amazon SageMaker

alt text

Deployment and inference notebooks

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

References

Security

See CONTRIBUTING for more information.

Citation

@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},
}

License

This library is licensed under the MIT-0 License. See the LICENSE file.