Skip to content

Commit

Permalink
Merge pull request IAHispano#699 from IAHispano/formatter/main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Sep 12, 2024
2 parents 137b5a5 + 67f10ba commit 3ecdd6c
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions rvc/lib/tools/prerequisites_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,22 @@ def split_pretraineds(pretrained_list):
return f0_list, non_f0_list


pretraineds_v1_f0_list, pretraineds_v1_nof0_list = split_pretraineds(pretraineds_v1_list)
pretraineds_v2_f0_list, pretraineds_v2_nof0_list = split_pretraineds(pretraineds_v2_list)


def calculate_total_size(pretraineds_v1_f0, pretraineds_v1_nof0, pretraineds_v2_f0, pretraineds_v2_nof0, models, exe):
pretraineds_v1_f0_list, pretraineds_v1_nof0_list = split_pretraineds(
pretraineds_v1_list
)
pretraineds_v2_f0_list, pretraineds_v2_nof0_list = split_pretraineds(
pretraineds_v2_list
)


def calculate_total_size(
pretraineds_v1_f0,
pretraineds_v1_nof0,
pretraineds_v2_f0,
pretraineds_v2_nof0,
models,
exe,
):
"""
Calculate the total size of all files to be downloaded based on selected categories.
"""
Expand All @@ -147,7 +158,14 @@ def calculate_total_size(pretraineds_v1_f0, pretraineds_v1_nof0, pretraineds_v2_
return total_size


def prequisites_download_pipeline(pretraineds_v1_f0, pretraineds_v1_nof0, pretraineds_v2_f0, pretraineds_v2_nof0, models, exe):
def prequisites_download_pipeline(
pretraineds_v1_f0,
pretraineds_v1_nof0,
pretraineds_v2_f0,
pretraineds_v2_nof0,
models,
exe,
):
"""
Manage the download pipeline for different categories of files.
"""
Expand All @@ -157,7 +175,7 @@ def prequisites_download_pipeline(pretraineds_v1_f0, pretraineds_v1_nof0, pretra
pretraineds_v2_f0_list if pretraineds_v2_f0 else [],
pretraineds_v2_nof0_list if pretraineds_v2_nof0 else [],
models,
exe
exe,
)

if total_size > 0:
Expand Down

0 comments on commit 3ecdd6c

Please sign in to comment.