mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 19:15:04 +08:00
Merge branch 'clean' of https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI into clean
This commit is contained in:
commit
8d432964a8
@ -148,28 +148,51 @@ class Config:
|
|||||||
x_max = 32
|
x_max = 32
|
||||||
if self.dml:
|
if self.dml:
|
||||||
print("use DirectML instead")
|
print("use DirectML instead")
|
||||||
if os.path.exists("runtime\Lib\site-packages\onnxruntime\capi\DirectML.dll")==False:
|
if (
|
||||||
|
os.path.exists(
|
||||||
|
"runtime\Lib\site-packages\onnxruntime\capi\DirectML.dll"
|
||||||
|
)
|
||||||
|
== False
|
||||||
|
):
|
||||||
try:
|
try:
|
||||||
os.rename("runtime\Lib\site-packages\onnxruntime", "runtime\Lib\site-packages\onnxruntime-cuda")
|
os.rename(
|
||||||
|
"runtime\Lib\site-packages\onnxruntime",
|
||||||
|
"runtime\Lib\site-packages\onnxruntime-cuda",
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
os.rename("runtime\Lib\site-packages\onnxruntime-dml", "runtime\Lib\site-packages\onnxruntime")
|
os.rename(
|
||||||
|
"runtime\Lib\site-packages\onnxruntime-dml",
|
||||||
|
"runtime\Lib\site-packages\onnxruntime",
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
import torch_directml
|
import torch_directml
|
||||||
|
|
||||||
self.device = torch_directml.device(torch_directml.default_device())
|
self.device = torch_directml.device(torch_directml.default_device())
|
||||||
self.is_half = False
|
self.is_half = False
|
||||||
else:
|
else:
|
||||||
if self.instead:
|
if self.instead:
|
||||||
print(f"use {self.instead} instead")
|
print(f"use {self.instead} instead")
|
||||||
if(os.path.exists("runtime\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll")==False):
|
if (
|
||||||
|
os.path.exists(
|
||||||
|
"runtime\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
|
||||||
|
)
|
||||||
|
== False
|
||||||
|
):
|
||||||
try:
|
try:
|
||||||
os.rename("runtime\Lib\site-packages\onnxruntime", "runtime\Lib\site-packages\onnxruntime-dml")
|
os.rename(
|
||||||
|
"runtime\Lib\site-packages\onnxruntime",
|
||||||
|
"runtime\Lib\site-packages\onnxruntime-dml",
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
os.rename("runtime\Lib\site-packages\onnxruntime-cuda", "runtime\Lib\site-packages\onnxruntime")
|
os.rename(
|
||||||
|
"runtime\Lib\site-packages\onnxruntime-cuda",
|
||||||
|
"runtime\Lib\site-packages\onnxruntime",
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return x_pad, x_query, x_center, x_max
|
return x_pad, x_query, x_center, x_max
|
||||||
|
@ -239,7 +239,10 @@ def vc_single(
|
|||||||
times[0],
|
times[0],
|
||||||
times[1],
|
times[1],
|
||||||
times[2],
|
times[2],
|
||||||
), (resample_sr if resample_sr >= 16000 and tgt_sr != resample_sr else tgt_sr, audio_opt)
|
), (
|
||||||
|
resample_sr if resample_sr >= 16000 and tgt_sr != resample_sr else tgt_sr,
|
||||||
|
audio_opt,
|
||||||
|
)
|
||||||
except:
|
except:
|
||||||
info = traceback.format_exc()
|
info = traceback.format_exc()
|
||||||
print(info)
|
print(info)
|
||||||
|
Loading…
Reference in New Issue
Block a user