Skip to content

Commit

Permalink
remove small extract
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf committed Dec 27, 2024
1 parent cd9a451 commit e0820b2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 207 deletions.
72 changes: 0 additions & 72 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from rvc.lib.tools.prerequisites_download import prequisites_download_pipeline
from rvc.train.process.model_blender import model_blender
from rvc.train.process.model_information import model_information
from rvc.train.process.extract_small_model import extract_small_model
from rvc.lib.tools.analyzer import analyze_audio
from rvc.lib.tools.launch_tensorboard import launch_tensorboard_pipeline
from rvc.lib.tools.model_download import model_download_pipeline
Expand Down Expand Up @@ -584,22 +583,6 @@ def run_index_script(model_name: str, rvc_version: str, index_algorithm: str):
return f"Index file for {model_name} generated successfully."


# Model extract
def run_model_extract_script(
pth_path: str,
model_name: str,
sample_rate: int,
pitch_guidance: bool,
rvc_version: str,
epoch: int,
step: int,
):
extract_small_model(
pth_path, model_name, sample_rate, pitch_guidance, rvc_version, epoch, step
)
return f"Model {model_name} extracted successfully."


# Model information
def run_model_information_script(pth_path: str):
print(model_information(pth_path))
Expand Down Expand Up @@ -2149,51 +2132,6 @@ def parse_arguments():
required=False,
)

# Parser for 'model_extract' mode
model_extract_parser = subparsers.add_parser(
"model_extract", help="Extract a specific epoch from a trained model."
)
model_extract_parser.add_argument(
"--pth_path", type=str, help="Path to the main .pth model file.", required=True
)
model_extract_parser.add_argument(
"--model_name", type=str, help="Name of the model.", required=True
)
model_extract_parser.add_argument(
"--sample_rate",
type=int,
help="Sampling rate of the extracted model.",
choices=[32000, 40000, 48000],
required=True,
)
model_extract_parser.add_argument(
"--pitch_guidance",
type=lambda x: bool(strtobool(x)),
choices=[True, False],
help="Enable or disable pitch guidance for the extracted model.",
required=True,
)
model_extract_parser.add_argument(
"--rvc_version",
type=str,
help="Version of the extracted RVC model ('v1' or 'v2').",
choices=["v1", "v2"],
default="v2",
)
model_extract_parser.add_argument(
"--epoch",
type=int,
help="Epoch number to extract from the model.",
choices=range(1, 10001),
required=True,
)
model_extract_parser.add_argument(
"--step",
type=str,
help="Step number to extract from the model (optional).",
required=False,
)

# Parser for 'model_information' mode
model_information_parser = subparsers.add_parser(
"model_information", help="Display information about a trained model."
Expand Down Expand Up @@ -2516,16 +2454,6 @@ def main():
rvc_version=args.rvc_version,
index_algorithm=args.index_algorithm,
)
elif args.mode == "model_extract":
run_model_extract_script(
pth_path=args.pth_path,
model_name=args.model_name,
sample_rate=args.sample_rate,
pitch_guidance=args.pitch_guidance,
rvc_version=args.rvc_version,
epoch=args.epoch,
step=args.step,
)
elif args.mode == "model_information":
run_model_information_script(
pth_path=args.pth_path,
Expand Down
135 changes: 0 additions & 135 deletions rvc/train/process/extract_small_model.py

This file was deleted.

0 comments on commit e0820b2

Please sign in to comment.