Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.
MIT License
20.95k
stars
2.14k
forks
source link
Using musicgen-melody model in Transformers library #413
from transformers import AutoProcessor, MusicgenForConditionalGeneration
processor = AutoProcessor.from_pretrained("facebook/musicgen-melody")
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-melody)
inputs = processor(
text=["80s pop track with bassy drums and synth", "90s rock song with loud guitars and heavy drums"],
padding=True,
return_tensors="pt",
)
audio_values = model.generate(**inputs, max_new_tokens=256)
But it seems like the musicgen-melody model is not supported by the Transformers library, and i get the following error:
raise EnvironmentError(
OSError: facebook/musicgen-melody does not appear to have a file named config.json.
Checkout 'https://huggingface.co/facebook/musicgen-melody/main' for available files.
Is it possible to use the
musicgen-melody model
in the Transformers library like themusicgen-small model
?I gave it a try :
But it seems like the
musicgen-melody model
is not supported by the Transformers library, and i get the following error: