Issue 1: pip install/module not found

Basically, I am trying to set up the music transformer model.

When we run

pip install -r requirements.txt

We encounter the error

CleanShot 2025-06-12 at 18.20.50@2x

But we just ignore.

Then, when we run this command

python extract_mid.py

We encountered this error

CleanShot 2025-06-12 at 18.23.35@2x

And if you try to solve it with pip install mido, you may not solve it.

This is because the pip you are using is not the pip in your virtual environment. Actually, if you use venv, you don’t have pip, instead, you have pip3.

So, I would recommend you redo all your pip commands above with pip3, since in this way, your package will be in your virtual environment.

Also, to ensure you are using the correct command, use which pip/pip3 to check if you are using the right one.

Issue 2: Where to put POP909-Dataset

You just put it anywhere you want, since we do not use it in the inference test.

Issue 3: How to download the ckpt file from the Google Drive

  1. install tools (in the Python virtual environment):
pip install gdown
  1. use gdown and --id symbol to download the file:
gdown --id 1mX4I8EsyKN5xjYqfDHhBS6ukGDN7kosY

The id here is what https://drive.google.com/file/d/....../view the ...... represents for.

Like in our case, the link is https://drive.google.com/file/d/1mX4I8EsyKN5xjYqfDHhBS6ukGDN7kosY/view, the id is 1mX4I8EsyKN5xjYqfDHhBS6ukGDN7kosY.

Important note: the new link points to the Hugging Face instead of Google Drive, so this is not an issue for the project now. Still, in the future, you may need to download a file from Google Drive, so I just keep it here.

Issue 4: No module named ‘preprocess_large_midi_dataset_private’

You can find preprocess_large_midi_dataset.py but you cannot find preprocess_large_midi_dataset_private.py.

If you go into the .gitignore, you’ll find out that preprocess_large_midi_dataset_private.py is actually in the .gitignore.

What I do is copy the preprocess_large_midi_dataset.py and name it as preprocess_large_midi_dataset_private.py. Also, you can change the code.

Issue 5: How to download a file from Hugging Face

Juanshu fixed the original Issue 5, now the link to the real ckpt file. So now, the issue has changed to how to download a file from Hugging Face to the Linux server directly.

  1. Log in to your Hugging Face account from your terminal.
  2. Click “Copy download link”
  3. Directly using the wget command

Issue 6: No such file or directory: ‘/home/coder/laopo/StreamMUSE/input/mel’

Very simple, you just change the pyth to your directory:

CleanShot 2025-06-12 at 21.52.16@2x

The code is in m2a_transformer_inference.py

Inference Output

It should be like this if everything is correct:

CleanShot 2025-06-12 at 22.03.18@2x

And you should see:

CleanShot 2025-06-12 at 22.04.37@2x