Giter VIP home page Giter VIP logo

demucs's Introduction

Demucs Music Source Separation

Support Ukraine tests badge linter badge

Important: As I am no longer working at Meta, this repository is not maintained anymore. I've created a fork at github.com/adefossez/demucs. Note that this project is not actively maintained anymore and only important bug fixes will be processed on the new repo. Please do not open issues for feature request or if Demucs doesn't work perfectly for your use case :)

This is the 4th release of Demucs (v4), featuring Hybrid Transformer based source separation. For the classic Hybrid Demucs (v3): Go this commit. If you are experiencing issues and want the old Demucs back, please file an issue, and then you can get back to Demucs v3 with git checkout v3. You can also go Demucs v2.

Demucs is a state-of-the-art music source separation model, currently capable of separating drums, bass, and vocals from the rest of the accompaniment. Demucs is based on a U-Net convolutional architecture inspired by Wave-U-Net. The v4 version features Hybrid Transformer Demucs, a hybrid spectrogram/waveform separation model using Transformers. It is based on Hybrid Demucs (also provided in this repo), with the innermost layers replaced by a cross-domain Transformer Encoder. This Transformer uses self-attention within each domain, and cross-attention across domains. The model achieves a SDR of 9.00 dB on the MUSDB HQ test set. Moreover, when using sparse attention kernels to extend its receptive field and per source fine-tuning, we achieve state-of-the-art 9.20 dB of SDR.

Samples are available on our sample page. Checkout our paper for more information. It has been trained on the MUSDB HQ dataset + an extra training dataset of 800 songs. This model separates drums, bass and vocals and other stems for any song.

As Hybrid Transformer Demucs is brand new, it is not activated by default, you can activate it in the usual commands described hereafter with -n htdemucs_ft. The single, non fine-tuned model is provided as -n htdemucs, and the retrained baseline as -n hdemucs_mmi. The Sparse Hybrid Transformer model decribed in our paper is not provided as its requires custom CUDA code that is not ready for release yet. We are also releasing an experimental 6 sources model, that adds a guitar and piano source. Quick testing seems to show okay quality for guitar, but a lot of bleeding and artifacts for the piano source.

Schema representing the structure of Hybrid Transformer Demucs,
    with a dual U-Net structure, one branch for the temporal domain,
    and one branch for the spectral domain. There is a cross-domain Transformer between the Encoders and Decoders.

Important news if you are already using Demucs

See the release notes for more details.

  • 22/02/2023: added support for the SDX 2023 Challenge, see the dedicated doc page
  • 07/12/2022: Demucs v4 now on PyPI. htdemucs model now used by default. Also releasing a 6 sources models (adding guitar and piano, although the latter doesn't work so well at the moment).
  • 16/11/2022: Added the new Hybrid Transformer Demucs v4 models. Adding support for the torchaudio implementation of HDemucs.
  • 30/08/2022: added reproducibility and ablation grids, along with an updated version of the paper.
  • 17/08/2022: Releasing v3.0.5: Set split segment length to reduce memory. Compatible with pyTorch 1.12.
  • 24/02/2022: Releasing v3.0.4: split into two stems (i.e. karaoke mode). Export as float32 or int24.
  • 17/12/2021: Releasing v3.0.3: bug fixes (thanks @keunwoochoi), memory drastically reduced on GPU (thanks @famzah) and new multi-core evaluation on CPU (-j flag).
  • 12/11/2021: Releasing Demucs v3 with hybrid domain separation. Strong improvements on all sources. This is the model that won Sony MDX challenge.
  • 11/05/2021: Adding support for MusDB-HQ and arbitrary wav set, for the MDX challenge. For more information on joining the challenge with Demucs see the Demucs MDX instructions

Comparison with other models

We provide hereafter a summary of the different metrics presented in the paper. You can also compare Hybrid Demucs (v3), KUIELAB-MDX-Net, Spleeter, Open-Unmix, Demucs (v1), and Conv-Tasnet on one of my favorite songs on my soundcloud playlist.

Comparison of accuracy

Overall SDR is the mean of the SDR for each of the 4 sources, MOS Quality is a rating from 1 to 5 of the naturalness and absence of artifacts given by human listeners (5 = no artifacts), MOS Contamination is a rating from 1 to 5 with 5 being zero contamination by other sources. We refer the reader to our paper, for more details.

Model Domain Extra data? Overall SDR MOS Quality MOS Contamination
Wave-U-Net waveform no 3.2 - -
Open-Unmix spectrogram no 5.3 - -
D3Net spectrogram no 6.0 - -
Conv-Tasnet waveform no 5.7 -
Demucs (v2) waveform no 6.3 2.37 2.36
ResUNetDecouple+ spectrogram no 6.7 - -
KUIELAB-MDX-Net hybrid no 7.5 2.86 2.55
Band-Spit RNN spectrogram no 8.2 - -
Hybrid Demucs (v3) hybrid no 7.7 2.83 3.04
MMDenseLSTM spectrogram 804 songs 6.0 - -
D3Net spectrogram 1.5k songs 6.7 - -
Spleeter spectrogram 25k songs 5.9 - -
Band-Spit RNN spectrogram 1.7k (mixes only) 9.0 - -
HT Demucs f.t. (v4) hybrid 800 songs 9.0 - -

Requirements

You will need at least Python 3.8. See requirements_minimal.txt for requirements for separation only, and environment-[cpu|cuda].yml (or requirements.txt) if you want to train a new model.

For Windows users

Everytime you see python3, replace it with python.exe. You should always run commands from the Anaconda console.

For musicians

If you just want to use Demucs to separate tracks, you can install it with

python3 -m pip install -U demucs

For bleeding edge versions, you can install directly from this repo using

python3 -m pip install -U git+https://github.com/facebookresearch/demucs#egg=demucs

Advanced OS support are provided on the following page, you must read the page for your OS before posting an issues:

For machine learning scientists

If you have anaconda installed, you can run from the root of this repository:

conda env update -f environment-cpu.yml  # if you don't have GPUs
conda env update -f environment-cuda.yml # if you have GPUs
conda activate demucs
pip install -e .

This will create a demucs environment with all the dependencies installed.

You will also need to install soundstretch/soundtouch: on macOS you can do brew install sound-touch, and on Ubuntu sudo apt-get install soundstretch. This is used for the pitch/tempo augmentation.

Running in Docker

Thanks to @xserrat, there is now a Docker image definition ready for using Demucs. This can ensure all libraries are correctly installed without interfering with the host OS. See his repo Docker Facebook Demucs for more information.

Running from Colab

I made a Colab to easily separate track with Demucs. Note that transfer speeds with Colab are a bit slow for large media files, but it will allow you to use Demucs without installing anything.

Demucs on Google Colab

Web Demo

Integrated to Hugging Face Spaces with Gradio. See demo: Hugging Face Spaces

Graphical Interface

@CarlGao4 has released a GUI for Demucs: CarlGao4/Demucs-Gui. Downloads for Windows and macOS is available here. Use FossHub mirror to speed up your download.

@Anjok07 is providing a self contained GUI in UVR (Ultimate Vocal Remover) that supports Demucs.

Other providers

Audiostrip is providing free online separation with Demucs on their website https://audiostrip.co.uk/.

MVSep also provides free online separation, select Demucs3 model B for the best quality.

Neutone provides a realtime Demucs model in their free VST/AU plugin that can be used in your favorite DAW.

Separating tracks

In order to try Demucs, you can just run from any folder (as long as you properly installed it)

demucs PATH_TO_AUDIO_FILE_1 [PATH_TO_AUDIO_FILE_2 ...]   # for Demucs
# If you used `pip install --user` you might need to replace demucs with python3 -m demucs
python3 -m demucs --mp3 --mp3-bitrate BITRATE PATH_TO_AUDIO_FILE_1  # output files saved as MP3
        # use --mp3-preset to change encoder preset, 2 for best quality, 7 for fastest
# If your filename contain spaces don't forget to quote it !!!
demucs "my music/my favorite track.mp3"
# You can select different models with `-n` mdx_q is the quantized model, smaller but maybe a bit less accurate.
demucs -n mdx_q myfile.mp3
# If you only want to separate vocals out of an audio, use `--two-stems=vocals` (You can also set to drums or bass)
demucs --two-stems=vocals myfile.mp3

If you have a GPU, but you run out of memory, please use --segment SEGMENT to reduce length of each split. SEGMENT should be changed to a integer describing the length of each segment in seconds. A segment length of at least 10 is recommended (the bigger the number is, the more memory is required, but quality may increase). Note that the Hybrid Transformer models only support a maximum segment length of 7.8 seconds. Creating an environment variable PYTORCH_NO_CUDA_MEMORY_CACHING=1 is also helpful. If this still does not help, please add -d cpu to the command line. See the section hereafter for more details on the memory requirements for GPU acceleration.

Separated tracks are stored in the separated/MODEL_NAME/TRACK_NAME folder. There you will find four stereo wav files sampled at 44.1 kHz: drums.wav, bass.wav, other.wav, vocals.wav (or .mp3 if you used the --mp3 option).

All audio formats supported by torchaudio can be processed (i.e. wav, mp3, flac, ogg/vorbis on Linux/macOS, etc.). On Windows, torchaudio has limited support, so we rely on ffmpeg, which should support pretty much anything. Audio is resampled on the fly if necessary. The output will be a wav file encoded as int16. You can save as float32 wav files with --float32, or 24 bits integer wav with --int24. You can pass --mp3 to save as mp3 instead, and set the bitrate (in kbps) with --mp3-bitrate (default is 320).

It can happen that the output would need clipping, in particular due to some separation artifacts. Demucs will automatically rescale each output stem so as to avoid clipping. This can however break the relative volume between stems. If instead you prefer hard clipping, pass --clip-mode clamp. You can also try to reduce the volume of the input mixture before feeding it to Demucs.

Other pre-trained models can be selected with the -n flag. The list of pre-trained models is:

  • htdemucs: first version of Hybrid Transformer Demucs. Trained on MusDB + 800 songs. Default model.
  • htdemucs_ft: fine-tuned version of htdemucs, separation will take 4 times more time but might be a bit better. Same training set as htdemucs.
  • htdemucs_6s: 6 sources version of htdemucs, with piano and guitar being added as sources. Note that the piano source is not working great at the moment.
  • hdemucs_mmi: Hybrid Demucs v3, retrained on MusDB + 800 songs.
  • mdx: trained only on MusDB HQ, winning model on track A at the MDX challenge.
  • mdx_extra: trained with extra training data (including MusDB test set), ranked 2nd on the track B of the MDX challenge.
  • mdx_q, mdx_extra_q: quantized version of the previous models. Smaller download and storage but quality can be slightly worse.
  • SIG: where SIG is a single model from the model zoo.

The --two-stems=vocals option allows separating vocals from the rest of the accompaniment (i.e., karaoke mode). vocals can be changed to any source in the selected model. This will mix the files after separating the mix fully, so this won't be faster or use less memory.

The --shifts=SHIFTS performs multiple predictions with random shifts (a.k.a the shift trick) of the input and average them. This makes prediction SHIFTS times slower. Don't use it unless you have a GPU.

The --overlap option controls the amount of overlap between prediction windows. Default is 0.25 (i.e. 25%) which is probably fine. It can probably be reduced to 0.1 to improve a bit speed.

The -j flag allow to specify a number of parallel jobs (e.g. demucs -j 2 myfile.mp3). This will multiply by the same amount the RAM used so be careful!

Memory requirements for GPU acceleration

If you want to use GPU acceleration, you will need at least 3GB of RAM on your GPU for demucs. However, about 7GB of RAM will be required if you use the default arguments. Add --segment SEGMENT to change size of each split. If you only have 3GB memory, set SEGMENT to 8 (though quality may be worse if this argument is too small). Creating an environment variable PYTORCH_NO_CUDA_MEMORY_CACHING=1 can help users with even smaller RAM such as 2GB (I separated a track that is 4 minutes but only 1.5GB is used), but this would make the separation slower.

If you do not have enough memory on your GPU, simply add -d cpu to the command line to use the CPU. With Demucs, processing time should be roughly equal to 1.5 times the duration of the track.

Calling from another Python program

The main function provides an opt parameter as a simple API. You can just pass the parsed command line as this parameter:

# Assume that your command is `demucs --mp3 --two-stems vocals -n mdx_extra "track with space.mp3"`
# The following codes are same as the command above:
import demucs.separate
demucs.separate.main(["--mp3", "--two-stems", "vocals", "-n", "mdx_extra", "track with space.mp3"])

# Or like this
import demucs.separate
import shlex
demucs.separate.main(shlex.split('--mp3 --two-stems vocals -n mdx_extra "track with space.mp3"'))

To use more complicated APIs, see API docs

Training Demucs

If you want to train (Hybrid) Demucs, please follow the training doc.

MDX Challenge reproduction

In order to reproduce the results from the Track A and Track B submissions, checkout the MDX Hybrid Demucs submission repo.

How to cite

@inproceedings{rouard2022hybrid,
  title={Hybrid Transformers for Music Source Separation},
  author={Rouard, Simon and Massa, Francisco and D{\'e}fossez, Alexandre},
  booktitle={ICASSP 23},
  year={2023}
}

@inproceedings{defossez2021hybrid,
  title={Hybrid Spectrogram and Waveform Source Separation},
  author={D{\'e}fossez, Alexandre},
  booktitle={Proceedings of the ISMIR 2021 Workshop on Music Source Separation},
  year={2021}
}

License

Demucs is released under the MIT license as found in the LICENSE file.

demucs's People

Contributors

0xflotus avatar adefossez avatar ak391 avatar appleholic avatar bogdanteleaga avatar brobbins2001 avatar brunoinds avatar carlgao4 avatar chenht2021 avatar dmitryvinn avatar eltociear avatar famzah avatar helehm avatar huyanxin avatar jeffreyca avatar jjburred avatar keunwoochoi avatar lyghter avatar ma5onic avatar marlluslustosa avatar ngbien83 avatar nicolasusunier avatar o-alexandre-felipe avatar taemincho avatar tom-anders avatar tripathiarpan20 avatar vodiylik avatar will2dye4 avatar zhen-ni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demucs's Issues

musdb18HQ

Hi,
I'm interested in retraining with the HQ version of musdb, and the ability to load this version of musdb would make a great addition to the project,
Thanks

ModuleNotFoundError

After installing demucs using Anaconda without any type of problem everytime I've tried to separate an audio file what I get is the following error:

(demucs) bash-3.2$ python3 -m demucs.separate --dl /Users/admin/Desktop/7.mp3
/Users/admin/opt/anaconda3/envs/demucs/bin/python3: Error while finding module specification for 'demucs.separate' (ModuleNotFoundError: No module named 'demucs')

I checked and the demucs enviroment in anaconda seems to be installed. I've tried to solve it by reinstalling it (even reinstalling Anaconda to an updated version) but it keeps not working.

Thanks,

Problem with channels

"RuntimeError: Given groups=1, weight of size 100 2 8, expected input[1, 1, 652628] to have 2 channels, but got 1 channels instead"
I think there is the problem and i dont know what to do, help please

Acceso denegado

2
Disculpen, tengo un problema, pude realizar todos los pasos de manera correcta, pero al llegar a la parte de "track separation" me aparece este error. Me parece muy raro pues la primera vez que lo intente todo funciono bien, comenzó a descargar los 2,5 GB que debía. Pero hubo una falla en mi internet y cuando volví a intentarlo me apareció ese mensaje de Acceso denegado.
Ya desinstale Anaconda y volví a descargar todo desde cero pero sigue apareciéndome ese mensaje.
Tengo Windows de 64 Bits y tengo GPU dedicada.

Espero puedan ayudarme, muchas gracias <3

No se como continuar

image

(demucs) C:\Users\user\Desktop\demucs-master>python.exe -m demucs.separate --dl -n demucs C:\Users\user\Desktop\Two Feet - Pink.mp3
Traceback (most recent call last):
File "C:\Users\user\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\user\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\user\Desktop\demucs-master\demucs\separate.py", line 143, in
main()
File "C:\Users\user\Desktop\demucs-master\demucs\separate.py", line 122, in main
model = th.load(model_path).to(args.device)
File "C:\Users\user\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 426, in to
return self._apply(convert)
File "C:\Users\user\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\user\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\user\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\user\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 224, in _apply
param_applied = fn(param)
File "C:\Users\user\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 424, in convert
return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
RuntimeError: CUDA out of memory. Tried to allocate 158.00 MiB (GPU 0; 1024.00 MiB total capacity; 548.16 MiB already allocated; 145.83 MiB free; 7.84 MiB cached)

RuntimeError: AYUDAAA

cada vez que pongo un tema a separar me sale este problema ( lo resalto en negrita ) :
(demucs) PS C:\Users\Usuario\demucs-master> python.exe -m demucs.separate --dl -n demucs C:\Users\Usuario\Desktop\IA\Tones
100%|█████████████████████████████████████████████████████████████████████████████| 2.59G/2.59G [32:14<00:00, 1.34MB/s]
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\ProgramData\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Usuario\demucs-master\demucs\separate.py", line 143, in
main()
File "C:\Users\Usuario\demucs-master\demucs\separate.py", line 122, in main
model = th.load(model_path).to(args.device)
File "C:\ProgramData\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 426, in to
return self._apply(convert)
File "C:\ProgramData\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\ProgramData\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\ProgramData\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\rnn.py", line 124, in _apply
self.flatten_parameters()
File "C:\ProgramData\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\rnn.py", line 120, in flatten_parameters
self.batch_first, bool(self.bidirectional))
RuntimeError: CUDA out of memory. Tried to allocate 1.53 GiB (GPU 0; 4.00 GiB total capacity; 2.34 GiB already allocated; 467.68 MiB free; 29.77 MiB cached)

Strange error code

After I entered the separate command and it reached to 27%, a whole lot of text saying that there was an error appeared.

I've gotta say that I've never used python or used a code program in my life:

Traceback (most recent call last):
File "C:\Users\usuario\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\usuario\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\usuario\demucs\demucs\separate.py", line 143, in
main()
File "C:\Users\usuario\demucs\demucs\separate.py", line 121, in main
download_file(url, model_path, sha256)
File "C:\Users\usuario\demucs\demucs\separate.py", line 59, in download_file
_download()
File "C:\Users\usuario\demucs\demucs\separate.py", line 56, in _download
"Expected {} but got {}".format(url, sha256, signature))
ValueError: Invalid sha256 signature when downloading https://dl.fbaipublicfiles.com/demucs/demucs.th. Expected b25b32a4772e43983d2e30cce17a85aaa1baf3aea0a6145eb591b0f393ac9312 but got 9e95ed43031d52296308db46761c539530101709eeca6e2fca3e1e804fdfdabd

Also I'm on Windows 10.

If somebody could help me I would be really happy :D

mkl problems

Hi!

It's my first time on this.
I try to run it but I can't

run "anaconda prompt" then update and activate
(demucs) C: \ Users \ pixel \ demucs> python.exe -m demucs.separate --dl -n demucsC: \ Reptilia.mp3 INTEL MKL ERROR: The operating system cannot execute% 1. mkl_intel_thread.dll. Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

So I tryed replace "mkl_intel_thread.dll" on / Anaconda3 / envs / Demucs / Library / bin / for "mkl_intel_thread.dll" from system32/ and another error:

(demucs) C: \ Users \ pixel \ demucs> python.exe -m demucs.separate --dl -n demucsC: \ Reptilia.mp3 MKL FATAL ERROR on load the function mkl_blas_xsdot

I need something?

donde queda el resultado??

(demucs) C:\Users\Chrisitan\demucs-master>python.exe -m demucs.separate --dl -n demucs "C:\Users\Chrisitan\Desktop\Musica\A Fuego Lento (2º Version).mp3" -d cpu
0%| | 0/1 [00:00<?, ?it/s]ffprobe version 4.2 Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mp3, from 'C:\Users\Chrisitan\Desktop\Musica\A Fuego Lento (2┬║ Version).mp3':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
encoder : Lavf58.28.100
Duration: 00:04:09.38, start: 0.023021, bitrate: 320 kb/s
Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.53
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [8:58:09<00:00, 32289.11s/it]

supuestamente termino de hacerlo pero no encuentro la carpeta separated que tendria que estar en la carpeta de demucs

i have this problem - tengo este problema

(demucs) C:\Users\Chrisitan\Desktop\demucs-master>python.exe -m demucs.separate --dl -n demucs "C:\Users\Chrisitan\Desktop\demucs-master\alex estella dime.mp3"
Traceback (most recent call last):
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Chrisitan\Desktop\demucs-master\demucs\separate.py", line 143, in
main()
File "C:\Users\Chrisitan\Desktop\demucs-master\demucs\separate.py", line 122, in main
model = th.load(model_path).to(args.device)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\serialization.py", line 426, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\serialization.py", line 620, in _load
deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 123420503 more bytes. The file might be corrupted.

ayuda, no entiendo nada

hola, para empezar, nunca usé nada así, sólo vi el video de Jaime Altozano y me dio curiosidad, pero nunca pude hacer que funcione, alguien me puede explicar?

Separation issue

I put the command to separate the song, and after a while it marked 100%, but actually the song was never separated, or I can't seem to find where it got separated:

(demucs)` C:\Users\usuario\demucs>python -m demucs.separate --dl C:\Users\usuario\Desktop\jaja\pijapija.wav

  0%|                                                                                                                                            | 0/1 [00:00<?, ?it/s]ffprobe version 4.2 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

Input #0, wav, from 'C:\Users\usuario\Desktop\jaja\pijapija.wav':
  Metadata:
    encoder         : Lavf58.35.100
  
Duration: 00:03:40.68, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s

100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [05:44<00:00, `344.86s/it]

Oh, and while it was separating, the percentage bar didn't appear till' it finished.

Thanks.

How I use it?

I tried to install for 5 hours but I never go more far than the first step. I always got this error:

'conda env update -f environment-cpu.yml

EnvironmentFileNotFound: '/Users/montserratbartoky/environment-cpu.yml' file not found'

A video tutorial is the perfect thing for help us to try demucs.

Error whilst trying to separate song

I've tried to do this as perfectly as possible, however when I run the
python.exe -m demucs.separate --dl -n demucs PATH_TO_AUDIO_FILE_1
command, it outputs the following:
Traceback (most recent call last): File "C:\Users\MYNAME\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\MYNAME\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\MYNAME\Desktop\demucs-master\demucs\separate.py", line 13, in <module> import torch as th ModuleNotFoundError: No module named 'torch'

not really familiar with python so anything helps

Illegal instruction: 4

I have this problem executing that command:

(demucs) bash-3.2$ python3 -m demucs.separate --dl -n demucs /Users/seba/demucs-master/AUDIOS/LongchampsBoogie.m4a
Illegal instruction: 4
Anyone else with the same problem?
I have usin a MacBook pro.

subprocess.CalledProcessError: Command ' ' returned non-zero exit status 1.

Hola, no entiendo nada de esto, solo quiero aprender a ocupar esta cosa para separar pistas, no soy programador ni nada, instalé todo según las instrucciones, intenté poniendo la ruta del archivo entre comillas, cambiándolo de lugar y me arroja este error :(

(demucs) C:\Users\thero\demucs>python.exe -m demucs.separate --dl "C:\Users\thero\Documents\DAY6_1.mp3"
0%| | 0/1 [00:09<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\thero\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\thero\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\thero\demucs\demucs\separate.py", line 143, in
main()
File "C:\Users\thero\demucs\demucs\separate.py", line 127, in main
wav = AudioFile(track).read(streams=0, samplerate=44100, channels=2).to(args.device)
File "C:\Users\thero\demucs\demucs\audio.py", line 98, in read
streams = np.array(range(len(self)))[streams]
File "C:\Users\thero\demucs\demucs\audio.py", line 59, in len
return len(self._audio_streams)
File "C:\Users\thero\demucs\demucs\audio.py", line 54, in _audio_streams
index for index, stream in enumerate(self.info["streams"])
File "C:\Users\thero\demucs\demucs\audio.py", line 44, in info
self._info = _read_info(self.path)
File "C:\Users\thero\demucs\demucs\audio.py", line 19, in _read_info
str(path), '-print_format', 'json', '-show_format', '-show_streams'
File "C:\Users\thero\Anaconda3\envs\demucs\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "C:\Users\thero\Anaconda3\envs\demucs\lib\subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ffprobe', '-loglevel', 'panic', 'C:\Users\thero\Documents\DAY6_1.mp3', '-print_format', 'json', '-show_format', '-show_streams']' returned non-zero exit status 1.

I have a problem

image

When I wrote the code at first, it started downloading 2,59 gb, then it ended up like this. Don't know what to do

No module named demucs

hola, me aparece el siguiente error:
Error while finding module specification for 'demucs.separate' (ModuleNotFoundError: No module named 'demucs')
necesito ayuda para saber como solucionarlo
¿Alguien me puede explicar?

CommandNotFoundError: Your shell has not been properly configured

I have tried to run this in 2 different laptops (both are MAC) and I always get the same error when executing: conda activate demucs

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.

I have run conda init bash since I am using bash, and open a new terminal.
In the new terminal, running the init command shows that I don't need any other change:

no change     /usr/local/anaconda3/condabin/conda
no change     /usr/local/anaconda3/bin/conda
no change     /usr/local/anaconda3/bin/conda-env
no change     /usr/local/anaconda3/bin/activate
no change     /usr/local/anaconda3/bin/deactivate
no change     /usr/local/anaconda3/etc/profile.d/conda.sh
no change     /usr/local/anaconda3/etc/fish/conf.d/conda.fish
no change     /usr/local/anaconda3/shell/condabin/Conda.psm1
no change     /usr/local/anaconda3/shell/condabin/conda-hook.ps1
no change     /usr/local/anaconda3/lib/python3.7/site-packages/xontrib/conda.xsh
no change     /usr/local/anaconda3/etc/profile.d/conda.csh
no change     /Users/julio/.bash_profile
No action taken.

and I can see the changes in my.bash_profile

# !! Contents within this block are managed by 'conda init' !!
...

I am using MacOS Mojave 10.14.6

Thanks a lot!

About inference time and GPU requirements

I am trying demucs on a GeForce GTX 1080 but I have this error:

CUDA_VISIBLE_DEVICES=0 python3 -m demucs.separate --dl -n demucs test.mp3 
  0%|                                                                                                                    | 0/1 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "/home/stella/.conda/envs/demucs/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/stella/.conda/envs/demucs/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/mnt/Data/stella/demucs/demucs/separate.py", line 132, in <module>
    main()
  File "/mnt/Data/stella/demucs/demucs/separate.py", line 121, in main
    sources = apply_model(model, wav, shifts=args.shifts, split=args.split)
  File "/mnt/Data/stella/demucs/demucs/utils.py", line 121, in apply_model
    shifted_out = apply_model(model, shifted)
  File "/mnt/Data/stella/demucs/demucs/utils.py", line 130, in apply_model
    out = model(padded.unsqueeze(0))[0]
  File "/home/stella/.conda/envs/demucs/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/mnt/Data/stella/demucs/demucs/model.py", line 201, in forward
    x = self.lstm(x)
  File "/home/stella/.conda/envs/demucs/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/mnt/Data/stella/demucs/demucs/model.py", line 23, in forward
    x = self.lstm(x)[0]
  File "/home/stella/.conda/envs/demucs/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/stella/.conda/envs/demucs/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 564, in forward
    return self.forward_tensor(input, hx)
  File "/home/stella/.conda/envs/demucs/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 543, in forward_tensor
    output, hidden = self.forward_impl(input, hx, batch_sizes, max_batch_size, sorted_indices)
  File "/home/stella/.conda/envs/demucs/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 526, in forward_impl
    self.dropout, self.training, self.bidirectional, self.batch_first)
RuntimeError: CUDA out of memory. Tried to allocate 1.74 GiB (GPU 0; 7.92 GiB total capacity; 4.42 GiB already allocated; 1.56 GiB free; 992.21 MiB cached)

Is there some specific gpu requirement for demucs? Also, what's the avg inference time for this model?
tasnet works fine on gpu and takes about 30s on a 3.27 minutes audio file.

On cpu I was unable to use both models, they seem to run forever.
I tried with a 2 seconds audio and it works but takes quite a long time.

time python3 -m demucs.separate --dl -n tasnet --split /Users/stella/Desktop/demucs_test/test.mp3
  0%|                                                                                                                    | 0/1 [00:00<?, ?it/s]
predicting....
done prediction now saving data
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [01:15<00:00, 75.66s/it]

real	1m16.184s
user	1m5.964s
sys	0m16.211s
(demucs) stella$ time python3 -m demucs.separate --dl -n demucs /Users/stella/Desktop/demucs_test/test.mp3
  0%|                                                                                                                    | 0/1 [00:00<?, ?it/s]
predicting....
done prediction now saving data
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:16<00:00, 16.65s/it]

real	0m19.132s
user	0m56.393s
sys	0m4.840s

Acceso Denegado

Perdón, creo que cerre el hilo anterior
Intente hacer lo que me pediste pero no funciono
3
4

[CUDA Environment Update] Incompatible speficiations between CudaToolkit 10.0 and PyTorch 1.3.1

Hello! While trying to setup I found the following error during the environment update step. Updating environment-cuda.yml so it required cudatoolkit 10.1 instead of 10.0 fixed it on my end, but thought about making a issue as to let you know!

(base) ###\demucs-master\demucs-master>conda env update -f environment-cuda.yml
Collecting package metadata (repodata.json): done
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:



Package cudatoolkit conflicts for:
pytorch=1.3.1 -> cudatoolkit[version='>=10.1,<10.2']
cudatoolkit=10.0

illegal hardware instruction python3 -m demucs.separate --dl -n demucs -d cpu

Hi, i'm trying to test demucs but appears this error in my terminal. My software/hardware:

Python 3.7
Anaconda (fresh installation)
demucs activated
MacBook Pro Mid 2010 (4Gb RAM)
i only have NVIDIA GeForce 320M 256 MB, so i decided to use CPU env.

When i type:
python3 -m demucs.separate --dl -n demucs /Path_to_music/any_song.mp3 -d cpu

it appears:
illegal hardware instruction python3 -m demucs.separate --dl -n demucs -d cpu

Even without -d cpu. I know it's a hardware issue... but, how can i fix it?
Thank you!

It's possible in iOS

In the Readme talks about the Windows SO and Linux but I have a Mac, maybe it's possible in a Mac?

I think I installed it wrong

I've been trying for two hours and still get this error
Help please :(

(base) ecmac:demucs hectormangasafonso$ conda activate demucs
(demucs) ecmac:demucs hectormangasafonso$ python3 -m demucs.separate --dl /Users/hectormangasafonso/Downloads/malamente.mp3 
Traceback (most recent call last):
  File "/Users/hectormangasafonso/opt/anaconda3/envs/demucs/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/hectormangasafonso/opt/anaconda3/envs/demucs/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/hectormangasafonso/demucs/demucs/separate.py", line 143, in <module>
    main()
  File "/Users/hectormangasafonso/demucs/demucs/separate.py", line 122, in main
    model = th.load(model_path).to(args.device)
  File "/Users/hectormangasafonso/opt/anaconda3/envs/demucs/lib/python3.7/site-packages/torch/serialization.py", line 426, in load
    return _load(f, map_location, pickle_module, **pickle_load_args)
  File "/Users/hectormangasafonso/opt/anaconda3/envs/demucs/lib/python3.7/site-packages/torch/serialization.py", line 620, in _load
    deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 106623639 more bytes. The file might be corrupted.
libc++abi.dylib: terminating with uncaught exception of type c10::Error: owning_ptr == NullType::singleton() || owning_ptr->refcount_.load() > 0 INTERNAL ASSERT FAILED at /Users/distiller/project/conda/conda-bld/pytorch_1573049287641/work/c10/util/intrusive_ptr.h:348, please report a bug to PyTorch. intrusive_ptr: Can only intrusive_ptr::reclaim() owning pointers that were created using intrusive_ptr::release(). (reclaim at /Users/distiller/project/conda/conda-bld/pytorch_1573049287641/work/c10/util/intrusive_ptr.h:348)
frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 135 (0x117580517 in libc10.dylib)
frame #1: c10::intrusive_ptr<c10::intrusive_ptr_target, c10::detail::intrusive_target_default_null_type<c10::intrusive_ptr_target> >::reclaim(c10::intrusive_ptr_target*) + 264 (0x11baa5f48 in libtorch.dylib)
frame #2: THFloatStorage_free + 28 (0x11c34ea0c in libtorch.dylib)
frame #3: THPFloatStorage_dealloc(THPStorage*) + 18 (0x116a72532 in libtorch_python.dylib)
<omitting python frames>
frame #21: start + 1 (0x7fff669dd2e5 in libdyld.dylib)

Abort trap: 6

Input size and kernel size mismatch

hi i'm new in this site and have this error:
(demucs) C:\Users\anime\demucs>python.exe -m demucs.separate --dl "C:\Users\anime\Music\spotify\ED Evangelion.mp3"
Separated tracks will be stored in C:\Users\anime\demucs\separated\demucs
Separating track C:\Users\anime\Music\spotify\ED Evangelion.mp3
96%|████████████████████████████████████████████████████████████████████████████████████████████▌ | 270/280 [09:02<00:19, 1.98s/seconds]Traceback (most recent call last):
File "C:\Users\anime\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\anime\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\anime\demucs\demucs\separate.py", line 146, in
main()
File "C:\Users\anime\demucs\demucs\separate.py", line 135, in main
sources = apply_model(model, wav, shifts=args.shifts, split=args.split, progress=True)
File "C:\Users\anime\demucs\demucs\utils.py", line 117, in apply_model
chunk_out = apply_model(model, chunk, shifts=shifts)
File "C:\Users\anime\demucs\demucs\utils.py", line 138, in apply_model
out = model(padded.unsqueeze(0))[0]
File "C:\Users\anime\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "C:\Users\anime\demucs\demucs\model.py", line 207, in forward
x = decode(x)
File "C:\Users\anime\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "C:\Users\anime\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)
File "C:\Users\anime\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "C:\Users\anime\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\conv.py", line 202, in forward
self.padding, self.dilation, self.groups)

RuntimeError: Calculated padded input size per channel: (2). Kernel size: (3). Kernel size can't be greater than actual input size

96%|████████████████████████████████████████████████████████████████████████████████████████████▌ | 270/280 [09:03<00:20, 2.01s/seconds]

how i can fix it?
THX

CUDA Out of Memory

Hi!

Everytime I run this command in Windows:
python.exe -m demucs.separate --dl -n demucs NAMEOFTHEFILE.mp3

i'm facing this error message:
"RuntimeError: CUDA out of memory. Tried to allocate 158.00 MiB (GPU 0; 2.00 GiB total capacity; 1.12 GiB already allocated; 119.35 MiB free; 20.06 MiB cached)"

Do you know what can I do to solve it?

Thank you so much,

Fail to run on read_audio mismatching with subprocess

I got fail for running separation of test audio.

Run function of subprocess has not 'capture_output' argument under python 3.7 (My environment is 3.6).

It would be better 'getoutput' function to support other versions of python3. (I will make PR and reference it on comment) And repository should specify the version of python.

Frozen loading bar during song decompilation

The loading bar freezes when I try to process a song

Log:

  0%|                                                     | 0/1 [00:00<?, ?it/s]ffprobe version 4.2 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
  configuration: --prefix=/root/anaconda3/envs/demucs --cc=/home/conda/feedstock_root/build_artifacts/ffmpeg_1566210161358/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-libx264 --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, wav, from '/root/Escritorio/soltera-remix.wav':
  Metadata:
    encoder         : Lavf58.35.100
  Duration: 00:04:25.24, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

As you can see the estimated waiting time shows a (?) symbol
I'm running in Kali.

[Request] 22GBytes GPU memory parameter settings

I have small GPU memory problem with my V40 Nvidia GPU (22GBytes).

Could you give me the parameter settings ?
Originally, the default parameters maybe related with the GPU memeory are as follows;
"batch_size = 16", "num_channels = 64" and etc...

If there are proper parameters to fit to the 22 GBytes GPU memeory, please let me know the
parameters and setting values.

Thank you in advance.

FileNotFoundError: [WinError 2] The system cannot find the specified file

Ok so I did everything perfect but it reached 100% and then this appeared.

(base) C:\Users\name\Downloads\demucs-master>python.exe -m demucs.separate --dl -n demucs C:\Users\name\Desktop\song.mp3
100%|█████████████████████████████████████████████████████████████████████████████| 2.59G/2.59G [03:59<00:00, 10.8MB/s]
  0%|                                                                                            | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "C:\Users\name\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\name\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\name\Downloads\demucs-master\demucs\separate.py", line 143, in <module>
    main()
  File "C:\Users\name\Downloads\demucs-master\demucs\separate.py", line 127, in main
    wav = AudioFile(track).read(streams=0, samplerate=44100, channels=2).to(args.device)
  File "C:\Users\name\Downloads\demucs-master\demucs\audio.py", line 97, in read
    streams = np.array(range(len(self)))[streams]
  File "C:\Users\name\Downloads\demucs-master\demucs\audio.py", line 58, in __len__
    return len(self._audio_streams)
  File "C:\Users\name\Downloads\demucs-master\demucs\audio.py", line 53, in _audio_streams
    index for index, stream in enumerate(self.info["streams"])
  File "C:\Users\name\Downloads\demucs-master\demucs\audio.py", line 43, in info
    self._info = _read_info(self.path)
  File "C:\Users\name\Downloads\demucs-master\demucs\audio.py", line 18, in _read_info
    ['ffprobe', str(path), '-print_format', 'json', '-show_format', '-show_streams']
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado

And now everytime that I try to do it doesn't even load, it loads 0% and then that error appears every time

(base) C:\Users\name\Downloads\demucs-master\demucs-master>python.exe -m demucs.separate --dl -n demucs C:\Users\name\Desktop\song.mp3
  0%|                                                                                            | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "C:\Users\name\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\name\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\separate.py", line 143, in <module>
    main()
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\separate.py", line 127, in main
    wav = AudioFile(track).read(streams=0, samplerate=44100, channels=2).to(args.device)
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\audio.py", line 97, in read
    streams = np.array(range(len(self)))[streams]
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\audio.py", line 58, in __len__
    return len(self._audio_streams)
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\audio.py", line 53, in _audio_streams
    index for index, stream in enumerate(self.info["streams"])
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\audio.py", line 43, in info
    self._info = _read_info(self.path)
  File "C:\Users\name\Downloads\demucs-master\demucs-master\demucs\audio.py", line 18, in _read_info
    ['ffprobe', str(path), '-print_format', 'json', '-show_format', '-show_streams']
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "C:\Users\name\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado

When I try to put the commands the output is this

I managed to "install" the code files and all of that. When I try the first command, this one.

python.exe -m demucs.separate --dl -n demucs PATH_TO_AUDIO_FILE_1

I get this
error

Im on windows 10 64 bit

Incompatible

pc: windows 10

(base) C:\Users\alexm>conda env update -f environment-cuda.yml
Collecting package metadata (repodata.json): done
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining cudatoolkit: 4%|8 | 3/74 [00:00<00:00, 1500.11it/|
Comparing specs that have this dependency: 0%| | 0/2 [00:00<?, ?it/s]
Finding shortest conflict path for cudatoolkit[version='>=10.1,<10.2']: 50%|5| 1/2
Examining ninja: 30%|########3 | 22/74 [00:47<08:18, 9.58s/it/ failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package cudatoolkit conflicts for:
pytorch=1.3.1 -> cudatoolkit[version='>=10.1,<10.2']
cudatoolkit=10.0

![image](https://user-images.githubusercontent.com/16576445/70383598-12fe7c00-194f-11ea-86d2-2764e1302fa4.png)

image
estoy teniendo este error

RuntimeError: CUDA out of memory. Tried to allocate 1.53 GiB (GPU 0; 4.00 GiB to tal capacity; 2.34 GiB already allocated; 568.58 MiB free; 29.77 MiB cached

Mi pc:
PROCESADOR: Intel I3 6100
VIDEO: Nvidia GeForce 1050 Ti 4gb Overlooked EVGA
RAM: 12GB
DISCO: 1 TB

AIUDAAAA

Originally posted by @Kadaryan in #8 (comment)

Mismo problema, ya he probado con GPU y CPU con identico resultado.

Traceback (most recent call last)

Al fin he podido solucionar problemas anteriores e instalar los 2,5 GB. Al momento de separar la canción me aparece este ultimo error.

Muchas gracias por su atención, lo aprecio mucho y espero aun pueda ayudarme <3

8

FFmpeg Problem Windows 10

(demucs) C:\Users\Sensation829\demucs>python.exe -m demucs.separate --dl C:\Users\Sensation829\Downloads\Arm opo.mp3
100%|█████████████████████████████████████████████████████████████████████████████| 2.59G/2.59G [06:22<00:00, 6.78MB/s]
  0%|                                                                                            | 0/5 [00:00<?, ?it/s]ffprobe version 4.2 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
C:\Users\Sensation829\Downloads\Arm: No such file or directory
  0%|                                                                                            | 0/5 [00:03<?, ?it/s]
Traceback (most recent call last):
  File "C:\Users\Sensation829\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Sensation829\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Sensation829\demucs\demucs\separate.py", line 143, in <module>
    main()
  File "C:\Users\Sensation829\demucs\demucs\separate.py", line 127, in main
    wav = AudioFile(track).read(streams=0, samplerate=44100, channels=2).to(args.device)
  File "C:\Users\Sensation829\demucs\demucs\audio.py", line 97, in read
    streams = np.array(range(len(self)))[streams]
  File "C:\Users\Sensation829\demucs\demucs\audio.py", line 58, in __len__
    return len(self._audio_streams)
  File "C:\Users\Sensation829\demucs\demucs\audio.py", line 53, in _audio_streams
    index for index, stream in enumerate(self.info["streams"])
  File "C:\Users\Sensation829\demucs\demucs\audio.py", line 43, in info
    self._info = _read_info(self.path)
  File "C:\Users\Sensation829\demucs\demucs\audio.py", line 18, in _read_info
    ['ffprobe', str(path), '-print_format', 'json', '-show_format', '-show_streams']
  File "C:\Users\Sensation829\Anaconda3\envs\demucs\lib\subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "C:\Users\Sensation829\Anaconda3\envs\demucs\lib\subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ffprobe', 'C:\\Users\\Sensation829\\Downloads\\Arm', '-print_format', 'json', '-show_format', '-show_streams']' returned non-zero exit status 1.

I do not understand why when it finish anlysing the song it search a directory with part from the name of the song

Every time I go by my audio file of this error. TypeError: argument of type 'WindowsPath' is not iterable can you explain why?

(demucs) C:\Users\Vinicius111\Desktop\demucs-master\demucs-master>python -m demucs.separate --dl -n demucs C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\test.mp3
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\Vinicius111\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Vinicius111\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\separate.py", line 132, in
main()
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\separate.py", line 116, in main
wav = AudioFile(track).read(streams=0, samplerate=44100, channels=2).to(args.device)
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\audio.py", line 95, in read
streams = np.array(range(len(self)))[streams]
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\audio.py", line 58, in len
return len(self._audio_streams)
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\audio.py", line 53, in _audio_streams
index for index, stream in enumerate(self.info["streams"])
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\audio.py", line 43, in info
self._info = _read_info(self.path)
File "C:\Users\Vinicius111\Desktop\demucs-master\demucs-master\demucs\audio.py", line 19, in _read_info
check=True)
File "C:\Users\Vinicius111\Anaconda3\envs\demucs\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\Vinicius111\Anaconda3\envs\demucs\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\Vinicius111\Anaconda3\envs\demucs\lib\subprocess.py", line 1148, in _execute_child
args = list2cmdline(args)
File "C:\Users\Vinicius111\Anaconda3\envs\demucs\lib\subprocess.py", line 555, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable

Environment File Not Found

when i run
conda env update -f environment-cpu.yml

I get this message
EnvironmentFileNotFound: 'C: \ Users \ user \ environment-cpu.yml' file not found
 
I don't know anything about programming, even if the anaconda program I'm using is correct. I want to try this for my musical interests, so I would need some more advanced tutorial to run the program.

Acceso denegado

Tengo un ligero problema, he realizado todos los pasos de manera correcta, mejor dicho importe el enviroment de demucs a anaconda exitosamente pero el problema surge al tratar de hacer el "track separation"

Cualquier ayuda es bienvenida, gracias :)

seseseses

python version

Hi fb,
Can I use python python 3.6 for this code?
Best regards,
PeterPham

i have a problem

when I put the command python3 -m demucs.separate --dl -n demucs and the direction of the mp3 and i press start, start a dowloading 2,59 GB. Is this normal?

i have other problem - otro problema

Traceback (most recent call last):
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Chrisitan\Desktop\demucs-master\demucs\separate.py", line 143, in
main()
File "C:\Users\Chrisitan\Desktop\demucs-master\demucs\separate.py", line 122, in main
model = th.load(model_path).to(args.device)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 426, in to
return self._apply(convert)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\module.py", line 202, in _apply
module._apply(fn)
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\rnn.py", line 124, in _apply
self.flatten_parameters()
File "C:\Users\Chrisitan\Anaconda3\envs\demucs\lib\site-packages\torch\nn\modules\rnn.py", line 120, in flatten_parameters
self.batch_first, bool(self.bidirectional))
RuntimeError: CUDA out of memory. Tried to allocate 1.53 GiB (GPU 0; 4.00 GiB total capacity; 2.34 GiB already allocated; 598.80 MiB free; 29.77 MiB cached)

No me deja hacer mas nada

ImportError

I get this error nonstop. After I figured a lot of things, I could use it but I keep on finding this and I'm confused. I know little to no code.

Traceback (most recent call last): File "C:\Users\kreme\Anaconda3\envs\demucs\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\kreme\Anaconda3\envs\demucs\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\kreme\Anaconda3\envs\demucs\separate.py", line 17, in <module> from .audio import AudioFile ImportError: attempted relative import with no known parent package

Why could this be? Any solution?

Module Not Found

Hi, i have this issue. I'm in Windows 10

(demucs) C:\Users\Admin>python.exe -m demucs.separate --dl -n demucs "C:\Users\Admin\Desktop\Music\01. Ben.mp3" -d cpu
C:\Users\Admin\Documents\Nueva carpeta\envs\demucs\python.exe: Error while finding module specification for 'demucs.separate' (ModuleNotFoundError: No module named 'demucs')

Ayuda! ResolvePackageNotFound: pytorch y ffmpeg

todo al pie de la letra hice, pero no funciona en cmd, habia leido en una pag en ingles (yo no se ingles pero entiendo algo ) que decia usa "anaconda navigator" lo hice y wow! funciona pero PERO..
cuando pongo: conda env update -f environment-cpu.yml
me dice esto .. tanto en cmd como en anaconda navigator sale lo mismo y no puedo seguir tengo todo instalado pero al parecer falta algo que hago?
esto nada que ver ayuda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.