asigalov61 / SuperPiano

Absolutely amazing SOTA Google Colab (Jupyter) Notebooks for creating/training SOTA Music AI models and for generating music with Transformer technology (Google XLNet/Transformer-XL)
https://soundcloud.com/aleksandr-sigalov-61/sets/my-select-piano-works
Apache License 2.0
80 stars 14 forks source link

It not save midi files Super_Piano_3.ipynb #3

Closed Doken-Tokuyama closed 4 years ago

Doken-Tokuyama commented 4 years ago
Captura de pantalla 2020-08-27 a las 19 24 55 Captura de pantalla 2020-08-27 a las 19 17 09

Hi Alex,

I checked and the problem it's not fixed. Can you solve it? Thanks.

I can see 2 problems:

1.- Prepare directory sctructure and MIDI processor

@title Prepare directory sctructure and MIDI processor

!mv midi-neural-processor midi_processor %cd /content/MusicTransformer-Pytorch/

mv: cannot stat 'midi-neural-processor': No such file or directory /content/MusicTransformer-Pytorch

2.- Generate, Plot, Graph, Save, Download, and Render the resulting output Output:

========================= midi_root: ./dataset/e_piano/ output_dir: output primer_file: /content/MusicTransformer-Pytorch/dataset/maestro-v2.0.0/2018/MIDI-Unprocessed_Chamber1_MID--AUDIO_07_R3_2018_wav--2.midi force_cpu: False

target_seq_length: 2048 num_prime: 512 model_weights: /content/MusicTransformer-Pytorch/rpr/results/best_acc_weights.pickle beam: 0

rpr: True max_sequence: 2048 n_layers: 6 num_heads: 8 d_model: 512

dim_feedforward: 1024

Traceback (most recent call last): File "generate.py", line 93, in main() File "generate.py", line 53, in main raw_mid = encode_midi(f) NameError: name 'encode_midi' is not defined Successfully exported the output to output folder. To primer.mid and rand.mid

FileNotFoundError Traceback (most recent call last)

in () 17 18 from google.colab import files ---> 19 files.download('/content/MusicTransformer-Pytorch/output/rand.mid') 20 files.download('/content/MusicTransformer-Pytorch/output/primer.mid') 21 /usr/local/lib/python3.6/dist-packages/google/colab/files.py in download(filename) 141 raise OSError(msg) 142 else: --> 143 raise FileNotFoundError(msg) # pylint: disable=undefined-variable 144 145 comm_manager = _IPython.get_ipython().kernel.comm_manager FileNotFoundError: Cannot find file: /content/MusicTransformer-Pytorch/output/rand.mid _Originally posted by @Doken-Tokuyama in https://github.com/asigalov61/SuperPiano/issues/2#issuecomment-682086189_
asigalov61 commented 4 years ago

Hmm...It works fine now on my end. Can you wait a bit and try again, please? I had to update the repo too so maybe it is still loading.

Also, as I suggested, the factory reset your copy and try it again because it should work.

Specifically, the problem is the generate.py file due to wrong imports. I am attaching the latest working version so that you can replace it manually if it still does not work for you.

I just tested it and it works fine so most likely as I said its the repo cache issues. Just gotta wait basically :)

Let me know please, in a few hours how it goes and if it still does not work.

generate.zip Thank you.

Doken-Tokuyama commented 4 years ago

Hi Alex,

Not it works perfectly, Thanks very much.

asigalov61 commented 4 years ago

You are welcome :)