Open qiuyuzhao opened 6 months ago
Excuse me, have you solved this problem? I encountered the same problem as you
Excuse me, have you solved this problem? I encountered the same problem as you
to hugginface find the model, download to your local.
al
Thank you very much. May I ask if you want to load a tokenizer separately, or if you want to put all the files of t5-base together with the files of musicgen
I seem to have put the downloaded models in a separate folder
I seem to have put the downloaded models in a separate folder
thanks,thanks
Hello, is my directory structure correct?
to run this code :
import torchaudio from audiocraft.models import MusicGen from audiocraft.data.audio import audio_write
model = MusicGen.get_pretrained('facebook/musicgen-small') model.set_generation_params(duration=8) # generate 8 seconds. wav = model.generate_unconditional(4) # generates 4 unconditional audio samples descriptions = ['happy rock', 'energetic EDM', 'sad jazz'] wav = model.generate(descriptions) # generates 3 samples.
melody, sr = torchaudio.load('./assets/bach.mp3')
generates using the melody from the given audio and the provided descriptions.
wav = model.generate_with_chroma(descriptions, melody[None].expand(3, -1, -1), sr)
for idx, one_wav in enumerate(wav):
Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
Prompt error : OSError: Can't load tokenizer for 't5-base'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 't5-base' is the correct path to a directory containing all relevant files for a T5Tokenizer tokenizer.