deezer / spleeter

Deezer source separation library including pretrained models.
https://research.deezer.com/projects/spleeter.html
MIT License
25.77k stars 2.82k forks source link

Cannot allocat #520

Open chenny2020 opened 3 years ago

chenny2020 commented 3 years ago

Description

Step to reproduce

  1. Installed using ...
  2. Run as ...
  3. Got ... error

Output

Share what your terminal says when you run the script (as well as what you would expect).

Environment

OS Linux
Installation type Conda
RAM available XGo
Hardware spec CPU

Additional context

(music) [root@iZwz9jbecbctr7jnimp6z9Z ~]# spleeter separate -i /root/2.mp3 -p spleeter:2stems -o output

OMP: Info #212: KMP_AFFINITY: decoding x2APIC ids. OMP: Info #213: KMP_AFFINITY: cpuid leaf 11 not supported - decoding legacy APIC ids. OMP: Info #149: KMP_AFFINITY: Affinity capable, using global cpuid info OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0 OMP: Info #156: KMP_AFFINITY: 1 available OS procs OMP: Info #157: KMP_AFFINITY: Uniform topology OMP: Info #159: KMP_AFFINITY: 1 packages x 1 cores/pkg x 1 threads/core (1 total cores) OMP: Info #214: KMP_AFFINITY: OS proc to physical thread map: OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 OMP: Info #250: KMP_AFFINITY: pid 22773 tid 22773 thread 0 bound to OS proc set 0 Exception in thread Thread-1: Traceback (most recent call last): File "/usr/local/anaconda3/envs/music/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/local/anaconda3/envs/music/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/pool.py", line 412, in _handle_workers pool._maintain_pool() File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/pool.py", line 248, in _maintain_pool self._repopulate_pool() File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/pool.py", line 241, in _repopulate_pool w.start() File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/process.py", line 112, in start self._popen = self._Popen(self) File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/context.py", line 277, in _Popen return Popen(process_obj) File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/popen_fork.py", line 20, in init self._launch(process_obj) File "/usr/local/anaconda3/envs/music/lib/python3.7/multiprocessing/popen_fork.py", line 70, in _launch self.pid = os.fork() OSError: [Errno 12] Cannot allocat

微信图片_20201118170915
romi1502 commented 3 years ago

Hi @chenny2020 This behavior is usually symptomatic of trying to separate a too long signal on a computer with not much RAM. In this case, reducing the duration of the input signal using the -d option should solve the problem:

spleeter separate -i /root/2.mp3 -d 10 -p spleeter:2stems -o output

you'll then have to split your long signal in shorter chunks to separate it.