Spaces:
Running
on
Zero
Running
on
Zero
Update gradio_mix.py
Browse files- gradio_mix.py +3 -3
gradio_mix.py
CHANGED
|
@@ -61,7 +61,7 @@ def _pick_device():
|
|
| 61 |
return "cuda" if torch.cuda.is_available() else "cpu"
|
| 62 |
|
| 63 |
device = _pick_device()
|
| 64 |
-
ASR_DEVICE = "
|
| 65 |
whisper_model, align_model = None, None
|
| 66 |
tts_edit_model = None
|
| 67 |
|
|
@@ -109,7 +109,7 @@ class UVR5:
|
|
| 109 |
model_path=model_path,
|
| 110 |
audio_path = model_dir,
|
| 111 |
result_path = model_dir,
|
| 112 |
-
device =
|
| 113 |
process_method = "MDX-Net",
|
| 114 |
# Keep base_dir and model_dir the same so all UVR5 metadata
|
| 115 |
# (model_data.json, model_name_mapper.json, etc.) are resolved
|
|
@@ -118,7 +118,7 @@ class UVR5:
|
|
| 118 |
**configs
|
| 119 |
)
|
| 120 |
|
| 121 |
-
uvr5_model = Inference(model_data,
|
| 122 |
uvr5_model.load_model(model_path, 1)
|
| 123 |
return uvr5_model
|
| 124 |
|
|
|
|
| 61 |
return "cuda" if torch.cuda.is_available() else "cpu"
|
| 62 |
|
| 63 |
device = _pick_device()
|
| 64 |
+
ASR_DEVICE = "cuda" # force whisperx/pyannote to CPU to avoid cuDNN issues
|
| 65 |
whisper_model, align_model = None, None
|
| 66 |
tts_edit_model = None
|
| 67 |
|
|
|
|
| 109 |
model_path=model_path,
|
| 110 |
audio_path = model_dir,
|
| 111 |
result_path = model_dir,
|
| 112 |
+
device = _pick_device(),
|
| 113 |
process_method = "MDX-Net",
|
| 114 |
# Keep base_dir and model_dir the same so all UVR5 metadata
|
| 115 |
# (model_data.json, model_name_mapper.json, etc.) are resolved
|
|
|
|
| 118 |
**configs
|
| 119 |
)
|
| 120 |
|
| 121 |
+
uvr5_model = Inference(model_data, _pick_device())
|
| 122 |
uvr5_model.load_model(model_path, 1)
|
| 123 |
return uvr5_model
|
| 124 |
|