Closed CerealWeb1109 closed 4 weeks ago
Okay, the problem is only when I use the filename argument, but i still don't know why thats the case. If i use other arguments like !demucs {segment_file} --two-stems=vocals it works fine. Probably something to do with the predefined variables messing up with my variable
In IPython (and Jupyter Notebook), inputs starting with exclamation mark (!
) will be processed like this:
eval
for everything inside bracesSome examples:
In [ ]: # Something could be evaluated
...: !echo {123}
123
In [ ]: # Defined variables
...: a = "Hello"
...: !echo {a}
Hello
In [ ]: # Undefined variables
...: !echo {b}
{b}
In [ ]: # Defined and undefined variables in the same command
...: !echo {a} {world}
{a} {world}
In [ ]: # The we can output something with braces and evaluate defined variables at the same time
...: !echo {a} {{world}}
Hello {world}
@CarlGao4 I see. Using double curly brackets worked for me: segment_file = 'audio.mp3' !demucs {segmentfile} --out /content/stems/ --filename '{{track}}{{stem}}.{{ext}}' the outputs were saved as /content/stems/audio_bass.wav, /content/stems/audio_vocals.wav...
🐛 Bug Report
When specifying input file for demucs using variable "{segment_file}", get response: Selected model is a bag of 1 models. You will see that many progress bars per track. Separated tracks will be stored in /content/separated/htdemucs File {segment_file} does not exist. If the path contains spaces, please try again after surrounding the entire path with quotes "". I tried different ways, without double quotations: segment_file = '/content/audio.mp3' !demucs {segmentfile} --filename "stems/{track}{stem}.{ext}" still get the same error
To Reproduce
Expected behavior
Successfull stem seperation
Actual Behavior
Got the following output: Selected model is a bag of 1 models. You will see that many progress bars per track. Separated tracks will be stored in /content/separated/htdemucs File {segment_file} does not exist. If the path contains spaces, please try again after surrounding the entire path with quotes "".
Your Environment
Google Colab Runtime OS: Linux-6.1.85+-x86_64-with-glibc2.35 Python version: 3.10.12 Demucs installation: Python package, installed using !pip install demucs. Demucs version: 4.0.1