-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow convert tracks to STEMS using htdemucs and MP4Box + install dependencies on debian #15891
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
base: 2.6
Are you sure you want to change the base?
Conversation
JoergAtGithub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but this PR does not take into account the Change Requests from #15881, which were to use mixxxdj/demucs and onnxruntime.
tools/debian_buildenv.sh
Outdated
| python3-full | ||
| python3-venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing Python is an unwanted dependency! Please implement your code in C++ following the Mixxx coding guidelines!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtualenv is needed to install demucs, I install it using pip. For python3-full I give you reason that is not needed, but python3-venv it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use our own https://github.com/mixxxdj/demucs model, export it to ONNX format and run it in onnxruntime. Python as runtime dependency is not acceptable in any flavor!
|
Thank you for all the work. I hope I will find time for testing soon. While I agree with @JoergAtGithub that this is not the final version that can be deployed to other users it contains nice GUI work that is reusable. Mabe we can move the heavy dependencies out of this PR so that it is optional for the users to install it or not? We will see, let's work on this. |
|
The git history is not yet in a good shape. But it can be fixed by rebasing. Here the first task: d563880 is a leftover from you first PR ans should be removed. There are to options: Rebase interactive. Git will open the default editor, likely vim (a usability challenge, do you know vim ... can be changed) or this works like `git rebase onto=new_base old_base Than |
|
Now also contains the unrelated changes regarding the Ubuntu font. |
This commit shoud be inside stemgen branch. Is related to this PR. |
|
@JoergAtGithub @acolombier I'm looking about ONNX integration. I see that the solution is to install the libonnxruntime-dev library, clone mixxx/demucs repo and execute script scripts/convert-pth-to-onnx to generate the htdemucs.onnx file. Does it is correct? Then, my question is, to execute this script you need python installed. Also to meet python script dependencies you have to install them (better in virtualenv than in system) and also we return to same point. I cloned the project and tried to execute convert-pth-to-onnx.py with no success (I used requirements.txt of the project). Which is the right torch version to could execute the script? Searching I see this article Do you have htdemucs.onnx file? Do you plan to have it uploaded somewhere to avoid the installer has to execute the script? I think it would be easier. I understand that the process will be: |
No need to do that. The model is available here, and no change was brought to it since AFAIK (only devex improvement, testing and benchmarking)
Yes, it is in the release linked above - htdemucs.onnx
It's correct up to So technically, it will be |
…eldelafosse/stemgen + install stemgen in debian
…ndency) - Replace Python script (stems_create_container.py) with native C++ implementation - Implement createStemManifest() to generate STEM metadata JSON - Implement findMP4Box() to locate MP4Box executable in system - Implement addStemMetadata() to add STEM metadata atom using MP4Box - Create multi-track M4A with ffmpeg directly (mixdown + 4 stems) - Remove dependency on Python virtual environment for STEM container creation
…u issue mixxxdj#15816" This reverts commit 602a365.
…tory - Check if fonts-ubuntu is available - Ask user to enable non-free repository if needed - Install fonts-ubuntu conditionally - Fix syntax errors (2>%1 → 2>/dev/null) Fixes mixxxdj#15816
- Ask user about stem conversion support - Setup Python virtual environment - Install demucs - Compile and install GPAC/MP4Box Related to mixxxdj#15307
|
Well guys, it made me sweat but I finally managed to get htdemucs working through ONNX. I reviewed the part about making it compatible with all operating systems, I've already seen how, but I got stuck because when doing it I had to touch some configuration and another library (libtag or something) broke, but for now this option has allowed me to move forward to test the conversion and complete the entire process. Now that this is working, I'll dive into implementing conversion options. There's a Python library called ONNX that allows me to interact with the model (and I can test it without compiling each time). Things I want to try are: offering the option to choose between different available models (for example, there's an experimental one that allows separating into 6 stems), as well as audio compression options (or not). I had it partially set up, but due to the other library issue I had to revert to HEAD and go step by step. One question: do the stem files always have to be .stem.m4a? An other: what shall I do with temp created files? maintain them or delete? Thanks and good night! Hard work, but getting fun! :) |
|
This fits much better now! Thank you! Regarding options:
|
|
The CI builds fail. It appears that the stem separation is not properly disabled when onnxruntime is not installed. |
Nice!. |
… when ONNX is not available
Done! |
Done! |
|
Please fix the CI build fails. |
|
CI is still failing for all platforms |
|
I need help with this 5817757 I'm not able to get compiling work when libonnxruntime is not installed. I have revised all STEM_CONVERSION protecting the functions, but I don't know what is happening. Thanks you much! |
|
Let's try now! crossing fingers... |
|
This fixes the strange behaviour that I found before last commits. Now I'm going to do a commit for code style fits using pre-commit. |
|
The pre-commit check is failing. The best way to fix pre-commit issues is to install pre-commit locally on your system, as described here: https://github.com/mixxxdj/mixxx/wiki/Using-Git#set-up-automatic-code-checking |
|
Yes, I'm using pre-commit locally, it passes but don't change the files. I'll try patch method. |
|
Done: 1870 git apply /home/laura/Baixades/pre-commit.patch |
|
In work's computer I did the same again right now (here I don't have pre-commit installed): |
|
Hurrahhh!!! |

Description
Allow convert tracks to STEMS using htdemucs and MP4Box + install dependencies on debian
Related to: Closes #15881
Changes