Anjok07 / ultimatevocalremovergui

GUI for a Vocal Remover that uses Deep Neural Networks.
MIT License
18.23k stars 1.36k forks source link

Excessive use of memory (RAM) 20 GB out of 24 GB then crash #409

Closed booToToM closed 1 year ago

booToToM commented 1 year ago

I wonder how come a software like this needs 20 GB of memory to process a 4 minute audio file (7 GB for a 30 sec sample). I'm considering going back to default parameters but there's definitely something wrong going on here.

UVR memory use 20GB crop

UVR memory use 30sec sample crop

Here's the error log :

Last Error Received:

Process: MDX-Net

The application was unable to allocate enough system memory to use this model.

Please do the following:

  1. Restart this application.
  2. Ensure any CPU intensive applications are closed.
  3. Then try again.

Please Note: Intel Pentium and Intel Celeron processors do not work well with this application.

If the error persists, the system may not have enough RAM, or your CPU might not be supported.

Raw Error Details:

RuntimeError: "[enforce fail at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 173060096 bytes." Traceback Error: " File "UVR.py", line 4592, in process_start File "separate.py", line 249, in seperate File "separate.py", line 321, in demix_base File "separate.py", line 349, in istft "

Error Time Stamp [2023-02-06 22:14:23]

Full Application Settings:

vr_model: Choose Model aggression_setting: 10 window_size: 512 batch_size: 4 crop_size: 256 is_tta: False is_output_image: False is_post_process: False is_high_end_process: False post_process_threshold: 0.2 vr_voc_inst_secondary_model: No Model Selected vr_other_secondary_model: No Model Selected vr_bass_secondary_model: No Model Selected vr_drums_secondary_model: No Model Selected vr_is_secondary_model_activate: False vr_voc_inst_secondary_model_scale: 0.9 vr_other_secondary_model_scale: 0.7 vr_bass_secondary_model_scale: 0.5 vr_drums_secondary_model_scale: 0.5 demucs_model: Choose Model segment: Default overlap: 0.25 shifts: 2 chunks_demucs: Auto margin_demucs: 44100 is_chunk_demucs: False is_primary_stem_only_Demucs: False is_secondary_stem_only_Demucs: False is_split_mode: True is_demucs_combine_stems: True demucs_voc_inst_secondary_model: No Model Selected demucs_other_secondary_model: No Model Selected demucs_bass_secondary_model: No Model Selected demucs_drums_secondary_model: No Model Selected demucs_is_secondary_model_activate: False demucs_voc_inst_secondary_model_scale: 0.9 demucs_other_secondary_model_scale: 0.7 demucs_bass_secondary_model_scale: 0.5 demucs_drums_secondary_model_scale: 0.5 demucs_pre_proc_model: No Model Selected is_demucs_pre_proc_model_activate: False is_demucs_pre_proc_model_inst_mix: False mdx_net_model: UVR-MDX-NET Main chunks: Auto margin: 44100 compensate: Auto is_denoise: False is_invert_spec: False mdx_voc_inst_secondary_model: No Model Selected mdx_other_secondary_model: No Model Selected mdx_bass_secondary_model: No Model Selected mdx_drums_secondary_model: No Model Selected mdx_is_secondary_model_activate: False mdx_voc_inst_secondary_model_scale: 0.9 mdx_other_secondary_model_scale: 0.7 mdx_bass_secondary_model_scale: 0.5 mdx_drums_secondary_model_scale: 0.5 is_save_all_outputs_ensemble: True is_append_ensemble_name: False chosen_audio_tool: Manual Ensemble choose_algorithm: Min Spec time_stretch_rate: 2.0 pitch_rate: 2.0 is_gpu_conversion: False is_primary_stem_only: False is_secondary_stem_only: False is_testing_audio: False is_add_model_name: False is_accept_any_input: False is_task_complete: False is_normalization: False is_create_model_folder: False mp3_bit_set: 320k save_format: WAV wav_type_set: PCM_24 help_hints_var: False model_sample_mode: False model_sample_mode_duration: 30 demucs_stems: All Stems

booToToM commented 1 year ago

Also, additional question, I noticed the process only uses 23 or 25% of the CPU (mine is a quadcore), which means it probably uses 1 processor over the 4. Wouldn't be an improvement if it was able to use loike 2 or 3 of the available processors ?

dimadt commented 1 year ago

Havin' the same problem. and I'm wishing to now the answer ':)

dimadt commented 1 year ago

Also, i used not the inst UVR MDX NET, I used the normal main version, which needs to be downloaded.

So, maybe it's problematic?

booToToM commented 1 year ago

I tested the software on an i5 laptop less powerful than my main laptop and 3 times less RAM and it went well (among the threee songs tested, one that lasts 7,5 min in FLAC format 24 bits) :

Capture d’écran Huawei i5 8GB RAM 2023-02-21 160627 Capture d’écran Huawei i5 8GB Task Manager 2023-02-21 161246

FYI, here are the specs on the laptop where it crashes.

Capture d’écran Lenovo ThinkPad W530 i7 24 GB RAM 2023-02-21 175355 (1)

The bigger difference now consisting in disk space but it already worked well with two or three times less disk space than I made now. Am I condemned to just uninstall and reinstall it completely from scratch ? It's a drag if so.

DJboutit commented 1 year ago

My computer I7 3770 with 24gb DDR3 ram AMD video card so I am using all CUP UVR uses 13.5gb ram URV Usage

Only other program I have used that uses even close to this much ram on my computer is Topaz Video AI it is expected to use a lot of ram for video upscaling UVR next update need to optimized to only use 2 to 4 gb ram no more than that

booToToM commented 1 year ago

After testing it on my configuration with more disk space than RAM on every hard drive, it still fails so I guess it's something about the processor which can't run this for an obscure reason.

Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz 2.70 GHz 24,0 Go (23,8 Go utilisable) Système d’exploitation 64 bits, processeur x64

W10, 28 GB free on main hard drive, 29 GB on the other one (note that the application already worked by the past).

booToToM commented 1 year ago

Well, I don't if recent W10 updates fixed my issue but the last 5 separations worked well, I don't know why. Even longer files like a 8 minutes CD quality lossless audio and a 4 minutes song in 48 kHz 24 bits (will try one or two track of even higher quality next).

@DJboutit @dimadt , do you still have problems running UVR ? (considering your OS is up to date)

DJboutit commented 1 year ago

I am using Windows 10 done at least 3 updates for it still slows down my computer a lot. I have notice after restarting my computer and the cache and some other thing are cleared UVR uses like 15% to 20% less resources.

booToToM commented 1 year ago

I am using Windows 10 done at least 3 updates for it still slows down my computer a lot. I have notice after restarting my computer and the cache and some other thing are cleared UVR uses like 15% to 20% less resources.

Was it crashing or is it still crashing from time to time ? If not, I'll certainly close it, unless @dimadt still has crashing issues with it.

DJboutit commented 1 year ago

Computer freeze for a 40 to 60 seconds pre track. UVR uses way more resources than any other I have ever used. No program should really be using more than 4gb ram.

booToToM commented 1 year ago

@Anjok07 or anyone, please help

The day before yesterday, I was able to run several files in UVR (including big ones) and then today, nothing.

I also uninstalled and reinstalled it, tested it on a less powerful but more recent computer (I'm not rich enough to buy another computer on purpose). I have more disk space now, I'm used to close GDrive and several apps... I just don't get why it won't work or just occasionally like it did recently.

Last Error Received:

Process: MDX-Net

The application was unable to allocate enough system memory to use this model.

Please do the following:

  1. Restart this application.
  2. Ensure any CPU intensive applications are closed.
  3. Then try again.

Please Note: Intel Pentium and Intel Celeron processors do not work well with this application.

If the error persists, the system may not have enough RAM, or your CPU might not be supported.

Raw Error Details:

RuntimeError: "[enforce fail at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 173060096 bytes." Traceback Error: " File "UVR.py", line 4592, in process_start File "separate.py", line 249, in seperate File "separate.py", line 321, in demix_base File "separate.py", line 345, in istft "

Error Time Stamp [2023-03-19 22:05:19]

Full Application Settings:

vr_model: Choose Model aggression_setting: 10 window_size: 512 batch_size: 4 crop_size: 256 is_tta: False is_output_image: False is_post_process: False is_high_end_process: False post_process_threshold: 0.2 vr_voc_inst_secondary_model: No Model Selected vr_other_secondary_model: No Model Selected vr_bass_secondary_model: No Model Selected vr_drums_secondary_model: No Model Selected vr_is_secondary_model_activate: False vr_voc_inst_secondary_model_scale: 0.9 vr_other_secondary_model_scale: 0.7 vr_bass_secondary_model_scale: 0.5 vr_drums_secondary_model_scale: 0.5 demucs_model: Choose Model segment: Default overlap: 0.25 shifts: 2 chunks_demucs: Auto margin_demucs: 44100 is_chunk_demucs: False is_primary_stem_only_Demucs: False is_secondary_stem_only_Demucs: False is_split_mode: True is_demucs_combine_stems: True demucs_voc_inst_secondary_model: No Model Selected demucs_other_secondary_model: No Model Selected demucs_bass_secondary_model: No Model Selected demucs_drums_secondary_model: No Model Selected demucs_is_secondary_model_activate: False demucs_voc_inst_secondary_model_scale: 0.9 demucs_other_secondary_model_scale: 0.7 demucs_bass_secondary_model_scale: 0.5 demucs_drums_secondary_model_scale: 0.5 demucs_pre_proc_model: No Model Selected is_demucs_pre_proc_model_activate: False is_demucs_pre_proc_model_inst_mix: False mdx_net_model: UVR-MDX-NET Main chunks: Auto margin: 44100 compensate: Auto is_denoise: False is_invert_spec: False mdx_voc_inst_secondary_model: No Model Selected mdx_other_secondary_model: No Model Selected mdx_bass_secondary_model: No Model Selected mdx_drums_secondary_model: No Model Selected mdx_is_secondary_model_activate: False mdx_voc_inst_secondary_model_scale: 0.9 mdx_other_secondary_model_scale: 0.7 mdx_bass_secondary_model_scale: 0.5 mdx_drums_secondary_model_scale: 0.5 is_save_all_outputs_ensemble: True is_append_ensemble_name: False chosen_audio_tool: Manual Ensemble choose_algorithm: Min Spec time_stretch_rate: 2.0 pitch_rate: 2.0 is_gpu_conversion: False is_primary_stem_only: False is_secondary_stem_only: False is_testing_audio: False is_add_model_name: False is_accept_any_input: False is_task_complete: False is_normalization: False is_create_model_folder: False mp3_bit_set: 320k save_format: FLAC wav_type_set: PCM_24 help_hints_var: False model_sample_mode: False model_sample_mode_duration: 30 demucs_stems: All Stems

booToToM commented 1 year ago

Please Note: Intel Pentium and Intel Celeron processors do not work well with this application.

If the error persists, the system may not have enough RAM, or your CPU might not be supported.

It's something I didn't necessarily read in other error logs but is it planned obsolescence up here ?

OK, my processor is about ten years old but it's still an i7 and it's a powerful laptop. How come UVR (python, pytorch or whatever) considers it as a Celeron or Pentium ?

For instance, on another website about machine learning, I'm reading this :

Central Processing Unit (CPU) — Intel Core i5 6th Generation processor or higher. An AMD equivalent processor will also be optimal.

https://towardsdatascience.com/setup-an-environment-for-machine-learning-and-deep-learning-with-anaconda-in-windows-5d7134a3db10

Does it apply here ? My processor is a 3rd gen i7 but why shouldn't it work ? compared to 6th gen and further ?

Should I set up are virtual environment on purpose or will the problem be the same ?

dimadt commented 1 year ago

I am using Windows 10 done at least 3 updates for it still slows down my computer a lot. I have notice after restarting my computer and the cache and some other thing are cleared UVR uses like 15% to 20% less resources.

Was it crashing or is it still crashing from time to time ? If not, I'll certainly close it, unless @dimadt still has crashing issues with it.

still.

But i'm using it for long audios, so yea...

My processor is amd ryzen 5 3600

booToToM commented 1 year ago

Was it crashing or is it still crashing from time to time ? If not, I'll certainly close it, unless @dimadt still has crashing issues with it.

still.

But i'm using it for long audios, so yea...

My processor is amd ryzen 5 3600

On another computer, I still had to cut 13 minutes or longer in halves and then glue them back to process them.

For me, it worked for a short time because now it crashes whatever the length or disk space, ram/processor used...

Also, I successfully tested it on a 5th gen i5. Mine is 3rd gen but more powerful and with more RAM, that's just frustrating. Must be the 6th I'm using this word.

booToToM commented 1 year ago

I did several tests with the latest 5.5.1 version, including several ~100 MB FLAC files and they all went OK.

I can say I'm relieved, it was worth the wait, now I no longer depend on other close relatives computers or MVSEP.

Hopefully it will last, I'm closing the issue there.