Comments (7)
You want to add an entry for restore_prior="path/to/checkpoint"
inside the corresponding hps dictionary, in your case "small_prior". For example, if your checkpoint is stored at "/root/jukebox/logs/small_prior/checkpoint_latest.pth.tar" and you're going to replace the top_level with "small_prior,
you want the entry in hparams.py to be:
small_prior = Hyperparams(
n_ctx=8192,
... other hps here ...
init_scale=0.7,
restore_prior="/root/jukebox/logs/small_prior/checkpoint_latest.pth.tar",
)
If you trained with labels/lyrics, make sure you also set these hps correctly:
y_bins, max_bow_genre_size
for the genre/artist information
min_duration, max_duration, t_bins
for the timing information
use_tokens, n_tokens, n_vocab
for the lyric information
For example, if you trained with
--hps=small_single_enc_dec_prior --labels --y_bins=(10,100) --max_bow_genre_size=1 --min_duration=60 --max_duration=600 --t_bins=64 --use_tokens=True --n_tokens=384 --n_vocab=79
then you want to set
small_single_enc_dec_prior = Hyperparams(
n_ctx=6144,
... other hps here ...
single_enc_dec=True,
labels=True,
y_bins=(10,100),
max_bow_genre_size=1,
.... other hps from training here...
n_tokens=384,
n_vocab=79,
)
so that when you restore the model for sampling they're correctly set.
from jukebox.
To piggyback tangentially, could you theoretically train locally and then load it into the colab environment and use it in a hosted set up? I can run the sampler locally.. but maybe i can train. Also - has anyone managed to apply the training command within with colab env?
from jukebox.
You want to add an entry for
restore_prior="path/to/checkpoint"
inside the corresponding hps dictionary, in your case "small_prior". For example, if your checkpoint is stored at "/root/jukebox/logs/small_prior/checkpoint_latest.pth.tar" and you're going to replace the top_level with "small_prior,
Thank you, I also had to manually set the param "labels" to False in at least one of the newly trained model parts:
small_prior = Hyperparams(
n_ctx=8192,
... other hps here ...
init_scale=0.7,
labels=False
restore_prior="/root/jukebox/logs/small_prior/checkpoint_latest.pth.tar",
)
from jukebox.
I trained the models with the standard commands in the readme file but I think the way the models are stored differs from how they are opened to use in make_models.py. I'm getting the following errors:
File "/home/user/Downloads/jukebox/jukebox/make_models.py", line 60, in restore
model.load_state_dict(checkpoint['model'])
File "/home/user/anaconda3/envs/jukebox/lib/python3.7/site-packages/torch/nn/modules/module.py", line 777, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for SimplePrior:
Unexpected key(s) in state_dict: "conditioner_blocks.0.cond.model.2.0.blocks.0.model.1.weight", "conditioner_blocks.0.cond.model.2.0.blocks.0.model.1.bias"
followed by some of these:
size mismatch for conditioner_blocks.0.x_emb.weight: copying a param with shape torch.Size([1024, 1024]) from checkpoint, the shape in current model is torch.Size([512, 1024]).
Is this something I can fix with loading the checkpoint files differently or are my models corrupted?
from jukebox.
It's hard to say without looking at the exact commands, but these usually mean that some flags used during training are missing at sampling time
from jukebox.
Hi @Superchaschper, were you able to sort out the issue with the unexpected key(s) in state_dict
?
from jukebox.
Hi @Superchaschper, were you able to sort out the issue with the unexpected key(s) in
state_dict
?
Hey @vigliensoni, No, I wasn't able to solve it and after getting the same errors in another attempt, I haven't tried it since.
from jukebox.
Related Issues (20)
- Installation Error,Packages not found HOT 7
- Fine-tuning the prior
- Hudba
- Error
- Just ignore
- Error right at the start of Colab HOT 1
- Changing output permissions
- stuck repeating the last few lines over and over and over and over again
- #0penA1 - #Fu11A1
- Encountering Errors with OpenAI Jukebox in Google Colab HOT 3
- Enhancement feature
- "Installation Error: jukebox package not found on conda channels (Windows 64-bit, Python 3.9.18)" "Unable to Install Jukebox from Conda (conda 23.11.0, Python 3.9.18)" HOT 1
- Syntax error on Colab
- My trackq HOT 1
- Rt
- Te amo
- AROA HOT 1
- Size mismatch
- Ya par tal
- Does anyone use the jukebox on their mac M2?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jukebox.