Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ def prepare_output_dir(input_file, output_dir):
|
|
141 |
raise RuntimeError(f"Failed to prepare output directory {out_dir}: {e}")
|
142 |
return out_dir
|
143 |
|
144 |
-
def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, pitch_shift, model_dir, out_dir, out_format, norm_thresh, amp_thresh, batch_size, progress=gr.Progress(
|
145 |
"""Separate audio using Roformer model."""
|
146 |
base_name = os.path.splitext(os.path.basename(audio))[0]
|
147 |
print_message(audio, model_key)
|
@@ -212,7 +212,7 @@ def mdx23c_separator(audio, model, seg_size, override_seg_size, overlap, pitch_s
|
|
212 |
except Exception as e:
|
213 |
raise RuntimeError(f"MDX23C separation failed: {e}") from e
|
214 |
|
215 |
-
def mdx_separator(audio, model, hop_length, seg_size, overlap, denoise, model_dir, out_dir, out_format, norm_thresh, amp_thresh, batch_size, progress=gr.Progress(
|
216 |
"""Separate audio using MDX-NET model."""
|
217 |
base_name = os.path.splitext(os.path.basename(audio))[0]
|
218 |
print_message(audio, model)
|
@@ -247,7 +247,7 @@ def mdx_separator(audio, model, hop_length, seg_size, overlap, denoise, model_di
|
|
247 |
except Exception as e:
|
248 |
raise RuntimeError(f"MDX-NET separation failed: {e}") from e
|
249 |
|
250 |
-
def vr_separator(audio, model, window_size, aggression, tta, post_process, post_process_threshold, high_end_process, model_dir, out_dir, out_format, norm_thresh, amp_thresh, batch_size, progress=gr.Progress(
|
251 |
"""Separate audio using VR ARCH model."""
|
252 |
base_name = os.path.splitext(os.path.basename(audio))[0]
|
253 |
print_message(audio, model)
|
@@ -284,7 +284,7 @@ def vr_separator(audio, model, window_size, aggression, tta, post_process, post_
|
|
284 |
except Exception as e:
|
285 |
raise RuntimeError(f"VR ARCH separation failed: {e}") from e
|
286 |
|
287 |
-
def demucs_separator(audio, model, seg_size, shifts, overlap, segments_enabled, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress(
|
288 |
"""Separate audio using Demucs model."""
|
289 |
print_message(audio, model)
|
290 |
try:
|
@@ -441,8 +441,8 @@ with gr.Blocks(
|
|
441 |
batch_size = gr.Slider(minimum=1, maximum=16, step=1, value=1, label="Batch Size", info="Larger consumes more RAM but may process slightly faster.")
|
442 |
with gr.Tab("Credits"):
|
443 |
gr.Markdown("""
|
444 |
-
Politrees - gradio webui
|
445 |
-
theNeodev - mod the ui
|
446 |
nomadkaraoke - original project
|
447 |
""")
|
448 |
|
|
|
141 |
raise RuntimeError(f"Failed to prepare output directory {out_dir}: {e}")
|
142 |
return out_dir
|
143 |
|
144 |
+
def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, pitch_shift, model_dir, out_dir, out_format, norm_thresh, amp_thresh, batch_size, progress=gr.Progress()):
|
145 |
"""Separate audio using Roformer model."""
|
146 |
base_name = os.path.splitext(os.path.basename(audio))[0]
|
147 |
print_message(audio, model_key)
|
|
|
212 |
except Exception as e:
|
213 |
raise RuntimeError(f"MDX23C separation failed: {e}") from e
|
214 |
|
215 |
+
def mdx_separator(audio, model, hop_length, seg_size, overlap, denoise, model_dir, out_dir, out_format, norm_thresh, amp_thresh, batch_size, progress=gr.Progress()):
|
216 |
"""Separate audio using MDX-NET model."""
|
217 |
base_name = os.path.splitext(os.path.basename(audio))[0]
|
218 |
print_message(audio, model)
|
|
|
247 |
except Exception as e:
|
248 |
raise RuntimeError(f"MDX-NET separation failed: {e}") from e
|
249 |
|
250 |
+
def vr_separator(audio, model, window_size, aggression, tta, post_process, post_process_threshold, high_end_process, model_dir, out_dir, out_format, norm_thresh, amp_thresh, batch_size, progress=gr.Progress()):
|
251 |
"""Separate audio using VR ARCH model."""
|
252 |
base_name = os.path.splitext(os.path.basename(audio))[0]
|
253 |
print_message(audio, model)
|
|
|
284 |
except Exception as e:
|
285 |
raise RuntimeError(f"VR ARCH separation failed: {e}") from e
|
286 |
|
287 |
+
def demucs_separator(audio, model, seg_size, shifts, overlap, segments_enabled, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress()):
|
288 |
"""Separate audio using Demucs model."""
|
289 |
print_message(audio, model)
|
290 |
try:
|
|
|
441 |
batch_size = gr.Slider(minimum=1, maximum=16, step=1, value=1, label="Batch Size", info="Larger consumes more RAM but may process slightly faster.")
|
442 |
with gr.Tab("Credits"):
|
443 |
gr.Markdown("""
|
444 |
+
Politrees - gradio webui\n
|
445 |
+
theNeodev - mod the ui\n
|
446 |
nomadkaraoke - original project
|
447 |
""")
|
448 |
|