spleeter icon indicating copy to clipboard operation
spleeter copied to clipboard

[Discussion] How can I make sure separate running on GPU?

Open limengqilove opened this issue 2 years ago • 2 comments

The separate worked, I use --verbose and it shows some info, but i'm not sure it run on GPU. how can i make sure it?

C:\Users\Administrator\Desktop\testSound>python -m spleeter separate -p spleeter:5stems -o output --verbose audio_example.mp3
INFO:tensorflow:Using config: {'_model_dir': 'pretrained_models\\5stems', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': gpu_options {
  per_process_gpu_memory_fraction: 0.7
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_session_creation_timeout_secs': 7200, '_checkpoint_save_graph_def': True, '_service': None, '_cluster_spec': ClusterSpec({}), '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
WARNING:tensorflow:From C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\spleeter\separator.py:146: calling DatasetV2.from_generator (from tensorflow.python.data.ops.dataset_ops) with output_types is deprecated and will be removed in a future version.
Instructions for updating:
Use output_signature instead
WARNING:tensorflow:From C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\spleeter\separator.py:146: calling DatasetV2.from_generator (from tensorflow.python.data.ops.dataset_ops) with output_shapes is deprecated and will be removed in a future version.
Instructions for updating:
Use output_signature instead
INFO:tensorflow:Calling model_fn.
INFO:tensorflow:Apply unet for vocals_spectrogram
WARNING:tensorflow:From C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\layers\normalization\batch_normalization.py:532: _colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
INFO:tensorflow:Apply unet for piano_spectrogram
INFO:tensorflow:Apply unet for drums_spectrogram
INFO:tensorflow:Apply unet for bass_spectrogram
INFO:tensorflow:Apply unet for other_spectrogram
INFO:tensorflow:Done calling model_fn.
INFO:tensorflow:Graph was finalized.
INFO:tensorflow:Restoring parameters from pretrained_models\5stems\model
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
INFO:spleeter:File output\audio_example/piano.wav written succesfully
INFO:spleeter:File output\audio_example/other.wav written succesfully
INFO:spleeter:File output\audio_example/vocals.wav written succesfully
INFO:spleeter:File output\audio_example/drums.wav written succesfully
INFO:spleeter:File output\audio_example/bass.wav written succesfully

I don't think it worked on GPU, because it run 28s. I don't think this is the right speed. Am I right?

limengqilove avatar Jun 24 '22 04:06 limengqilove

Perhaps try --stft-backend tensorflow. This should force GPU usage.

SuperSonicHub1 avatar Jun 27 '22 16:06 SuperSonicHub1

Perhaps try --stft-backend tensorflow. This should force GPU usage.

this does not work. I am having the same 'issue' as OP.

I tried the steps in the this discussion/issue but with no luck and get same output as OP here. https://github.com/deezer/spleeter/issues/739

OhBobb avatar Feb 04 '24 05:02 OhBobb