mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 01:10:22 +08:00
optimize(onnx): move infer into rvc.onnx
This commit is contained in:
@@ -211,27 +211,6 @@ class Config:
|
||||
x_max = 32
|
||||
if self.dml:
|
||||
logger.info("Use DirectML instead")
|
||||
if (
|
||||
os.path.exists(
|
||||
"runtime\Lib\site-packages\onnxruntime\capi\DirectML.dll"
|
||||
)
|
||||
== False
|
||||
):
|
||||
try:
|
||||
os.rename(
|
||||
"runtime\Lib\site-packages\onnxruntime",
|
||||
"runtime\Lib\site-packages\onnxruntime-cuda",
|
||||
)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
os.rename(
|
||||
"runtime\Lib\site-packages\onnxruntime-dml",
|
||||
"runtime\Lib\site-packages\onnxruntime",
|
||||
)
|
||||
except:
|
||||
pass
|
||||
# if self.device != "cpu":
|
||||
import torch_directml
|
||||
|
||||
self.device = torch_directml.device(torch_directml.default_device())
|
||||
@@ -239,26 +218,6 @@ class Config:
|
||||
else:
|
||||
if self.instead:
|
||||
logger.info(f"Use {self.instead} instead")
|
||||
if (
|
||||
os.path.exists(
|
||||
"runtime\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
|
||||
)
|
||||
== False
|
||||
):
|
||||
try:
|
||||
os.rename(
|
||||
"runtime\Lib\site-packages\onnxruntime",
|
||||
"runtime\Lib\site-packages\onnxruntime-dml",
|
||||
)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
os.rename(
|
||||
"runtime\Lib\site-packages\onnxruntime-cuda",
|
||||
"runtime\Lib\site-packages\onnxruntime",
|
||||
)
|
||||
except:
|
||||
pass
|
||||
logger.info(
|
||||
"Half-precision floating-point: %s, device: %s"
|
||||
% (self.is_half, self.device)
|
||||
|
||||
Reference in New Issue
Block a user