Skip to content

Commit ed8a0c3

Browse files
chore(format): run black on dev (#55)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c51a73f commit ed8a0c3

File tree

8 files changed

+14
-3
lines changed

8 files changed

+14
-3
lines changed

configs/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from multiprocessing import cpu_count
77

88
import torch
9+
910
# TODO: move device selection into rvc
1011
import logging
1112

rvc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from . import ipex
22
import sys
3-
del sys.modules["rvc.ipex"]
43

4+
del sys.modules["rvc.ipex"]

rvc/f0/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import torch
22

3-
def get_rmvpe(model_path="assets/rmvpe/rmvpe.pt", device=torch.device("cpu"), is_half=False):
3+
4+
def get_rmvpe(
5+
model_path="assets/rmvpe/rmvpe.pt", device=torch.device("cpu"), is_half=False
6+
):
47
from rvc.f0.e2e import E2E
58

69
model = E2E(4, 1, (2, 2))

rvc/f0/rmvpe.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def rmvpe_jit_export(
3636
save_pickle(ckpt, save_path)
3737
return ckpt
3838

39+
3940
class RMVPE(F0Predictor):
4041
def __init__(
4142
self,
@@ -80,6 +81,7 @@ def __init__(
8081
providers=["DmlExecutionProvider"],
8182
)
8283
else:
84+
8385
def rmvpe_jit_model():
8486
ckpt = get_jit_model(model_path, is_half, self.device, rmvpe_jit_export)
8587
model = torch.jit.load(BytesIO(ckpt["model"]), map_location=self.device)

rvc/ipex/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
try:
22
import torch
3+
34
if torch.xpu.is_available():
45
from .init import ipex_init
6+
57
ipex_init()
68
from .gradscaler import gradscaler_init
79
except Exception: # pylint: disable=broad-exception-caught

rvc/jit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .jit import load_inputs, get_jit_model, export_jit_model, save_pickle
1+
from .jit import load_inputs, get_jit_model, export_jit_model, save_pickle

rvc/jit/jit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def save_pickle(ckpt: dict, save_path: str):
1515
with open(save_path, "wb") as f:
1616
pickle.dump(ckpt, f)
1717

18+
1819
def load_inputs(path: torch.serialization.FILE_LIKE, device: str, is_half=False):
1920
parm = torch.load(path, map_location=torch.device("cpu"))
2021
for key in parm.keys():
@@ -25,6 +26,7 @@ def load_inputs(path: torch.serialization.FILE_LIKE, device: str, is_half=False)
2526
parm[key] = parm[key].float()
2627
return parm
2728

29+
2830
def export_jit_model(
2931
model: torch.nn.Module,
3032
mode: str = "trace",

rvc/synthesizer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def load_synthesizer(
3535
device,
3636
)
3737

38+
3839
def synthesizer_jit_export(
3940
model_path: str,
4041
mode: str = "script",

0 commit comments

Comments
 (0)