Skip to content

Commit

Permalink
Fix slider + no G & D models on dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf committed Jan 20, 2024
1 parent d8cfb1e commit c9cdf08
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
19 changes: 16 additions & 3 deletions tabs/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
os.path.join(root, file)
for root, _, files in os.walk(model_root, topdown=False)
for file in files
if file.endswith((".pth", ".onnx"))
if (
file.endswith((".pth", ".onnx"))
and not (file.startswith("G_") or file.startswith("D_"))
)
]

indexes_list = [
Expand Down Expand Up @@ -73,7 +76,10 @@ def change_choices():
os.path.join(root, file)
for root, _, files in os.walk(model_root, topdown=False)
for file in files
if file.endswith((".pth", ".onnx"))
if (
file.endswith((".pth", ".onnx"))
and not (file.startswith("G_") or file.startswith("D_"))
)
]

indexes_list = [
Expand Down Expand Up @@ -262,7 +268,14 @@ def inference_tab():
value=False,
interactive=True,
)
pitch = gr.Slider(-12, 12, 0, label=i18n("Pitch"))
pitch = gr.Slider(
minimum=-12,
maximum=12,
step=1,
label=i18n("Pitch"),
value=0,
interactive=True,
)
filter_radius = gr.Slider(
minimum=0,
maximum=7,
Expand Down
19 changes: 16 additions & 3 deletions tabs/tts/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
os.path.join(root, file)
for root, _, files in os.walk(model_root, topdown=False)
for file in files
if file.endswith((".pth", ".onnx"))
if (
file.endswith((".pth", ".onnx"))
and not (file.startswith("G_") or file.startswith("D_"))
)
]

indexes_list = [
Expand All @@ -64,7 +67,10 @@ def change_choices():
os.path.join(root, file)
for root, _, files in os.walk(model_root, topdown=False)
for file in files
if file.endswith((".pth", ".onnx"))
if (
file.endswith((".pth", ".onnx"))
and not (file.startswith("G_") or file.startswith("D_"))
)
]

indexes_list = [
Expand Down Expand Up @@ -251,7 +257,14 @@ def tts_tab():
interactive=True,
)

pitch = gr.Slider(-12, 12, 0, label=i18n("Pitch"))
pitch = gr.Slider(
minimum=-12,
maximum=12,
step=1,
label=i18n("Pitch"),
value=0,
interactive=True,
)
filter_radius = gr.Slider(
minimum=0,
maximum=7,
Expand Down

0 comments on commit c9cdf08

Please sign in to comment.