Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'total_sample_length_in_seconds' #273

Closed
tijmi opened this issue Mar 1, 2023 · 1 comment
Closed

KeyError: 'total_sample_length_in_seconds' #273

tijmi opened this issue Mar 1, 2023 · 1 comment

Comments

@tijmi
Copy link

tijmi commented Mar 1, 2023

when I try running python jukebox/sample.py --model=5b_lyrics --name=sample_5b --levels=3 --sample_length_in_seconds=20 I get the following:

Using cuda True
{'name': 'sample_5b', 'levels': 3, 'sample_length_in_seconds': 20}
Setting sample length to 881920 (i.e. 19.998185941043083 seconds) to be multiple of 128
Downloading from azure
Restored from C:\Users\thijm/.cache\jukebox/models/5b/vqvae.pth.tar
Loading vqvae in eval mode
Conditioning on 1 above level(s)
Checkpointing convs
Checkpointing convs
Loading artist IDs from C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\data/ids/v2_artist_ids.txt
Loading artist IDs from C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\data/ids/v2_genre_ids.txt
Level:0, Cond downsample:4, Raw to tokens:8, Sample length:65536
Downloading from azure
Restored from C:\Users\thijm/.cache\jukebox/models/5b/prior_level_0.pth.tar
Loading prior in eval mode
Conditioning on 1 above level(s)
Checkpointing convs
Checkpointing convs
Loading artist IDs from C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\data/ids/v2_artist_ids.txt
Loading artist IDs from C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\data/ids/v2_genre_ids.txt
Level:1, Cond downsample:4, Raw to tokens:32, Sample length:262144
Downloading from azure
Restored from C:\Users\thijm/.cache\jukebox/models/5b/prior_level_1.pth.tar
Loading prior in eval mode
Loading artist IDs from C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\data/ids/v2_artist_ids.txt
Loading artist IDs from C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\data/ids/v2_genre_ids.txt
Level:2, Cond downsample:None, Raw to tokens:128, Sample length:1048576
Converting to fp16 params
Downloading from azure
Restored from C:\Users\thijm/.cache\jukebox/models/5b_lyrics/prior_level_2.pth.tar
Loading prior in eval mode
Traceback (most recent call last):
  File "jukebox/sample.py", line 279, in <module>
    fire.Fire(run)
  File "C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\fire\core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\fire\core.py", line 366, in _Fire
    component, remaining_args)
  File "C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\fire\core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "jukebox/sample.py", line 276, in run
    save_samples(model, device, hps, sample_hps)
  File "jukebox/sample.py", line 185, in save_samples
    total_length = hps.total_sample_length_in_seconds * hps.sr
  File "C:\Users\thijm\miniconda3\envs\jukebox\lib\site-packages\jukebox\hparams.py", line 6, in __getattr__
    return self[attr]
KeyError: 'total_sample_length_in_seconds'

os: windows 11
gpu: rtx 3080
does anyone know how to solve this?

@tijmi
Copy link
Author

tijmi commented Mar 1, 2023

found it I didn't run the whole thing

@tijmi tijmi closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant