Code Monkey home page Code Monkey logo

Comments (3)

prafullasd avatar prafullasd commented on August 24, 2024 1

Was the new top-level prior trained without labels? If it was trained with no labels, you want to pass labels=False in the small_prior hps too, as it seems the model is trying to make a labeller object when it shouldn't.

Note you'll still need to pass an (artist, genre) label while using the upsampling levels, though it should be fine to use (0,0) ie (unknown, unknown) for those as the upsampling doesn't depend too strongly on the labels.

from jukebox.

prafullasd avatar prafullasd commented on August 24, 2024

The small_prior only provides a base set of values to start from, you want to add specific values for labels, t_ranges etc for the model you trained when you load it. Might be easier to get them directly from the saved checkpoint, since that saves the hps too.

from jukebox.

gogobd avatar gogobd commented on August 24, 2024

I was trying the same, added "labels=False" in params.py for small_vqvae, small_prior and small_upsampler but got stuck:

/jukebox# python jukebox/sample.py --model=my_model --name=sample_my_model --levels=3 --sample_length_in_seconds=20 --tot
al_sample_length_in_seconds=180 --sr=44100 --n_samples=6 --hop_fraction=0.5,0.5,0.125
Using cuda True
{'name': 'sample_my_model', 'levels': 3, 'sample_length_in_seconds': 20, 'total_sample_length_in_seconds': 180, 'sr': 44100, 'n_sample
s': 6, 'hop_fraction': (0.5, 0.5, 0.125)}
Setting sample length to 440832 (i.e. 19.99238095238095 seconds) to be multiple of 256
0: Loading vqvae in eval mode
Conditioning on 1 above level(s)
Checkpointing convs
Level:0, Cond downsample:2, Raw to tokens:2, Sample length:16384
0: Loading prior in eval mode
Conditioning on 1 above level(s)
Level:0, Cond downsample:2, Raw to tokens:2, Sample length:16384
0: Loading prior in eval mode
Traceback (most recent call last):
  File "jukebox/sample.py", line 275, in <module>
    fire.Fire(run)
  File "/opt/miniconda/lib/python3.7/site-packages/fire/core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "/opt/miniconda/lib/python3.7/site-packages/fire/core.py", line 366, in _Fire
    component, remaining_args)
  File "/opt/miniconda/lib/python3.7/site-packages/fire/core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "jukebox/sample.py", line 272, in run
    save_samples(model, device, hps, sample_hps)
  File "jukebox/sample.py", line 223, in save_samples
    labels = [prior.labeller.get_batch_labels(metas, 'cuda') for prior in priors ]
  File "jukebox/sample.py", line 223, in <listcomp>
    labels = [prior.labeller.get_batch_labels(metas, 'cuda') for prior in priors ]
  File "/opt/miniconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in __getattr__
    type(self).__name__, name))
AttributeError: 'SimplePrior' object has no attribute 'labeller'
/jukebox# 

How can I avoid this?

from jukebox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.