Skip to content

Commit

Permalink
remove unnecessary preprocess overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf committed Dec 27, 2024
1 parent 0f98c61 commit 4770fc8
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions rvc/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ def set_precision(self, precision):
raise ValueError("Invalid precision type. Must be 'fp32' or 'fp16'.")

fp16_run_value = precision == "fp16"
preprocess_target_version = "3.7" if precision == "fp16" else "3.0"
preprocess_path = os.path.join(
os.path.dirname(__file__),
os.pardir,
"rvc",
"train",
"preprocess",
"preprocess.py",
)

for config_path in version_config_paths:
full_config_path = os.path.join("rvc", "configs", config_path)
Expand All @@ -73,16 +64,7 @@ def set_precision(self, precision):
except FileNotFoundError:
print(f"File not found: {full_config_path}")

if os.path.exists(preprocess_path):
with open(preprocess_path, "r") as f:
preprocess_content = f.read()
preprocess_content = preprocess_content.replace(
"3.0" if precision == "fp16" else "3.7", preprocess_target_version
)
with open(preprocess_path, "w") as f:
f.write(preprocess_content)

return f"Overwritten preprocess and config.json to use {precision}."
return f"Overwritten config to use {precision}."

def get_precision(self):
if not version_config_paths:
Expand Down

0 comments on commit 4770fc8

Please sign in to comment.