Instructions to use facebook/musicgen-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/musicgen-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="facebook/musicgen-large")# Load model directly from transformers import AutoProcessor, AutoModelForTextToWaveform processor = AutoProcessor.from_pretrained("facebook/musicgen-large") model = AutoModelForTextToWaveform.from_pretrained("facebook/musicgen-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md (#15)
Browse files- Update README.md (e6c7c3fbcb5d5d3a48924171a361e24d4208415d)
README.md
CHANGED
|
@@ -63,7 +63,7 @@ synthesiser = pipeline("text-to-audio", "facebook/musicgen-large")
|
|
| 63 |
|
| 64 |
music = synthesiser("lo-fi music with a soothing melody", forward_params={"do_sample": True})
|
| 65 |
|
| 66 |
-
scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"],
|
| 67 |
```
|
| 68 |
|
| 69 |
3. Run inference via the Transformers modelling code. You can use the processor + generate code to convert text into a mono 32 kHz audio waveform for more fine-grained control.
|
|
|
|
| 63 |
|
| 64 |
music = synthesiser("lo-fi music with a soothing melody", forward_params={"do_sample": True})
|
| 65 |
|
| 66 |
+
scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"], data=music["audio"])
|
| 67 |
```
|
| 68 |
|
| 69 |
3. Run inference via the Transformers modelling code. You can use the processor + generate code to convert text into a mono 32 kHz audio waveform for more fine-grained control.
|