Format code (#1136)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2023-08-30 19:03:21 +08:00 committed by GitHub
parent 2419d5e1a9
commit ce8177a932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View File

@ -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())

View File

@ -1,4 +1,5 @@
import os,sys
import os, sys
now_dir = os.getcwd()
sys.path.append(now_dir)
import logging

View File

@ -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:

View File

@ -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)