Instructions to use facebook/musicgen-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/musicgen-medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="facebook/musicgen-medium")# Load model directly from transformers import AutoTokenizer, AutoModelForTextToWaveform tokenizer = AutoTokenizer.from_pretrained("facebook/musicgen-medium") model = AutoModelForTextToWaveform.from_pretrained("facebook/musicgen-medium") - Notebooks
- Google Colab
- Kaggle
Faster MusicGen Generation with Streaming
#7
by sanchit-gandhi - opened
There's no need to wait for MusicGen to generate the full audio before you can start listening to the outputs β° With streaming, you can play the audio as soon as the first chunk is ready π΅ In practice, this reduces the latency to just 5s β‘οΈ
Check-out the demo: https://huggingface.co/spaces/sanchit-gandhi/musicgen-streaming
@sanchit-gandhi there seems to be an internal infra error in the provided demo
also confused about how to enable streaming using musicgen-medium?
