Manual ensemble Colab
If you want to combine ready result files from various models or different archs/AIs from external sources using Google Colab (if you can't do that locally), here’s a notebook for you to do that in cloud:
https://colab.research.google.com/drive/1_kG-rZ1rhQbFHxPqsmbzTXYtPVkNwsvo
(implementation of ZFTurbo code with drop-down menus plus manual weights and various ensemble algorithms by jarredou)
https://colab.research.google.com/github/jarredou/Music-Source-Separation-Training-Colab-Inference/blob/main/Manual_Ensemble_Colab.ipynb (dead)
https://colab.research.google.com/drive/1IC6Q1hLF55_tK6mhky0SWYKGVF9T5WsY (MK inference Colab with optional manual ensemble; here max FFT doesn’t work)
Once you mount GDrive, open file manager on the left, right click>copy path>paste in the first input field, then for the second file in the second field and so on and so forth. Then you can change type from max to e.g. avg or set weights manually - so to have the specified amount of one model in the result file (you could listen to the imported stems altogether in DAW to actually know what you’re doing).
Use 896 or “maybe” 1024 n_fft (explanations).
Possible fixes for the errors
- Don’t use spaces in output file name
- “AttributeError: module 'numpy' has no attribute 'float'
np.float was a deprecated alias for the builtin float.”
> “Try to rerun the install cell, this issue is because of a problem with numpy version
if it doesn't work you can force numpy upgrade by creating a new code cell with:
!pip install -U numpy
Sometimes install cell ask you to restart runtime because of numpy version too, if you don't say yes, you have to restart runtime by yourself to make it work”
“Try forcing librosa update too:
!pip install -U librosa
Have you tried to delete runtime and restart it from scratch ?
It's weird that these issues happen again, they were lots of these with old colab, but for recent ones, not much”
“If you face this error again, you can update the 2 libs at the same time with:
!pip install -U numpy librosa” - jarredou
- “ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 2) + inhomogeneous part.”
> In some specific cases (not always) converting your file to 32-bit float WAV might help.
Not sure if exactly the same length is necessary. But you can check it if above fails.
Also, lossy files will not align with lossless, and also files with different sample rate.
> For one person helped converting files to 320kbps mp3 for the ValueError
- ValueError: Homogenous shape
>? anything from the above
________
(Old not working Colab by ZFTurbo
https://colab.research.google.com/drive/1fmLUYC5P1hPcycI00F_TFYuh9-R2d_ap?usp=sharing (dead) https://cdn.discordapp.com/attachments/708912741980569691/1102706707207032833/Copy_of_Ensemble.ipynb (dead)
Last backup
https://drive.google.com/file/d/1k1jD_sOWKLish2T3_pZoYpeE1DGwGfG3/view?usp=sharing
We got two reports that it throws out some errors now, and could stop working due to some changes Google made into Colabs in 2025 or 2026).
_______