-
Notifications
You must be signed in to change notification settings - Fork 423
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
nsynth generate.py not work #63
Comments
Hey @ruiguo-bio, I believe this is an issue with the "instruments" setting. The list of lists should be made square with the instruments in the corners you want them in. In your case it should look something like this:
|
Could you try to running it one more time with the square instruments list after you've removed your working_dir? Could be that some older files leftover from runs with incorrect settings are messing something up. I'm not quite sure about everything that you've printed out inside the loops but I know that grid_size should come out to 0.9999... if everything is working correctly. I've just tried to generate a similar single grid and it is generating it correctly for me with the following settings and a clean working_dir:
Note: I've used slightly different pitches and final_length corresponding to my input wav files. |
I want to one instrument at a corner, in total 4 instruments, and not a multi-grid. I try two configs, but both failed. I add some print in generate.py to debug.
I’ve tried that before, and I add some print in the generate.py. Here is the result for the two different configs:
First config:
{
"instruments": [["single"],
["chorus"],
["bird1"],
["bird5"]],
}
Interpolating embeddings between instruments at each pitch...
instrument grid = [['single'], ['chorus'], ['bird1'], ['bird5']]
grid_size = -1e-13
x=[[0.]]
y=[[0.]]
x=[0.]
y=[0.]
xy_grid=<zip object at 0x7f82c8ecaec8>
uv=(0, 0)
Traceback (most recent call last):
File "generate.py", line 289, in
interpolate_embeddings()
File "generate.py", line 131, in interpolate_embeddings
sub_grid, weights = get_instruments(xy), get_weights(xy)
File "generate.py", line 114, in get_instruments
return [instrument_grid[uv[0]][uv[1]],instrument_grid[uv[0]][uv[1]+1],
IndexError: list index out of range
Second config:
{
"instruments": [["single","chorus","bird1","bird5"]],
"checkpoint_dir":"wavenet-ckpt",
"pitches": [36, 40, 44, 48, 52, 56],
"resolution": 9,
"final_length": 64000,
"gpus": 1,
"batch_size_embeddings": 32,
"batch_size_generate": 256,
"name": "bird1"
}
Interpolating embeddings between instruments at each pitch...
instrument grid = [['single', 'chorus', 'bird1', 'bird5']]
grid_size = 2.9999999999999
x=[[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]
[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
3. ]]
y=[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. ]
[0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
0.125]
[0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25
0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25
0.25 ]
[0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375
0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375
0.375]
[0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
0.5 ]
[0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625
0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625
0.625]
[0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75
0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75
0.75 ]
[0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875
0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875
0.875]
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.
[1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125
1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125
1.125]
[1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25
1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25
1.25 ]
[1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375
1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375
1.375]
[1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
1.5 ]
[1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625
1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625
1.625]
[1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75
1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75
1.75 ]
[1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875
1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875
1.875]
[2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2. 2.
[2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125
2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125
2.125]
[2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25
2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25
2.25 ]
[2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375
2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375
2.375]
[2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5
2.5 ]
[2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625
2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625
2.625]
[2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75
2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75
2.75 ]
[2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875
2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875
2.875]
[3. 3. 3. 3. 3. 3. 3. 3. 3. 3. 3. 3.
x=[0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75
2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125
1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625
2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.
1.125 1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5
2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875
2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75
0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25
2.375 2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625
0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125
2.25 2.375 2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5
0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2.
2.125 2.25 2.375 2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375
0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875
0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75
1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875 3. 0. 0.125
0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625
1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875 3. 0.
0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5
1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875 3.
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75
2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125
1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625
2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.
1.125 1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5
2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75 0.875
2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625 0.75
0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125 2.25
2.375 2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5 0.625
0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2. 2.125
2.25 2.375 2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375 0.5
0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875 2.
2.125 2.25 2.375 2.5 2.625 2.75 2.875 3. 0. 0.125 0.25 0.375
0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75 1.875
0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625 1.75
1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875 3. 0. 0.125
0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5 1.625
1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875 3. 0.
0.125 0.25 0.375 0.5 0.625 0.75 0.875 1. 1.125 1.25 1.375 1.5
1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875 3.
1.5 1.625 1.75 1.875 2. 2.125 2.25 2.375 2.5 2.625 2.75 2.875
y=[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
0.125 0.125 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25
0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25
0.25 0.25 0.25 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375
0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375 0.375
0.375 0.375 0.375 0.375 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
0.5 0.5 0.5 0.5 0.5 0.625 0.625 0.625 0.625 0.625 0.625 0.625
0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625 0.625
0.625 0.625 0.625 0.625 0.625 0.625 0.75 0.75 0.75 0.75 0.75 0.75
0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75
0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.875 0.875 0.875 0.875 0.875
0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875
0.875 0.875 0.875 0.875 0.875 0.875 0.875 0.875 1. 1. 1. 1.
1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125
1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.125 1.25 1.25
1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25
1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.375
1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375
1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375 1.375
1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
1.5 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625
1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625 1.625
1.625 1.625 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75
1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75
1.75 1.75 1.75 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875
1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875 1.875
1.875 1.875 1.875 1.875 2. 2. 2. 2. 2. 2. 2. 2.
2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125 2.125
2.125 2.125 2.125 2.125 2.125 2.125 2.25 2.25 2.25 2.25 2.25 2.25
2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25
2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.375 2.375 2.375 2.375 2.375
2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375
2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.375 2.5 2.5 2.5 2.5
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.625 2.625 2.625
2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625
2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.625 2.75 2.75
2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75
2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.75 2.875
2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875
2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875 2.875
xy_grid=<zip object at 0x7f77f1551f48>
uv=(0, 0)
Traceback (most recent call last):
File "generate.py", line 289, in
interpolate_embeddings()
File "generate.py", line 131, in interpolate_embeddings
sub_grid, weights = get_instruments(xy), get_weights(xy)
File "generate.py", line 115, in get_instruments
instrument_grid[uv[0]+1][uv[1]],instrument_grid[uv[0]+1][uv[1]+1]]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: