Instructions to use facebook/musicgen-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/musicgen-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="facebook/musicgen-small")# Load model directly from transformers import AutoTokenizer, AutoModelForTextToWaveform tokenizer = AutoTokenizer.from_pretrained("facebook/musicgen-small") model = AutoModelForTextToWaveform.from_pretrained("facebook/musicgen-small") - Notebooks
- Google Colab
- Kaggle
Inference API
Hey @bernland - I don't think the Inference API is set-up yet to handle the music generation task. Probably this is something we can look to set up as we see more music models on the Hub cc @osanseviero
It should actually be one-to-one the same as vanilla TTS though for text-prompted generation (not for melody prompted generation), so likely it's just a case of adding a TTS auto model mapping in `transformers
hello
Hi @sanchit-gandhi why i see Inference API has been turned off for this model. when Inference API will be turned on?
I am unable to deploy the model in an AWS DLC and run inferences on it. Do you have any solutions?
is this model opensource for commercial purposes? I read in this article https://about.fb.com/news/2023/08/audiocraft-generative-ai-for-music-and-audio/#:~:text=Takeaways,field%20of%20AI%2Dgenerated%20audio.
