audiocraft
audiocraft copied to clipboard
Using musicgen-melody model in Transformers library
Is it possible to use the musicgen-melody model
in the Transformers library like the musicgen-small model
?
I gave it a try :
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.
hi friend did you find out
hi, have you solved the issue?