Format code (#624)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
04d7813486
commit
fad31f24f5
@ -63,7 +63,8 @@ class Config:
|
|||||||
# check `getattr` and try it for compatibility
|
# check `getattr` and try it for compatibility
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def has_mps() -> bool:
|
def has_mps() -> bool:
|
||||||
if not torch.backends.mps.is_available(): return False
|
if not torch.backends.mps.is_available():
|
||||||
|
return False
|
||||||
try:
|
try:
|
||||||
torch.zeros(1).to(torch.device("mps"))
|
torch.zeros(1).to(torch.device("mps"))
|
||||||
return True
|
return True
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import os, sys, traceback
|
import os, sys, traceback
|
||||||
|
|
||||||
os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
|
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
|
||||||
|
|
||||||
# device=sys.argv[1]
|
# device=sys.argv[1]
|
||||||
n_part = int(sys.argv[2])
|
n_part = int(sys.argv[2])
|
||||||
|
@ -43,7 +43,9 @@ logging.getLogger("numba").setLevel(logging.WARNING)
|
|||||||
|
|
||||||
tmp = os.path.join(now_dir, "TEMP")
|
tmp = os.path.join(now_dir, "TEMP")
|
||||||
shutil.rmtree(tmp, ignore_errors=True)
|
shutil.rmtree(tmp, ignore_errors=True)
|
||||||
shutil.rmtree("%s/runtime/Lib/site-packages/lib.infer_pack" % (now_dir), ignore_errors=True)
|
shutil.rmtree(
|
||||||
|
"%s/runtime/Lib/site-packages/lib.infer_pack" % (now_dir), ignore_errors=True
|
||||||
|
)
|
||||||
shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True)
|
shutil.rmtree("%s/runtime/Lib/site-packages/uvr5_pack" % (now_dir), ignore_errors=True)
|
||||||
os.makedirs(tmp, exist_ok=True)
|
os.makedirs(tmp, exist_ok=True)
|
||||||
os.makedirs(os.path.join(now_dir, "logs"), exist_ok=True)
|
os.makedirs(os.path.join(now_dir, "logs"), exist_ok=True)
|
||||||
@ -328,6 +330,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
|||||||
)
|
)
|
||||||
if model_name == "onnx_dereverb_By_FoxJoy":
|
if model_name == "onnx_dereverb_By_FoxJoy":
|
||||||
from MDXNet import MDXNetDereverb
|
from MDXNet import MDXNetDereverb
|
||||||
|
|
||||||
pre_fun = MDXNetDereverb(15)
|
pre_fun = MDXNetDereverb(15)
|
||||||
else:
|
else:
|
||||||
func = _audio_pre_ if "DeEcho" not in model_name else _audio_pre_new
|
func = _audio_pre_ if "DeEcho" not in model_name else _audio_pre_new
|
||||||
|
@ -39,7 +39,9 @@ def get_f0_predictor(f0_predictor, hop_length, sampling_rate, **kargs):
|
|||||||
hop_length=hop_length, sampling_rate=sampling_rate
|
hop_length=hop_length, sampling_rate=sampling_rate
|
||||||
)
|
)
|
||||||
elif f0_predictor == "harvest":
|
elif f0_predictor == "harvest":
|
||||||
from lib.infer_pack.modules.F0Predictor.HarvestF0Predictor import HarvestF0Predictor
|
from lib.infer_pack.modules.F0Predictor.HarvestF0Predictor import (
|
||||||
|
HarvestF0Predictor,
|
||||||
|
)
|
||||||
|
|
||||||
f0_predictor_object = HarvestF0Predictor(
|
f0_predictor_object = HarvestF0Predictor(
|
||||||
hop_length=hop_length, sampling_rate=sampling_rate
|
hop_length=hop_length, sampling_rate=sampling_rate
|
||||||
|
Loading…
Reference in New Issue
Block a user