Skip to content

Commit ba5572b

Browse files
committed
typo&fix: remove unnecessary is_hp3 check
1 parent 9ee9f5f commit ba5572b

File tree

9 files changed

+12
-19
lines changed

9 files changed

+12
-19
lines changed

infer/lib/rvcmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def check_model(
4848
def check_all_assets(update=False) -> bool:
4949
BASE_DIR = Path(__file__).resolve().parent.parent.parent
5050

51-
logger.info("checking hubret & rmvpe...")
51+
logger.info("checking hubert & rmvpe...")
5252

5353
if not check_model(
5454
BASE_DIR / "assets" / "hubert",

infer/modules/uvr5/mdxnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,5 @@ def __init__(self, chunks, device):
239239
self.pred = Predictor(self)
240240
self.device = device
241241

242-
def _path_audio_(self, input, vocal_root, others_root, format, is_hp3=False):
242+
def _path_audio_(self, input, vocal_root, others_root, format):
243243
self.pred.prediction(input, vocal_root, others_root, format)

infer/modules/uvr5/modules.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
3636
device=config.device,
3737
is_half=config.is_half,
3838
)
39-
is_hp3 = "HP3" in model_name
4039
if inp_root != "":
4140
paths = [os.path.join(inp_root, name) for name in os.listdir(inp_root)]
4241
else:
@@ -51,7 +50,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
5150
# Check the audio stream's properties
5251
if channels == 2 and rate == 44100:
5352
pre_fun._path_audio_(
54-
inp_path, save_root_ins, save_root_vocal, format0, is_hp3=is_hp3
53+
inp_path, save_root_ins, save_root_vocal, format0
5554
)
5655
need_reformat = 0
5756
done = 1

infer/modules/uvr5/vr.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, agg, model_path, device, is_half, tta=False):
4343
self.model = model
4444

4545
def _path_audio_(
46-
self, music_file, ins_root=None, vocal_root=None, format="flac", is_hp3=False
46+
self, music_file, ins_root=None, vocal_root=None, format="flac"
4747
):
4848
if ins_root is None and vocal_root is None:
4949
return "No save root."
@@ -123,10 +123,7 @@ def _path_audio_(
123123
else:
124124
wav_instrument = spec_utils.cmb_spectrogram_to_wave(y_spec_m, self.mp)
125125
logger.info("%s instruments done" % name)
126-
if is_hp3 == True:
127-
head = "vocal_"
128-
else:
129-
head = "instrument_"
126+
head = "instrument_"
130127
if format in ["wav", "flac"]:
131128
sf.write(
132129
os.path.join(
@@ -149,10 +146,7 @@ def _path_audio_(
149146
opt_format_path = path[:-4] + ".%s" % format
150147
downsample_audio(path, opt_format_path, format)
151148
if vocal_root is not None:
152-
if is_hp3 == True:
153-
head = "instrument_"
154-
else:
155-
head = "vocal_"
149+
head = "vocal_"
156150
if self.data["high_end_process"].startswith("mirroring"):
157151
input_high_end_ = spec_utils.mirroring(
158152
self.data["high_end_process"], v_spec_m, input_high_end, self.mp
@@ -213,7 +207,7 @@ def __init__(self, agg, model_path, device, is_half, tta=False):
213207
self.model = model
214208

215209
def _path_audio_(
216-
self, music_file, vocal_root=None, ins_root=None, format="flac", is_hp3=False
210+
self, music_file, vocal_root=None, ins_root=None, format="flac"
217211
): # 3个VR模型vocal和ins是反的
218212
if ins_root is None and vocal_root is None:
219213
return "No save root."

requirements/amd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ joblib>=1.1.0
33
numba==0.56.4
44
numpy==1.23.5
55
scipy
6-
librosa==0.10.2
6+
librosa>=0.10.2
77
llvmlite==0.39.0
88
fairseq==0.12.2
99
faiss-cpu==1.7.3

requirements/dml.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ joblib>=1.1.0
22
numba==0.56.4
33
numpy==1.23.5
44
scipy
5-
librosa==0.10.2
5+
librosa>=0.10.2
66
llvmlite==0.39.0
77
fairseq==0.12.2
88
faiss-cpu==1.7.3

requirements/ipex.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ joblib>=1.1.0
77
numba==0.56.4
88
numpy==1.23.5
99
scipy
10-
librosa==0.10.2
10+
librosa>=0.10.2
1111
llvmlite==0.39.0
1212
fairseq==0.12.2
1313
faiss-cpu==1.7.3

requirements/main.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ joblib>=1.1.0
22
numba
33
numpy==1.23.5
44
scipy
5-
librosa==0.10.2
5+
librosa>=0.10.2
66
llvmlite
77
fairseq
88
faiss-cpu

requirements/py311.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ joblib>=1.1.0
22
numba
33
numpy
44
scipy
5-
librosa==0.10.2
5+
librosa>=0.10.2
66
llvmlite
77
fairseq @ git+https://github.com/One-sixth/fairseq.git
88
faiss-cpu

0 commit comments

Comments
 (0)