-
Notifications
You must be signed in to change notification settings - Fork 33
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
Generation for arbitrary length #2
Comments
Or maybe you could show some other possibilities to generate output with an arbitrary length? I found in the text of paper that at inference step we could generate output of arbitrary length, but everything what i tried to change doesnt work (max events, max target bars). Thank you in advance! |
Hi Sasha, I think you shouldn't change the input length (1280) in the input file if you are using our pretrained checkpoint, since Transformers are very likely to fail if you feed input sequences that are longer than those seen during training. You may just leave the length at 1280, and Hope this helps! |
Thank you for the answer, but what to do if i want to generate the output with the same length as was my input file? For ex. i take as the input 3 minute midi file and want to get as output 3 minute file but with changed polyphony and rhythm?) |
I mean my question is how to define the length of the sequence that will be generated? Thank you in advance! |
Ok, I think now I know where it goes wrong. I will update the config file to fix this. For now, you may try the following as a workaround:
Let me know if these work. |
Thank you!I've tried to do what you suggest to change max_bars and dec_seqlen in the config and On line 284, generate.py, set max_input_len=1024, but still have the same error: [FATAL] model stuck, exiting ... If you will find another solution. please. let me know!) |
Hello, I'm very sorry for disturbing you again but am i correctly understand that you will correct the config that it would be possible to define the length of sequence that will be generated? |
Sure. Will look into this problem in the coming days. |
Hi Sasha, I've pushed the new config, and it worked well on my side in generating long pieces. Regarding your comments, it's not possible to "define" the length of generated sequences since it's part of the model's freedom. All we can do is to restrict the sequence length fed to the model. Also, if the model fails within the sequence length it was trained on (1,280), I think most likely there is something wrong with your input, either:
Above are the points you may check. Hope this helps! |
Hello, Thank you! |
Sorry, maybe i don't exactly understand what do you mean, Because I see on your demos that you generated full song with modifications and the generated length for both is almost the same and are 4 min 1 sec and 4 min 3 sec? Do you use the model trained on sequences with length 1280? Sincerely yours, |
Actually, the length of the generated sequence is not completely tied to the wall-clock duration of a song. Higher attribute classes will lead to more notes played in the same amount of time, hence a longer sequence. You may think of |
So in other words, it won't handle properly a 4 minutes "complex" piano score (with "a lot" of notes). Could it be a solution to reset the time indices once it exceeds 1280, so the trained-model continue from where it left off? |
@Chopders Actually, the current inference script will take care of these "complex" cases. Thanks! |
Hello, do you know how to train the model with your own data? Remi in folder pickles_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_ How to get pieces.pkl? Thanks! |
Hello, do you know how to train the model with your own data? How to get remi_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_pieces.pkl in folder pickles? Thanks! |
Hi!What is Remi_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_ pieces.pkl in folder pickles? How to get them? Thanks |
Hi!What is Remi_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_ pieces.pkl in folder pickles? How to get them? Thanks |
Hello,
Maybe you could help me with my problem)When i run your generation.py script with defaults parameters it generates correctly 16 bars output for any midi file. But when i tried to change the length from 1280 to length of my midi-file (11134) and 16 bars to 76 bars the model output the mistake. Do you know how to fix it? Thank you in advance!
[FATAL] model stuck, exiting ...
Traceback (most recent call last):
File "generate.py", line 299, in
temperature=config['generate']['temperature'],
ValueError: too many values to unpack (expected 3)
The text was updated successfully, but these errors were encountered: