Format code (#1136)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
2419d5e1a9
commit
ce8177a932
@ -181,7 +181,7 @@ class Config:
|
||||
)
|
||||
except:
|
||||
pass
|
||||
#if self.device != "cpu":
|
||||
# if self.device != "cpu":
|
||||
import torch_directml
|
||||
|
||||
self.device = torch_directml.device(torch_directml.default_device())
|
||||
|
@ -1,4 +1,5 @@
|
||||
import os,sys
|
||||
import os, sys
|
||||
|
||||
now_dir = os.getcwd()
|
||||
sys.path.append(now_dir)
|
||||
import logging
|
||||
|
@ -1,4 +1,4 @@
|
||||
import pdb,os
|
||||
import pdb, os
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
@ -577,7 +577,8 @@ class RMVPE:
|
||||
import onnxruntime as ort
|
||||
|
||||
ort_session = ort.InferenceSession(
|
||||
"%s/rmvpe.onnx"%os.environ["rmvpe_root"], providers=["DmlExecutionProvider"]
|
||||
"%s/rmvpe.onnx" % os.environ["rmvpe_root"],
|
||||
providers=["DmlExecutionProvider"],
|
||||
)
|
||||
self.model = ort_session
|
||||
else:
|
||||
|
@ -139,9 +139,13 @@ class Pipeline(object):
|
||||
if not hasattr(self, "model_rmvpe"):
|
||||
from infer.lib.rmvpe import RMVPE
|
||||
|
||||
print("loading rmvpe model,%s"%"%s/rmvpe.pt"%os.environ["rmvpe_root"])
|
||||
print(
|
||||
"loading rmvpe model,%s" % "%s/rmvpe.pt" % os.environ["rmvpe_root"]
|
||||
)
|
||||
self.model_rmvpe = RMVPE(
|
||||
"%s/rmvpe.pt"%os.environ["rmvpe_root"], is_half=self.is_half, device=self.device
|
||||
"%s/rmvpe.pt" % os.environ["rmvpe_root"],
|
||||
is_half=self.is_half,
|
||||
device=self.device,
|
||||
)
|
||||
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user