jukebox icon indicating copy to clipboard operation
jukebox copied to clipboard

How to use V3 artists and Genres?

Open Jonovono opened this issue 3 years ago • 1 comments

Hi, im trying to use the V3 Genres and Artists but i'm not sure.

This is the Colab I am working on: https://colab.research.google.com/github/sirbots/jukebox-the-continuator/blob/master/Jukebox_the_Continuator.ipynb#scrollTo=2ip2PPE0rgAb

In this section I have changed 5b_lyrics to 1b_lyrics because I understand that's what I need to do.

model = "1b_lyrics" # or you can change this to "1b_lyrics"
hps = Hyperparams()
hps.sr = 44100
hps.n_samples = 3 if model=='5b_lyrics' else 8

# Specifies the directory to save the sample in.
# We set this to the Google Drive mount point.
hps.name = '/content/drive/My Drive/Colab Notebooks/Jukebox/{my-directory-for-this-project}'
chunk_size = 16 if model=="5b_lyrics" else 32
max_batch_size = 3 if model=="5b_lyrics" else 16
hps.levels = 3
hps.hop_fraction = [.5,.5,.125]

vqvae, *priors = MODELS[model]
vqvae = make_vqvae(setup_hparams(vqvae, dict(sample_length = 1048576)), device)
top_prior = make_prior(setup_hparams(priors[-1], dict()), vqvae, device)

continuation = None

Everything seems to be going well until I run the upsample:

if True:
  del top_prior
  empty_cache()
  top_prior=None
upsamplers = [make_prior(setup_hparams(prior, dict()), vqvae, 'cpu') for prior in priors[:-1]]
labels[:2] = [prior.labeller.get_batch_labels(metas, 'cuda') for prior in upsamplers]

Here it tries to load the v2 genres/artists and says it cant find my artist/genre inside it. Am I missing something?

Also, can someone explain the difference between these two. 5b_lyrics and 1b_lyrics. V3 genres/lyrics have much more so I assume it's a newer version?

Jonovono avatar Mar 27 '21 22:03 Jonovono

You don't exactly need the same genre and artist to upsampe, change it to "unknown" and upsample then.

Randy-H0 avatar Apr 08 '21 11:04 Randy-H0