mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-01-04 14:05:04 +08:00
Apply Code Formatter Change
This commit is contained in:
parent
c25bb6c5d5
commit
cb42c6990b
@ -95,7 +95,11 @@ class Predictor:
|
|||||||
)
|
)
|
||||||
self.model = ort.InferenceSession(
|
self.model = ort.InferenceSession(
|
||||||
os.path.join(args.onnx, self.model_.target_name + ".onnx"),
|
os.path.join(args.onnx, self.model_.target_name + ".onnx"),
|
||||||
providers=["CUDAExecutionProvider", "DmlExecutionProvider", "CPUExecutionProvider"],
|
providers=[
|
||||||
|
"CUDAExecutionProvider",
|
||||||
|
"DmlExecutionProvider",
|
||||||
|
"CPUExecutionProvider",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
print("onnx load done")
|
print("onnx load done")
|
||||||
|
|
||||||
|
@ -27,7 +27,9 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
|||||||
func = AudioPre if "DeEcho" not in model_name else AudioPreDeEcho
|
func = AudioPre if "DeEcho" not in model_name else AudioPreDeEcho
|
||||||
pre_fun = func(
|
pre_fun = func(
|
||||||
agg=int(agg),
|
agg=int(agg),
|
||||||
model_path=os.path.join(os.getenv("weight_uvr5_root"), model_name + ".pth"),
|
model_path=os.path.join(
|
||||||
|
os.getenv("weight_uvr5_root"), model_name + ".pth"
|
||||||
|
),
|
||||||
device=config.device,
|
device=config.device,
|
||||||
is_half=config.is_half,
|
is_half=config.is_half,
|
||||||
)
|
)
|
||||||
@ -54,7 +56,10 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
|||||||
need_reformat = 1
|
need_reformat = 1
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
if need_reformat == 1:
|
if need_reformat == 1:
|
||||||
tmp_path = "%s/%s.reformatted.wav" % (os.path.join("tmp"), os.path.basename(inp_path))
|
tmp_path = "%s/%s.reformatted.wav" % (
|
||||||
|
os.path.join("tmp"),
|
||||||
|
os.path.basename(inp_path),
|
||||||
|
)
|
||||||
os.system(
|
os.system(
|
||||||
"ffmpeg -i %s -vn -acodec pcm_s16le -ac 2 -ar 44100 %s -y"
|
"ffmpeg -i %s -vn -acodec pcm_s16le -ac 2 -ar 44100 %s -y"
|
||||||
% (inp_path, tmp_path)
|
% (inp_path, tmp_path)
|
||||||
@ -89,4 +94,3 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
|||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
yield "\n".join(infos)
|
yield "\n".join(infos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user