LeonVonBerg commited on
Commit
e949e97
·
verified ·
1 Parent(s): b232540

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1529 -0
app.py ADDED
@@ -0,0 +1,1529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ import re
5
+ import platform
6
+ import torch
7
+ import logging
8
+ import yt_dlp
9
+ import json
10
+ import gradio as gr
11
+ import spaces
12
+ import assets.themes.loadThemes as loadThemes
13
+ from audio_separator.separator import Separator
14
+ from assets.i18n.i18n import I18nAuto
15
+ from argparse import ArgumentParser
16
+ from assets.presence.discord_presence import RPCManager, track_presence
17
+
18
+ i18n = I18nAuto()
19
+
20
+ now_dir = os.getcwd()
21
+ sys.path.append(now_dir)
22
+ config_file = os.path.join(now_dir, "assets", "config.json")
23
+
24
+ device = "cuda" if torch.cuda.is_available() else "cpu"
25
+ use_autocast = device == "cuda"
26
+
27
+ if os.path.isdir("env"):
28
+ if platform.system() == "Windows":
29
+ separator_location = ".\\env\\Scripts\\audio-separator.exe"
30
+ elif platform.system() == "Linux":
31
+ separator_location = "env/bin/audio-separator"
32
+ else:
33
+ separator_location = "audio-separator"
34
+
35
+ #=========================#
36
+ # Roformer Models #
37
+ #=========================#
38
+ roformer_models = {
39
+ 'BS-Roformer-Viperx-1297': 'model_bs_roformer_ep_317_sdr_12.9755.ckpt',
40
+ 'BS-Roformer-Viperx-1296': 'model_bs_roformer_ep_368_sdr_12.9628.ckpt',
41
+ 'BS-Roformer-Viperx-1053': 'model_bs_roformer_ep_937_sdr_10.5309.ckpt',
42
+ 'Mel-Roformer-Viperx-1143': 'model_mel_band_roformer_ep_3005_sdr_11.4360.ckpt',
43
+ 'BS-Roformer-De-Reverb': 'deverb_bs_roformer_8_384dim_10depth.ckpt',
44
+ 'Mel-Roformer-Crowd-Aufr33-Viperx': 'mel_band_roformer_crowd_aufr33_viperx_sdr_8.7144.ckpt',
45
+ 'Mel-Roformer-Denoise-Aufr33': 'denoise_mel_band_roformer_aufr33_sdr_27.9959.ckpt',
46
+ 'Mel-Roformer-Denoise-Aufr33-Aggr' : 'denoise_mel_band_roformer_aufr33_aggr_sdr_27.9768.ckpt',
47
+ 'Mel-Roformer-Karaoke-Aufr33-Viperx': 'mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt',
48
+ 'MelBand Roformer | Vocals by Kimberley Jensen' : 'vocals_mel_band_roformer.ckpt',
49
+ 'MelBand Roformer Kim | FT by unwa' : 'mel_band_roformer_kim_ft_unwa.ckpt',
50
+ 'MelBand Roformer Kim | Inst V1 by Unwa' : 'melband_roformer_inst_v1.ckpt',
51
+ 'MelBand Roformer Kim | Inst V1 (E) by Unwa' : 'melband_roformer_inst_v1e.ckpt',
52
+ 'MelBand Roformer Kim | Inst V2 by Unwa' : 'melband_roformer_inst_v2.ckpt',
53
+ 'MelBand Roformer Kim | InstVoc Duality V1 by Unwa' : 'melband_roformer_instvoc_duality_v1.ckpt',
54
+ 'MelBand Roformer Kim | InstVoc Duality V2 by Unwa' : 'melband_roformer_instvox_duality_v2.ckpt',
55
+ 'MelBand Roformer | De-Reverb by anvuew' : 'dereverb_mel_band_roformer_anvuew_sdr_19.1729.ckpt',
56
+ 'MelBand Roformer | De-Reverb Less Aggressive by anvuew' : 'dereverb_mel_band_roformer_less_aggressive_anvuew_sdr_18.8050.ckpt',
57
+ 'MelBand Roformer | De-Reverb-Echo by Sucial' : 'dereverb-echo_mel_band_roformer_sdr_10.0169.ckpt',
58
+ 'MelBand Roformer | De-Reverb-Echo V2 by Sucial' : 'dereverb-echo_mel_band_roformer_sdr_13.4843_v2.ckpt',
59
+ 'MelBand Roformer Kim | SYHFT by SYH99999' : 'MelBandRoformerSYHFT.ckpt',
60
+ 'MelBand Roformer Kim | SYHFT V2 by SYH99999' : 'MelBandRoformerSYHFTV2.ckpt',
61
+ 'MelBand Roformer Kim | SYHFT V2.5 by SYH99999' : 'MelBandRoformerSYHFTV2.5.ckpt',
62
+ 'MelBand Roformer Kim | SYHFT V3 by SYH99999' : 'MelBandRoformerSYHFTV3Epsilon.ckpt',
63
+ 'MelBand Roformer Kim | Big SYHFT V1 by SYH99999' : 'MelBandRoformerBigSYHFTV1.ckpt',
64
+ 'MelBand Roformer Kim | Big Beta 4 FT by unwa' : 'melband_roformer_big_beta4.ckpt',
65
+ 'MelBand Roformer Kim | Big Beta 5e FT by unwa' : 'melband_roformer_big_beta5e.ckpt',
66
+ 'BS Roformer | Chorus Male-Female by Sucial' : 'model_chorus_bs_roformer_ep_267_sdr_24.1275.ckpt',
67
+ 'MelBand Roformer | Aspiration by Sucial' : 'aspiration_mel_band_roformer_sdr_18.9845.ckpt',
68
+ 'MelBand Roformer | Aspiration Less Aggressive by Sucial' : 'aspiration_mel_band_roformer_less_aggr_sdr_18.1201.ckpt',
69
+ 'MelBand Roformer | Bleed Suppressor V1 by unwa-97chris' : 'mel_band_roformer_bleed_suppressor_v1.ckpt'
70
+ }
71
+
72
+ #=========================#
73
+ # MDX23C Models #
74
+ #=========================#
75
+ mdx23c_models = [
76
+ 'MDX23C_D1581.ckpt',
77
+ 'MDX23C-8KFFT-InstVoc_HQ.ckpt',
78
+ 'MDX23C-8KFFT-InstVoc_HQ_2.ckpt',
79
+ 'MDX23C-De-Reverb-aufr33-jarredou.ckpt',
80
+ 'MDX23C-DrumSep-aufr33-jarredou.ckpt'
81
+ ]
82
+
83
+ #=========================#
84
+ # MDXN-NET Models #
85
+ #=========================#
86
+ mdxnet_models = [
87
+ 'UVR-MDX-NET-Inst_full_292.onnx',
88
+ 'UVR-MDX-NET_Inst_187_beta.onnx',
89
+ 'UVR-MDX-NET_Inst_82_beta.onnx',
90
+ 'UVR-MDX-NET_Inst_90_beta.onnx',
91
+ 'UVR-MDX-NET_Main_340.onnx',
92
+ 'UVR-MDX-NET_Main_390.onnx',
93
+ 'UVR-MDX-NET_Main_406.onnx',
94
+ 'UVR-MDX-NET_Main_427.onnx',
95
+ 'UVR-MDX-NET_Main_438.onnx',
96
+ 'UVR-MDX-NET-Inst_HQ_1.onnx',
97
+ 'UVR-MDX-NET-Inst_HQ_2.onnx',
98
+ 'UVR-MDX-NET-Inst_HQ_3.onnx',
99
+ 'UVR-MDX-NET-Inst_HQ_4.onnx',
100
+ 'UVR-MDX-NET-Inst_HQ_5.onnx',
101
+ 'UVR_MDXNET_Main.onnx',
102
+ 'UVR-MDX-NET-Inst_Main.onnx',
103
+ 'UVR_MDXNET_1_9703.onnx',
104
+ 'UVR_MDXNET_2_9682.onnx',
105
+ 'UVR_MDXNET_3_9662.onnx',
106
+ 'UVR-MDX-NET-Inst_1.onnx',
107
+ 'UVR-MDX-NET-Inst_2.onnx',
108
+ 'UVR-MDX-NET-Inst_3.onnx',
109
+ 'UVR_MDXNET_KARA.onnx',
110
+ 'UVR_MDXNET_KARA_2.onnx',
111
+ 'UVR_MDXNET_9482.onnx',
112
+ 'UVR-MDX-NET-Voc_FT.onnx',
113
+ 'Kim_Vocal_1.onnx',
114
+ 'Kim_Vocal_2.onnx',
115
+ 'Kim_Inst.onnx',
116
+ 'Reverb_HQ_By_FoxJoy.onnx',
117
+ 'UVR-MDX-NET_Crowd_HQ_1.onnx',
118
+ 'kuielab_a_vocals.onnx',
119
+ 'kuielab_a_other.onnx',
120
+ 'kuielab_a_bass.onnx',
121
+ 'kuielab_a_drums.onnx',
122
+ 'kuielab_b_vocals.onnx',
123
+ 'kuielab_b_other.onnx',
124
+ 'kuielab_b_bass.onnx',
125
+ 'kuielab_b_drums.onnx',
126
+ ]
127
+
128
+ #========================#
129
+ # VR-ARCH Models #
130
+ #========================#
131
+ vrarch_models = [
132
+ '1_HP-UVR.pth',
133
+ '2_HP-UVR.pth',
134
+ '3_HP-Vocal-UVR.pth',
135
+ '4_HP-Vocal-UVR.pth',
136
+ '5_HP-Karaoke-UVR.pth',
137
+ '6_HP-Karaoke-UVR.pth',
138
+ '7_HP2-UVR.pth',
139
+ '8_HP2-UVR.pth',
140
+ '9_HP2-UVR.pth',
141
+ '10_SP-UVR-2B-32000-1.pth',
142
+ '11_SP-UVR-2B-32000-2.pth',
143
+ '12_SP-UVR-3B-44100.pth',
144
+ '13_SP-UVR-4B-44100-1.pth',
145
+ '14_SP-UVR-4B-44100-2.pth',
146
+ '15_SP-UVR-MID-44100-1.pth',
147
+ '16_SP-UVR-MID-44100-2.pth',
148
+ '17_HP-Wind_Inst-UVR.pth',
149
+ 'UVR-De-Echo-Aggressive.pth',
150
+ 'UVR-De-Echo-Normal.pth',
151
+ 'UVR-DeEcho-DeReverb.pth',
152
+ 'UVR-De-Reverb-aufr33-jarredou.pth',
153
+ 'UVR-DeNoise-Lite.pth',
154
+ 'UVR-DeNoise.pth',
155
+ 'UVR-BVE-4B_SN-44100-1.pth',
156
+ 'MGM_HIGHEND_v4.pth',
157
+ 'MGM_LOWEND_A_v4.pth',
158
+ 'MGM_LOWEND_B_v4.pth',
159
+ 'MGM_MAIN_v4.pth',
160
+ ]
161
+
162
+ #=======================#
163
+ # DEMUCS Models #
164
+ #=======================#
165
+ demucs_models = [
166
+ 'htdemucs_ft.yaml',
167
+ 'htdemucs_6s.yaml',
168
+ 'htdemucs.yaml',
169
+ 'hdemucs_mmi.yaml',
170
+ ]
171
+
172
+ output_format = [
173
+ 'wav',
174
+ 'flac',
175
+ 'mp3',
176
+ 'ogg',
177
+ 'opus',
178
+ 'm4a',
179
+ 'aiff',
180
+ 'ac3'
181
+ ]
182
+
183
+ found_files = []
184
+ logs = []
185
+ out_dir = "./outputs"
186
+ models_dir = "./models"
187
+ extensions = (".wav", ".flac", ".mp3", ".ogg", ".opus", ".m4a", ".aiff", ".ac3")
188
+
189
+ def load_config_presence():
190
+ with open(config_file, "r", encoding="utf8") as file:
191
+ config = json.load(file)
192
+ return config["discord_presence"]
193
+
194
+ def initialize_presence():
195
+ if load_config_presence():
196
+ RPCManager.start_presence()
197
+
198
+ initialize_presence()
199
+
200
+ def download_audio(url, output_dir="ytdl"):
201
+
202
+ os.makedirs(output_dir, exist_ok=True)
203
+
204
+ ydl_opts = {
205
+ 'format': 'bestaudio/best',
206
+ 'postprocessors': [{
207
+ 'key': 'FFmpegExtractAudio',
208
+ 'preferredcodec': 'wav',
209
+ 'preferredquality': '32',
210
+ }],
211
+ 'outtmpl': os.path.join(output_dir, '%(title)s.%(ext)s'),
212
+ 'postprocessor_args': [
213
+ '-acodec', 'pcm_f32le'
214
+ ],
215
+ }
216
+
217
+ try:
218
+ with yt_dlp.YoutubeDL(ydl_opts) as ydl:
219
+ info = ydl.extract_info(url, download=False)
220
+ video_title = info['title']
221
+
222
+ ydl.download([url])
223
+
224
+ file_path = os.path.join(output_dir, f"{video_title}.wav")
225
+
226
+ if os.path.exists(file_path):
227
+ return os.path.abspath(file_path)
228
+ else:
229
+ raise Exception("Something went wrong")
230
+
231
+ except Exception as e:
232
+ raise Exception(f"Error extracting audio with yt-dlp: {str(e)}")
233
+
234
+ def leaderboard(list_filter):
235
+ try:
236
+ result = subprocess.run(
237
+ [separator_location, "-l", f"--list_filter={list_filter}"],
238
+ capture_output=True,
239
+ text=True,
240
+ )
241
+ if result.returncode != 0:
242
+ return f"Error: {result.stderr}"
243
+
244
+ return "<table border='1'>" + "".join(
245
+ f"<tr style='{'font-weight: bold; font-size: 1.2em;' if i == 0 else ''}'>" +
246
+ "".join(f"<td>{cell}</td>" for cell in re.split(r"\s{2,}", line.strip())) +
247
+ "</tr>"
248
+ for i, line in enumerate(re.findall(r"^(?!-+)(.+)$", result.stdout.strip(), re.MULTILINE))
249
+ ) + "</table>"
250
+
251
+ except Exception as e:
252
+ return f"Error: {e}"
253
+
254
+ @track_presence("Performing BS/Mel Roformer Separation")
255
+ @spaces.GPU(duration=60)
256
+ def roformer_separator(audio, model_key, out_format, segment_size, override_seg_size, overlap, batch_size, norm_thresh, amp_thresh, single_stem, progress=gr.Progress(track_tqdm=True)):
257
+ base_name = os.path.splitext(os.path.basename(audio))[0]
258
+ roformer_model = roformer_models[model_key]
259
+ try:
260
+ separator = Separator(
261
+ log_level=logging.WARNING,
262
+ model_file_dir=models_dir,
263
+ output_dir=out_dir,
264
+ output_format=out_format,
265
+ use_autocast=use_autocast,
266
+ normalization_threshold=norm_thresh,
267
+ amplification_threshold=amp_thresh,
268
+ output_single_stem=single_stem,
269
+ mdxc_params={
270
+ "segment_size": segment_size,
271
+ "override_model_segment_size": override_seg_size,
272
+ "batch_size": batch_size,
273
+ "overlap": overlap,
274
+ }
275
+ )
276
+
277
+ progress(0.2, desc="Loading model...")
278
+ separator.load_model(model_filename=roformer_model)
279
+
280
+ progress(0.7, desc="Separating audio...")
281
+ separation = separator.separate(audio)
282
+
283
+ stems = [os.path.join(out_dir, file_name) for file_name in separation]
284
+
285
+ if single_stem.strip():
286
+ return stems[0], None
287
+
288
+ return stems[0], stems[1]
289
+
290
+ except Exception as e:
291
+ raise RuntimeError(f"Roformer separation failed: {e}") from e
292
+
293
+ @track_presence("Performing MDXC Separationn")
294
+ @spaces.GPU(duration=60)
295
+ def mdxc_separator(audio, model, out_format, segment_size, override_seg_size, overlap, batch_size, norm_thresh, amp_thresh, single_stem, progress=gr.Progress(track_tqdm=True)):
296
+ base_name = os.path.splitext(os.path.basename(audio))[0]
297
+ try:
298
+ separator = Separator(
299
+ log_level=logging.WARNING,
300
+ model_file_dir=models_dir,
301
+ output_dir=out_dir,
302
+ output_format=out_format,
303
+ use_autocast=use_autocast,
304
+ normalization_threshold=norm_thresh,
305
+ amplification_threshold=amp_thresh,
306
+ output_single_stem=single_stem,
307
+ mdxc_params={
308
+ "segment_size": segment_size,
309
+ "override_model_segment_size": override_seg_size,
310
+ "batch_size": batch_size,
311
+ "overlap": overlap,
312
+ }
313
+ )
314
+
315
+ progress(0.2, desc="Loading model...")
316
+ separator.load_model(model_filename=model)
317
+
318
+ progress(0.7, desc="Separating audio...")
319
+ separation = separator.separate(audio)
320
+
321
+ stems = [os.path.join(out_dir, file_name) for file_name in separation]
322
+
323
+ if single_stem.strip():
324
+ return stems[0], None
325
+
326
+ return stems[0], stems[1]
327
+
328
+ except Exception as e:
329
+ raise RuntimeError(f"MDX23C separation failed: {e}") from e
330
+
331
+ @track_presence("Performing MDX-NET Separation")
332
+ @spaces.GPU(duration=60)
333
+ def mdxnet_separator(audio, model, out_format, hop_length, segment_size, denoise, overlap, batch_size, norm_thresh, amp_thresh, single_stem, progress=gr.Progress(track_tqdm=True)):
334
+ base_name = os.path.splitext(os.path.basename(audio))[0]
335
+ try:
336
+ separator = Separator(
337
+ log_level=logging.WARNING,
338
+ model_file_dir=models_dir,
339
+ output_dir=out_dir,
340
+ output_format=out_format,
341
+ use_autocast=use_autocast,
342
+ normalization_threshold=norm_thresh,
343
+ amplification_threshold=amp_thresh,
344
+ output_single_stem=single_stem,
345
+ mdx_params={
346
+ "hop_length": hop_length,
347
+ "segment_size": segment_size,
348
+ "overlap": overlap,
349
+ "batch_size": batch_size,
350
+ "enable_denoise": denoise,
351
+ }
352
+ )
353
+
354
+ progress(0.2, desc="Loading model...")
355
+ separator.load_model(model_filename=model)
356
+
357
+ progress(0.7, desc="Separating audio...")
358
+ separation = separator.separate(audio)
359
+
360
+ stems = [os.path.join(out_dir, file_name) for file_name in separation]
361
+
362
+ if single_stem.strip():
363
+ return stems[0], None
364
+
365
+ return stems[0], stems[1]
366
+
367
+ except Exception as e:
368
+ raise RuntimeError(f"MDX-NET separation failed: {e}") from e
369
+
370
+ @track_presence("Performing VR Arch Separation")
371
+ @spaces.GPU(duration=60)
372
+ def vrarch_separator(audio, model, out_format, window_size, aggression, tta, post_process, post_process_threshold, high_end_process, batch_size, norm_thresh, amp_thresh, single_stem, progress=gr.Progress(track_tqdm=True)):
373
+ base_name = os.path.splitext(os.path.basename(audio))[0]
374
+ try:
375
+ separator = Separator(
376
+ log_level=logging.WARNING,
377
+ model_file_dir=models_dir,
378
+ output_dir=out_dir,
379
+ output_format=out_format,
380
+ use_autocast=use_autocast,
381
+ normalization_threshold=norm_thresh,
382
+ amplification_threshold=amp_thresh,
383
+ output_single_stem=single_stem,
384
+ vr_params={
385
+ "batch_size": batch_size,
386
+ "window_size": window_size,
387
+ "aggression": aggression,
388
+ "enable_tta": tta,
389
+ "enable_post_process": post_process,
390
+ "post_process_threshold": post_process_threshold,
391
+ "high_end_process": high_end_process,
392
+ }
393
+ )
394
+
395
+ progress(0.2, desc="Loading model...")
396
+ separator.load_model(model_filename=model)
397
+
398
+ progress(0.7, desc="Separating audio...")
399
+ separation = separator.separate(audio)
400
+
401
+ stems = [os.path.join(out_dir, file_name) for file_name in separation]
402
+
403
+ if single_stem.strip():
404
+ return stems[0], None
405
+
406
+ return stems[0], stems[1]
407
+
408
+ except Exception as e:
409
+ raise RuntimeError(f"VR ARCH separation failed: {e}") from e
410
+
411
+ @track_presence("Performing Demucs Separation")
412
+ @spaces.GPU(duration=60)
413
+ def demucs_separator(audio, model, out_format, shifts, segment_size, segments_enabled, overlap, batch_size, norm_thresh, amp_thresh, progress=gr.Progress(track_tqdm=True)):
414
+ base_name = os.path.splitext(os.path.basename(audio))[0]
415
+ try:
416
+ separator = Separator(
417
+ log_level=logging.WARNING,
418
+ model_file_dir=models_dir,
419
+ output_dir=out_dir,
420
+ output_format=out_format,
421
+ use_autocast=use_autocast,
422
+ normalization_threshold=norm_thresh,
423
+ amplification_threshold=amp_thresh,
424
+ demucs_params={
425
+ "batch_size": batch_size,
426
+ "segment_size": segment_size,
427
+ "shifts": shifts,
428
+ "overlap": overlap,
429
+ "segments_enabled": segments_enabled,
430
+ }
431
+ )
432
+
433
+ progress(0.2, desc="Loading model...")
434
+ separator.load_model(model_filename=model)
435
+
436
+ progress(0.7, desc="Separating audio...")
437
+ separation = separator.separate(audio)
438
+
439
+ stems = [os.path.join(out_dir, file_name) for file_name in separation]
440
+
441
+ if model == "htdemucs_6s.yaml":
442
+ return stems[0], stems[1], stems[2], stems[3], stems[4], stems[5]
443
+ else:
444
+ return stems[0], stems[1], stems[2], stems[3], None, None
445
+
446
+ except Exception as e:
447
+ raise RuntimeError(f"Demucs separation failed: {e}") from e
448
+
449
+ def update_stems(model):
450
+ if model == "htdemucs_6s.yaml":
451
+ return gr.update(visible=True)
452
+ else:
453
+ return gr.update(visible=False)
454
+
455
+ @track_presence("Performing BS/Mel Roformer Batch Separation")
456
+ @spaces.GPU(duration=60)
457
+ def roformer_batch(path_input, path_output, model_key, out_format, segment_size, override_seg_size, overlap, batch_size, norm_thresh, amp_thresh, single_stem):
458
+ found_files.clear()
459
+ logs.clear()
460
+ roformer_model = roformer_models[model_key]
461
+
462
+ for audio_files in os.listdir(path_input):
463
+ if audio_files.endswith(extensions):
464
+ found_files.append(audio_files)
465
+ total_files = len(found_files)
466
+
467
+ if total_files == 0:
468
+ logs.append("No valid audio files.")
469
+ yield "\n".join(logs)
470
+ else:
471
+ logs.append(f"{total_files} audio files found")
472
+ found_files.sort()
473
+
474
+ for audio_files in found_files:
475
+ file_path = os.path.join(path_input, audio_files)
476
+ base_name = os.path.splitext(os.path.basename(file_path))[0]
477
+ try:
478
+ separator = Separator(
479
+ log_level=logging.WARNING,
480
+ model_file_dir=models_dir,
481
+ output_dir=path_output,
482
+ output_format=out_format,
483
+ use_autocast=use_autocast,
484
+ normalization_threshold=norm_thresh,
485
+ amplification_threshold=amp_thresh,
486
+ output_single_stem=single_stem,
487
+ mdxc_params={
488
+ "segment_size": segment_size,
489
+ "override_model_segment_size": override_seg_size,
490
+ "batch_size": batch_size,
491
+ "overlap": overlap,
492
+ }
493
+ )
494
+
495
+ logs.append("Loading model...")
496
+ yield "\n".join(logs)
497
+ separator.load_model(model_filename=roformer_model)
498
+
499
+ logs.append(f"Separating file: {audio_files}")
500
+ yield "\n".join(logs)
501
+ separator.separate(file_path)
502
+ logs.append(f"File: {audio_files} separated!")
503
+ yield "\n".join(logs)
504
+ except Exception as e:
505
+ raise RuntimeError(f"Roformer batch separation failed: {e}") from e
506
+
507
+ @track_presence("Performing MDXC Batch Separation")
508
+ @spaces.GPU(duration=60)
509
+ def mdx23c_batch(path_input, path_output, model, out_format, segment_size, override_seg_size, overlap, batch_size, norm_thresh, amp_thresh, single_stem):
510
+ found_files.clear()
511
+ logs.clear()
512
+
513
+ for audio_files in os.listdir(path_input):
514
+ if audio_files.endswith(extensions):
515
+ found_files.append(audio_files)
516
+ total_files = len(found_files)
517
+
518
+ if total_files == 0:
519
+ logs.append("No valid audio files.")
520
+ yield "\n".join(logs)
521
+ else:
522
+ logs.append(f"{total_files} audio files found")
523
+ found_files.sort()
524
+
525
+ for audio_files in found_files:
526
+ file_path = os.path.join(path_input, audio_files)
527
+ base_name = os.path.splitext(os.path.basename(file_path))[0]
528
+ try:
529
+ separator = Separator(
530
+ log_level=logging.WARNING,
531
+ model_file_dir=models_dir,
532
+ output_dir=path_output,
533
+ output_format=out_format,
534
+ use_autocast=use_autocast,
535
+ normalization_threshold=norm_thresh,
536
+ amplification_threshold=amp_thresh,
537
+ output_single_stem=single_stem,
538
+ mdxc_params={
539
+ "segment_size": segment_size,
540
+ "override_model_segment_size": override_seg_size,
541
+ "batch_size": batch_size,
542
+ "overlap": overlap,
543
+ }
544
+ )
545
+
546
+ logs.append("Loading model...")
547
+ yield "\n".join(logs)
548
+ separator.load_model(model_filename=model)
549
+
550
+ logs.append(f"Separating file: {audio_files}")
551
+ yield "\n".join(logs)
552
+ separator.separate(file_path)
553
+ logs.append(f"File: {audio_files} separated!")
554
+ yield "\n".join(logs)
555
+ except Exception as e:
556
+ raise RuntimeError(f"Roformer batch separation failed: {e}") from e
557
+
558
+ @track_presence("Performing MDX-NET Batch Separation")
559
+ @spaces.GPU(duration=60)
560
+ def mdxnet_batch(path_input, path_output, model, out_format, hop_length, segment_size, denoise, overlap, batch_size, norm_thresh, amp_thresh, single_stem):
561
+ found_files.clear()
562
+ logs.clear()
563
+
564
+ for audio_files in os.listdir(path_input):
565
+ if audio_files.endswith(extensions):
566
+ found_files.append(audio_files)
567
+ total_files = len(found_files)
568
+
569
+ if total_files == 0:
570
+ logs.append("No valid audio files.")
571
+ yield "\n".join(logs)
572
+ else:
573
+ logs.append(f"{total_files} audio files found")
574
+ found_files.sort()
575
+
576
+ for audio_files in found_files:
577
+ file_path = os.path.join(path_input, audio_files)
578
+ base_name = os.path.splitext(os.path.basename(file_path))[0]
579
+ try:
580
+ separator = Separator(
581
+ log_level=logging.WARNING,
582
+ model_file_dir=models_dir,
583
+ output_dir=path_output,
584
+ output_format=out_format,
585
+ use_autocast=use_autocast,
586
+ normalization_threshold=norm_thresh,
587
+ amplification_threshold=amp_thresh,
588
+ output_single_stem=single_stem,
589
+ mdx_params={
590
+ "hop_length": hop_length,
591
+ "segment_size": segment_size,
592
+ "overlap": overlap,
593
+ "batch_size": batch_size,
594
+ "enable_denoise": denoise,
595
+ }
596
+ )
597
+
598
+ logs.append("Loading model...")
599
+ yield "\n".join(logs)
600
+ separator.load_model(model_filename=model)
601
+
602
+ logs.append(f"Separating file: {audio_files}")
603
+ yield "\n".join(logs)
604
+ separator.separate(file_path)
605
+ logs.append(f"File: {audio_files} separated!")
606
+ yield "\n".join(logs)
607
+ except Exception as e:
608
+ raise RuntimeError(f"Roformer batch separation failed: {e}") from e
609
+
610
+ @track_presence("Performing VR Arch Batch Separation")
611
+ @spaces.GPU(duration=60)
612
+ def vrarch_batch(path_input, path_output, model, out_format, window_size, aggression, tta, post_process, post_process_threshold, high_end_process, batch_size, norm_thresh, amp_thresh, single_stem):
613
+ found_files.clear()
614
+ logs.clear()
615
+
616
+ for audio_files in os.listdir(path_input):
617
+ if audio_files.endswith(extensions):
618
+ found_files.append(audio_files)
619
+ total_files = len(found_files)
620
+
621
+ if total_files == 0:
622
+ logs.append("No valid audio files.")
623
+ yield "\n".join(logs)
624
+ else:
625
+ logs.append(f"{total_files} audio files found")
626
+ found_files.sort()
627
+
628
+ for audio_files in found_files:
629
+ file_path = os.path.join(path_input, audio_files)
630
+ base_name = os.path.splitext(os.path.basename(file_path))[0]
631
+ try:
632
+ separator = Separator(
633
+ log_level=logging.WARNING,
634
+ model_file_dir=models_dir,
635
+ output_dir=path_output,
636
+ output_format=out_format,
637
+ use_autocast=use_autocast,
638
+ normalization_threshold=norm_thresh,
639
+ amplification_threshold=amp_thresh,
640
+ output_single_stem=single_stem,
641
+ vr_params={
642
+ "batch_size": batch_size,
643
+ "window_size": window_size,
644
+ "aggression": aggression,
645
+ "enable_tta": tta,
646
+ "enable_post_process": post_process,
647
+ "post_process_threshold": post_process_threshold,
648
+ "high_end_process": high_end_process,
649
+ }
650
+ )
651
+
652
+ logs.append("Loading model...")
653
+ yield "\n".join(logs)
654
+ separator.load_model(model_filename=model)
655
+
656
+ logs.append(f"Separating file: {audio_files}")
657
+ yield "\n".join(logs)
658
+ separator.separate(file_path)
659
+ logs.append(f"File: {audio_files} separated!")
660
+ yield "\n".join(logs)
661
+ except Exception as e:
662
+ raise RuntimeError(f"Roformer batch separation failed: {e}") from e
663
+
664
+ @track_presence("Performing Demucs Batch Separation")
665
+ @spaces.GPU(duration=60)
666
+ def demucs_batch(path_input, path_output, model, out_format, shifts, segment_size, segments_enabled, overlap, batch_size, norm_thresh, amp_thresh):
667
+ found_files.clear()
668
+ logs.clear()
669
+
670
+ for audio_files in os.listdir(path_input):
671
+ if audio_files.endswith(extensions):
672
+ found_files.append(audio_files)
673
+ total_files = len(found_files)
674
+
675
+ if total_files == 0:
676
+ logs.append("No valid audio files.")
677
+ yield "\n".join(logs)
678
+ else:
679
+ logs.append(f"{total_files} audio files found")
680
+ found_files.sort()
681
+
682
+ for audio_files in found_files:
683
+ file_path = os.path.join(path_input, audio_files)
684
+ try:
685
+ separator = Separator(
686
+ log_level=logging.WARNING,
687
+ model_file_dir=models_dir,
688
+ output_dir=path_output,
689
+ output_format=out_format,
690
+ use_autocast=use_autocast,
691
+ normalization_threshold=norm_thresh,
692
+ amplification_threshold=amp_thresh,
693
+ demucs_params={
694
+ "batch_size": batch_size,
695
+ "segment_size": segment_size,
696
+ "shifts": shifts,
697
+ "overlap": overlap,
698
+ "segments_enabled": segments_enabled,
699
+ }
700
+ )
701
+
702
+ logs.append("Loading model...")
703
+ yield "\n".join(logs)
704
+ separator.load_model(model_filename=model)
705
+
706
+ logs.append(f"Separating file: {audio_files}")
707
+ yield "\n".join(logs)
708
+ separator.separate(file_path)
709
+ logs.append(f"File: {audio_files} separated!")
710
+ yield "\n".join(logs)
711
+ except Exception as e:
712
+ raise RuntimeError(f"Roformer batch separation failed: {e}") from e
713
+
714
+ with gr.Blocks(theme = loadThemes.load_json() or "NoCrypt/miku", title = "🎵 UVR5 UI 🎵") as app:
715
+ gr.Markdown("<h1> 🎵 UVR5 UI 🎵 </h1>")
716
+ gr.Markdown(i18n("If you liked this HF Space you can give me a ❤️"))
717
+ gr.Markdown(i18n("Try UVR5 UI using Colab [here](https://colab.research.google.com/github/Eddycrack864/UVR5-UI/blob/main/UVR_UI.ipynb)"))
718
+ with gr.Tabs():
719
+ with gr.TabItem("BS/Mel Roformer"):
720
+ with gr.Row():
721
+ roformer_model = gr.Dropdown(
722
+ label = i18n("Select the model"),
723
+ choices = list(roformer_models.keys()),
724
+ value = lambda : None,
725
+ interactive = True
726
+ )
727
+ roformer_output_format = gr.Dropdown(
728
+ label = i18n("Select the output format"),
729
+ choices = output_format,
730
+ value = lambda : None,
731
+ interactive = True
732
+ )
733
+ with gr.Accordion(i18n("Advanced settings"), open = False):
734
+ with gr.Group():
735
+ with gr.Row():
736
+ roformer_segment_size = gr.Slider(
737
+ label = i18n("Segment size"),
738
+ info = i18n("Larger consumes more resources, but may give better results"),
739
+ minimum = 32,
740
+ maximum = 4000,
741
+ step = 32,
742
+ value = 256,
743
+ interactive = True
744
+ )
745
+ roformer_override_segment_size = gr.Checkbox(
746
+ label = i18n("Override segment size"),
747
+ info = i18n("Override model default segment size instead of using the model default value"),
748
+ value = False,
749
+ interactive = True
750
+ )
751
+ with gr.Row():
752
+ roformer_overlap = gr.Slider(
753
+ label = i18n("Overlap"),
754
+ info = i18n("Amount of overlap between prediction windows"),
755
+ minimum = 2,
756
+ maximum = 10,
757
+ step = 1,
758
+ value = 8,
759
+ interactive = True
760
+ )
761
+ roformer_batch_size = gr.Slider(
762
+ label = i18n("Batch size"),
763
+ info = i18n("Larger consumes more RAM but may process slightly faster"),
764
+ minimum = 1,
765
+ maximum = 16,
766
+ step = 1,
767
+ value = 1,
768
+ interactive = True
769
+ )
770
+ with gr.Row():
771
+ roformer_normalization_threshold = gr.Slider(
772
+ label = i18n("Normalization threshold"),
773
+ info = i18n("The threshold for audio normalization"),
774
+ minimum = 0.1,
775
+ maximum = 1,
776
+ step = 0.1,
777
+ value = 0.9,
778
+ interactive = True
779
+ )
780
+ roformer_amplification_threshold = gr.Slider(
781
+ label = i18n("Amplification threshold"),
782
+ info = i18n("The threshold for audio amplification"),
783
+ minimum = 0.1,
784
+ maximum = 1,
785
+ step = 0.1,
786
+ value = 0.7,
787
+ interactive = True
788
+ )
789
+ with gr.Row():
790
+ roformer_single_stem = gr.Textbox(
791
+ label = i18n("Output only single stem"),
792
+ placeholder = i18n("Write the stem you want, check the stems of each model on Leaderboard. e.g. Instrumental"),
793
+ interactive = True
794
+ )
795
+ with gr.Row():
796
+ roformer_audio = gr.Audio(
797
+ label = i18n("Input audio"),
798
+ type = "filepath",
799
+ interactive = True
800
+ )
801
+ with gr.Accordion(i18n("Separation by link"), open = False):
802
+ with gr.Row():
803
+ roformer_link = gr.Textbox(
804
+ label = i18n("Link"),
805
+ placeholder = i18n("Paste the link here"),
806
+ interactive = True
807
+ )
808
+ with gr.Row():
809
+ gr.Markdown(i18n("You can paste the link to the video/audio from many sites, check the complete list [here](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)"))
810
+ with gr.Row():
811
+ roformer_download_button = gr.Button(
812
+ i18n("Download!"),
813
+ variant = "primary"
814
+ )
815
+
816
+ roformer_download_button.click(download_audio, [roformer_link], [roformer_audio])
817
+
818
+ with gr.Accordion(i18n("Batch separation"), open = False):
819
+ with gr.Row():
820
+ roformer_input_path = gr.Textbox(
821
+ label = i18n("Input path"),
822
+ placeholder = i18n("Place the input path here"),
823
+ interactive = True
824
+ )
825
+ roformer_output_path = gr.Textbox(
826
+ label = i18n("Output path"),
827
+ placeholder = i18n("Place the output path here"),
828
+ interactive = True
829
+ )
830
+ with gr.Row():
831
+ roformer_bath_button = gr.Button(i18n("Separate!"), variant = "primary")
832
+ with gr.Row():
833
+ roformer_info = gr.Textbox(
834
+ label = i18n("Output information"),
835
+ interactive = False
836
+ )
837
+
838
+ roformer_bath_button.click(roformer_batch, [roformer_input_path, roformer_output_path, roformer_model, roformer_output_format, roformer_segment_size, roformer_override_segment_size, roformer_overlap, roformer_batch_size, roformer_normalization_threshold, roformer_amplification_threshold, roformer_single_stem], [roformer_info])
839
+
840
+ with gr.Row():
841
+ roformer_button = gr.Button(i18n("Separate!"), variant = "primary")
842
+ with gr.Row():
843
+ roformer_stem1 = gr.Audio(
844
+ show_download_button = True,
845
+ interactive = False,
846
+ label = i18n("Stem 1"),
847
+ type = "filepath"
848
+ )
849
+ roformer_stem2 = gr.Audio(
850
+ show_download_button = True,
851
+ interactive = False,
852
+ label = i18n("Stem 2"),
853
+ type = "filepath"
854
+ )
855
+
856
+ roformer_button.click(roformer_separator, [roformer_audio, roformer_model, roformer_output_format, roformer_segment_size, roformer_override_segment_size, roformer_overlap, roformer_batch_size, roformer_normalization_threshold, roformer_amplification_threshold, roformer_single_stem], [roformer_stem1, roformer_stem2])
857
+
858
+ with gr.TabItem("MDX23C"):
859
+ with gr.Row():
860
+ mdx23c_model = gr.Dropdown(
861
+ label = i18n("Select the model"),
862
+ choices = mdx23c_models,
863
+ value = lambda : None,
864
+ interactive = True
865
+ )
866
+ mdx23c_output_format = gr.Dropdown(
867
+ label = i18n("Select the output format"),
868
+ choices = output_format,
869
+ value = lambda : None,
870
+ interactive = True
871
+ )
872
+ with gr.Accordion(i18n("Advanced settings"), open = False):
873
+ with gr.Group():
874
+ with gr.Row():
875
+ mdx23c_segment_size = gr.Slider(
876
+ minimum = 32,
877
+ maximum = 4000,
878
+ step = 32,
879
+ label = i18n("Segment size"),
880
+ info = i18n("Larger consumes more resources, but may give better results"),
881
+ value = 256,
882
+ interactive = True
883
+ )
884
+ mdx23c_override_segment_size = gr.Checkbox(
885
+ label = i18n("Override segment size"),
886
+ info = i18n("Override model default segment size instead of using the model default value"),
887
+ value = False,
888
+ interactive = True
889
+ )
890
+ with gr.Row():
891
+ mdx23c_overlap = gr.Slider(
892
+ minimum = 2,
893
+ maximum = 50,
894
+ step = 1,
895
+ label = i18n("Overlap"),
896
+ info = i18n("Amount of overlap between prediction windows"),
897
+ value = 8,
898
+ interactive = True
899
+ )
900
+ mdx23c_batch_size = gr.Slider(
901
+ label = i18n("Batch size"),
902
+ info = i18n("Larger consumes more RAM but may process slightly faster"),
903
+ minimum = 1,
904
+ maximum = 16,
905
+ step = 1,
906
+ value = 1,
907
+ interactive = True
908
+ )
909
+ with gr.Row():
910
+ mdx23c_normalization_threshold = gr.Slider(
911
+ label = i18n("Normalization threshold"),
912
+ info = i18n("The threshold for audio normalization"),
913
+ minimum = 0.1,
914
+ maximum = 1,
915
+ step = 0.1,
916
+ value = 0.9,
917
+ interactive = True
918
+ )
919
+ mdx23c_amplification_threshold = gr.Slider(
920
+ label = i18n("Amplification threshold"),
921
+ info = i18n("The threshold for audio amplification"),
922
+ minimum = 0.1,
923
+ maximum = 1,
924
+ step = 0.1,
925
+ value = 0.7,
926
+ interactive = True
927
+ )
928
+ with gr.Row():
929
+ mdx23c_single_stem = gr.Textbox(
930
+ label = i18n("Output only single stem"),
931
+ placeholder = i18n("Write the stem you want, check the stems of each model on Leaderboard. e.g. Instrumental"),
932
+ interactive = True
933
+ )
934
+ with gr.Row():
935
+ mdx23c_audio = gr.Audio(
936
+ label = i18n("Input audio"),
937
+ type = "filepath",
938
+ interactive = True
939
+ )
940
+ with gr.Accordion(i18n("Separation by link"), open = False):
941
+ with gr.Row():
942
+ mdx23c_link = gr.Textbox(
943
+ label = i18n("Link"),
944
+ placeholder = i18n("Paste the link here"),
945
+ interactive = True
946
+ )
947
+ with gr.Row():
948
+ gr.Markdown(i18n("You can paste the link to the video/audio from many sites, check the complete list [here](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)"))
949
+ with gr.Row():
950
+ mdx23c_download_button = gr.Button(
951
+ i18n("Download!"),
952
+ variant = "primary"
953
+ )
954
+
955
+ mdx23c_download_button.click(download_audio, [mdx23c_link], [mdx23c_audio])
956
+
957
+ with gr.Accordion(i18n("Batch separation"), open = False):
958
+ with gr.Row():
959
+ mdx23c_input_path = gr.Textbox(
960
+ label = i18n("Input path"),
961
+ placeholder = i18n("Place the input path here"),
962
+ interactive = True
963
+ )
964
+ mdx23c_output_path = gr.Textbox(
965
+ label = i18n("Output path"),
966
+ placeholder = i18n("Place the output path here"),
967
+ interactive = True
968
+ )
969
+ with gr.Row():
970
+ mdx23c_bath_button = gr.Button(i18n("Separate!"), variant = "primary")
971
+ with gr.Row():
972
+ mdx23c_info = gr.Textbox(
973
+ label = i18n("Output information"),
974
+ interactive = False
975
+ )
976
+
977
+ mdx23c_bath_button.click(mdx23c_batch, [mdx23c_input_path, mdx23c_output_path, mdx23c_model, mdx23c_output_format, mdx23c_segment_size, mdx23c_override_segment_size, mdx23c_overlap, mdx23c_batch_size, mdx23c_normalization_threshold, mdx23c_amplification_threshold, mdx23c_single_stem], [mdx23c_info])
978
+
979
+ with gr.Row():
980
+ mdx23c_button = gr.Button(i18n("Separate!"), variant = "primary")
981
+ with gr.Row():
982
+ mdx23c_stem1 = gr.Audio(
983
+ show_download_button = True,
984
+ interactive = False,
985
+ label = i18n("Stem 1"),
986
+ type = "filepath"
987
+ )
988
+ mdx23c_stem2 = gr.Audio(
989
+ show_download_button = True,
990
+ interactive = False,
991
+ label = i18n("Stem 2"),
992
+ type = "filepath"
993
+ )
994
+
995
+ mdx23c_button.click(mdxc_separator, [mdx23c_audio, mdx23c_model, mdx23c_output_format, mdx23c_segment_size, mdx23c_override_segment_size, mdx23c_overlap, mdx23c_batch_size, mdx23c_normalization_threshold, mdx23c_amplification_threshold, mdx23c_single_stem], [mdx23c_stem1, mdx23c_stem2])
996
+
997
+ with gr.TabItem("MDX-NET"):
998
+ with gr.Row():
999
+ mdxnet_model = gr.Dropdown(
1000
+ label = i18n("Select the model"),
1001
+ choices = mdxnet_models,
1002
+ value = lambda : None,
1003
+ interactive = True
1004
+ )
1005
+ mdxnet_output_format = gr.Dropdown(
1006
+ label = i18n("Select the output format"),
1007
+ choices = output_format,
1008
+ value = lambda : None,
1009
+ interactive = True
1010
+ )
1011
+ with gr.Accordion(i18n("Advanced settings"), open = False):
1012
+ with gr.Group():
1013
+ with gr.Row():
1014
+ mdxnet_hop_length = gr.Slider(
1015
+ label = i18n("Hop length"),
1016
+ info = i18n("Usually called stride in neural networks; only change if you know what you're doing"),
1017
+ minimum = 32,
1018
+ maximum = 2048,
1019
+ step = 32,
1020
+ value = 1024,
1021
+ interactive = True
1022
+ )
1023
+ mdxnet_segment_size = gr.Slider(
1024
+ minimum = 32,
1025
+ maximum = 4000,
1026
+ step = 32,
1027
+ label = i18n("Segment size"),
1028
+ info = i18n("Larger consumes more resources, but may give better results"),
1029
+ value = 256,
1030
+ interactive = True
1031
+ )
1032
+ mdxnet_denoise = gr.Checkbox(
1033
+ label = i18n("Denoise"),
1034
+ info = i18n("Enable denoising during separation"),
1035
+ value = True,
1036
+ interactive = True
1037
+ )
1038
+ with gr.Row():
1039
+ mdxnet_overlap = gr.Slider(
1040
+ label = i18n("Overlap"),
1041
+ info = i18n("Amount of overlap between prediction windows"),
1042
+ minimum = 0.001,
1043
+ maximum = 0.999,
1044
+ step = 0.001,
1045
+ value = 0.25,
1046
+ interactive = True
1047
+ )
1048
+ mdxnet_batch_size = gr.Slider(
1049
+ label = i18n("Batch size"),
1050
+ info = i18n("Larger consumes more RAM but may process slightly faster"),
1051
+ minimum = 1,
1052
+ maximum = 16,
1053
+ step = 1,
1054
+ value = 1,
1055
+ interactive = True
1056
+ )
1057
+ with gr.Row():
1058
+ mdxnet_normalization_threshold = gr.Slider(
1059
+ label = i18n("Normalization threshold"),
1060
+ info = i18n("The threshold for audio normalization"),
1061
+ minimum = 0.1,
1062
+ maximum = 1,
1063
+ step = 0.1,
1064
+ value = 0.9,
1065
+ interactive = True
1066
+ )
1067
+ mdxnet_amplification_threshold = gr.Slider(
1068
+ label = i18n("Amplification threshold"),
1069
+ info = i18n("The threshold for audio amplification"),
1070
+ minimum = 0.1,
1071
+ maximum = 1,
1072
+ step = 0.1,
1073
+ value = 0.7,
1074
+ interactive = True
1075
+ )
1076
+ with gr.Row():
1077
+ mdxnet_single_stem = gr.Textbox(
1078
+ label = i18n("Output only single stem"),
1079
+ placeholder = i18n("Write the stem you want, check the stems of each model on Leaderboard. e.g. Instrumental"),
1080
+ interactive = True
1081
+ )
1082
+ with gr.Row():
1083
+ mdxnet_audio = gr.Audio(
1084
+ label = i18n("Input audio"),
1085
+ type = "filepath",
1086
+ interactive = True
1087
+ )
1088
+ with gr.Accordion(i18n("Separation by link"), open = False):
1089
+ with gr.Row():
1090
+ mdxnet_link = gr.Textbox(
1091
+ label = i18n("Link"),
1092
+ placeholder = i18n("Paste the link here"),
1093
+ interactive = True
1094
+ )
1095
+ with gr.Row():
1096
+ gr.Markdown(i18n("You can paste the link to the video/audio from many sites, check the complete list [here](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)"))
1097
+ with gr.Row():
1098
+ mdxnet_download_button = gr.Button(
1099
+ i18n("Download!"),
1100
+ variant = "primary"
1101
+ )
1102
+
1103
+ mdxnet_download_button.click(download_audio, [mdxnet_link], [mdxnet_audio])
1104
+
1105
+ with gr.Accordion(i18n("Batch separation"), open = False):
1106
+ with gr.Row():
1107
+ mdxnet_input_path = gr.Textbox(
1108
+ label = i18n("Input path"),
1109
+ placeholder = i18n("Place the input path here"),
1110
+ interactive = True
1111
+ )
1112
+ mdxnet_output_path = gr.Textbox(
1113
+ label = i18n("Output path"),
1114
+ placeholder = i18n("Place the output path here"),
1115
+ interactive = True
1116
+ )
1117
+ with gr.Row():
1118
+ mdxnet_bath_button = gr.Button(i18n("Separate!"), variant = "primary")
1119
+ with gr.Row():
1120
+ mdxnet_info = gr.Textbox(
1121
+ label = i18n("Output information"),
1122
+ interactive = False
1123
+ )
1124
+
1125
+ mdxnet_bath_button.click(mdxnet_batch, [mdxnet_input_path, mdxnet_output_path, mdxnet_model, mdxnet_output_format, mdxnet_hop_length, mdxnet_segment_size, mdxnet_denoise, mdxnet_overlap, mdxnet_batch_size, mdxnet_normalization_threshold, mdxnet_amplification_threshold, mdxnet_single_stem], [mdxnet_info])
1126
+
1127
+ with gr.Row():
1128
+ mdxnet_button = gr.Button(i18n("Separate!"), variant = "primary")
1129
+ with gr.Row():
1130
+ mdxnet_stem1 = gr.Audio(
1131
+ show_download_button = True,
1132
+ interactive = False,
1133
+ label = i18n("Stem 1"),
1134
+ type = "filepath"
1135
+ )
1136
+ mdxnet_stem2 = gr.Audio(
1137
+ show_download_button = True,
1138
+ interactive = False,
1139
+ label = i18n("Stem 2"),
1140
+ type = "filepath"
1141
+ )
1142
+
1143
+ mdxnet_button.click(mdxnet_separator, [mdxnet_audio, mdxnet_model, mdxnet_output_format, mdxnet_hop_length, mdxnet_segment_size, mdxnet_denoise, mdxnet_overlap, mdxnet_batch_size, mdxnet_normalization_threshold, mdxnet_amplification_threshold, mdxnet_single_stem], [mdxnet_stem1, mdxnet_stem2])
1144
+
1145
+ with gr.TabItem("VR ARCH"):
1146
+ with gr.Row():
1147
+ vrarch_model = gr.Dropdown(
1148
+ label = i18n("Select the model"),
1149
+ choices = vrarch_models,
1150
+ value = lambda : None,
1151
+ interactive = True
1152
+ )
1153
+ vrarch_output_format = gr.Dropdown(
1154
+ label = i18n("Select the output format"),
1155
+ choices = output_format,
1156
+ value = lambda : None,
1157
+ interactive = True
1158
+ )
1159
+ with gr.Accordion(i18n("Advanced settings"), open = False):
1160
+ with gr.Group():
1161
+ with gr.Row():
1162
+ vrarch_window_size = gr.Slider(
1163
+ label = i18n("Window size"),
1164
+ info = i18n("Balance quality and speed. 1024 = fast but lower, 320 = slower but better quality"),
1165
+ minimum=320,
1166
+ maximum=1024,
1167
+ step=32,
1168
+ value = 512,
1169
+ interactive = True
1170
+ )
1171
+ vrarch_agression = gr.Slider(
1172
+ minimum = 1,
1173
+ maximum = 50,
1174
+ step = 1,
1175
+ label = i18n("Agression"),
1176
+ info = i18n("Intensity of primary stem extraction"),
1177
+ value = 5,
1178
+ interactive = True
1179
+ )
1180
+ vrarch_tta = gr.Checkbox(
1181
+ label = i18n("TTA"),
1182
+ info = i18n("Enable Test-Time-Augmentation; slow but improves quality"),
1183
+ value = True,
1184
+ visible = True,
1185
+ interactive = True
1186
+ )
1187
+ with gr.Row():
1188
+ vrarch_post_process = gr.Checkbox(
1189
+ label = i18n("Post process"),
1190
+ info = i18n("Identify leftover artifacts within vocal output; may improve separation for some songs"),
1191
+ value = False,
1192
+ visible = True,
1193
+ interactive = True
1194
+ )
1195
+ vrarch_post_process_threshold = gr.Slider(
1196
+ label = i18n("Post process threshold"),
1197
+ info = i18n("Threshold for post-processing"),
1198
+ minimum = 0.1,
1199
+ maximum = 0.3,
1200
+ step = 0.1,
1201
+ value = 0.2,
1202
+ interactive = True
1203
+ )
1204
+ with gr.Row():
1205
+ vrarch_high_end_process = gr.Checkbox(
1206
+ label = i18n("High end process"),
1207
+ info = i18n("Mirror the missing frequency range of the output"),
1208
+ value = False,
1209
+ visible = True,
1210
+ interactive = True,
1211
+ )
1212
+ vrarch_batch_size = gr.Slider(
1213
+ label = i18n("Batch size"),
1214
+ info = i18n("Larger consumes more RAM but may process slightly faster"),
1215
+ minimum = 1,
1216
+ maximum = 16,
1217
+ step = 1,
1218
+ value = 1,
1219
+ interactive = True
1220
+ )
1221
+ with gr.Row():
1222
+ vrarch_normalization_threshold = gr.Slider(
1223
+ label = i18n("Normalization threshold"),
1224
+ info = i18n("The threshold for audio normalization"),
1225
+ minimum = 0.1,
1226
+ maximum = 1,
1227
+ step = 0.1,
1228
+ value = 0.9,
1229
+ interactive = True
1230
+ )
1231
+ vrarch_amplification_threshold = gr.Slider(
1232
+ label = i18n("Amplification threshold"),
1233
+ info = i18n("The threshold for audio amplification"),
1234
+ minimum = 0.1,
1235
+ maximum = 1,
1236
+ step = 0.1,
1237
+ value = 0.7,
1238
+ interactive = True
1239
+ )
1240
+ with gr.Row():
1241
+ vrarch_single_stem = gr.Textbox(
1242
+ label = i18n("Output only single stem"),
1243
+ placeholder = i18n("Write the stem you want, check the stems of each model on Leaderboard. e.g. Instrumental"),
1244
+ interactive = True
1245
+ )
1246
+ with gr.Row():
1247
+ vrarch_audio = gr.Audio(
1248
+ label = i18n("Input audio"),
1249
+ type = "filepath",
1250
+ interactive = True
1251
+ )
1252
+ with gr.Accordion(i18n("Separation by link"), open = False):
1253
+ with gr.Row():
1254
+ vrarch_link = gr.Textbox(
1255
+ label = i18n("Link"),
1256
+ placeholder = i18n("Paste the link here"),
1257
+ interactive = True
1258
+ )
1259
+ with gr.Row():
1260
+ gr.Markdown(i18n("You can paste the link to the video/audio from many sites, check the complete list [here](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)"))
1261
+ with gr.Row():
1262
+ vrarch_download_button = gr.Button(
1263
+ i18n("Download!"),
1264
+ variant = "primary"
1265
+ )
1266
+
1267
+ vrarch_download_button.click(download_audio, [vrarch_link], [vrarch_audio])
1268
+
1269
+ with gr.Accordion(i18n("Batch separation"), open = False):
1270
+ with gr.Row():
1271
+ vrarch_input_path = gr.Textbox(
1272
+ label = i18n("Input path"),
1273
+ placeholder = i18n("Place the input path here"),
1274
+ interactive = True
1275
+ )
1276
+ vrarch_output_path = gr.Textbox(
1277
+ label = i18n("Output path"),
1278
+ placeholder = i18n("Place the output path here"),
1279
+ interactive = True
1280
+ )
1281
+ with gr.Row():
1282
+ vrarch_bath_button = gr.Button(i18n("Separate!"), variant = "primary")
1283
+ with gr.Row():
1284
+ vrarch_info = gr.Textbox(
1285
+ label = i18n("Output information"),
1286
+ interactive = False
1287
+ )
1288
+
1289
+ vrarch_bath_button.click(vrarch_batch, [vrarch_input_path, vrarch_output_path, vrarch_model, vrarch_output_format, vrarch_window_size, vrarch_agression, vrarch_tta, vrarch_post_process, vrarch_post_process_threshold, vrarch_high_end_process, vrarch_batch_size, vrarch_normalization_threshold, vrarch_amplification_threshold, vrarch_single_stem], [vrarch_info])
1290
+
1291
+ with gr.Row():
1292
+ vrarch_button = gr.Button(i18n("Separate!"), variant = "primary")
1293
+ with gr.Row():
1294
+ vrarch_stem1 = gr.Audio(
1295
+ show_download_button = True,
1296
+ interactive = False,
1297
+ type = "filepath",
1298
+ label = i18n("Stem 1")
1299
+ )
1300
+ vrarch_stem2 = gr.Audio(
1301
+ show_download_button = True,
1302
+ interactive = False,
1303
+ type = "filepath",
1304
+ label = i18n("Stem 2")
1305
+ )
1306
+
1307
+ vrarch_button.click(vrarch_separator, [vrarch_audio, vrarch_model, vrarch_output_format, vrarch_window_size, vrarch_agression, vrarch_tta, vrarch_post_process, vrarch_post_process_threshold, vrarch_high_end_process, vrarch_batch_size, vrarch_normalization_threshold, vrarch_amplification_threshold, vrarch_single_stem], [vrarch_stem1, vrarch_stem2])
1308
+
1309
+ with gr.TabItem("Demucs"):
1310
+ with gr.Row():
1311
+ demucs_model = gr.Dropdown(
1312
+ label = i18n("Select the model"),
1313
+ choices = demucs_models,
1314
+ value = lambda : None,
1315
+ interactive = True
1316
+ )
1317
+ demucs_output_format = gr.Dropdown(
1318
+ label = i18n("Select the output format"),
1319
+ choices = output_format,
1320
+ value = lambda : None,
1321
+ interactive = True
1322
+ )
1323
+ with gr.Accordion(i18n("Advanced settings"), open = False):
1324
+ with gr.Group():
1325
+ with gr.Row():
1326
+ demucs_shifts = gr.Slider(
1327
+ label = i18n("Shifts"),
1328
+ info = i18n("Number of predictions with random shifts, higher = slower but better quality"),
1329
+ minimum = 1,
1330
+ maximum = 20,
1331
+ step = 1,
1332
+ value = 2,
1333
+ interactive = True
1334
+ )
1335
+ demucs_segment_size = gr.Slider(
1336
+ label = i18n("Segment size"),
1337
+ info = i18n("Size of segments into which the audio is split. Higher = slower but better quality"),
1338
+ minimum = 1,
1339
+ maximum = 100,
1340
+ step = 1,
1341
+ value = 40,
1342
+ interactive = True
1343
+ )
1344
+ demucs_segments_enabled = gr.Checkbox(
1345
+ label = i18n("Segment-wise processing"),
1346
+ info = i18n("Enable segment-wise processing"),
1347
+ value = True,
1348
+ interactive = True
1349
+ )
1350
+ with gr.Row():
1351
+ demucs_overlap = gr.Slider(
1352
+ label = i18n("Overlap"),
1353
+ info = i18n("Overlap between prediction windows. Higher = slower but better quality"),
1354
+ minimum=0.001,
1355
+ maximum=0.999,
1356
+ step=0.001,
1357
+ value = 0.25,
1358
+ interactive = True
1359
+ )
1360
+ demucs_batch_size = gr.Slider(
1361
+ label = i18n("Batch size"),
1362
+ info = i18n("Larger consumes more RAM but may process slightly faster"),
1363
+ minimum = 1,
1364
+ maximum = 16,
1365
+ step = 1,
1366
+ value = 1,
1367
+ interactive = True
1368
+ )
1369
+ with gr.Row():
1370
+ demucs_normalization_threshold = gr.Slider(
1371
+ label = i18n("Normalization threshold"),
1372
+ info = i18n("The threshold for audio normalization"),
1373
+ minimum = 0.1,
1374
+ maximum = 1,
1375
+ step = 0.1,
1376
+ value = 0.9,
1377
+ interactive = True
1378
+ )
1379
+ demucs_amplification_threshold = gr.Slider(
1380
+ label = i18n("Amplification threshold"),
1381
+ info = i18n("The threshold for audio amplification"),
1382
+ minimum = 0.1,
1383
+ maximum = 1,
1384
+ step = 0.1,
1385
+ value = 0.7,
1386
+ interactive = True
1387
+ )
1388
+ with gr.Row():
1389
+ demucs_audio = gr.Audio(
1390
+ label = i18n("Input audio"),
1391
+ type = "filepath",
1392
+ interactive = True
1393
+ )
1394
+ with gr.Accordion(i18n("Separation by link"), open = False):
1395
+ with gr.Row():
1396
+ demucs_link = gr.Textbox(
1397
+ label = i18n("Link"),
1398
+ placeholder = i18n("Paste the link here"),
1399
+ interactive = True
1400
+ )
1401
+ with gr.Row():
1402
+ gr.Markdown(i18n("You can paste the link to the video/audio from many sites, check the complete list [here](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)"))
1403
+ with gr.Row():
1404
+ demucs_download_button = gr.Button(
1405
+ i18n("Download!"),
1406
+ variant = "primary"
1407
+ )
1408
+
1409
+ demucs_download_button.click(download_audio, [demucs_link], [demucs_audio])
1410
+
1411
+ with gr.Accordion(i18n("Batch separation"), open = False):
1412
+ with gr.Row():
1413
+ demucs_input_path = gr.Textbox(
1414
+ label = i18n("Input path"),
1415
+ placeholder = i18n("Place the input path here"),
1416
+ interactive = True
1417
+ )
1418
+ demucs_output_path = gr.Textbox(
1419
+ label = i18n("Output path"),
1420
+ placeholder = i18n("Place the output path here"),
1421
+ interactive = True
1422
+ )
1423
+ with gr.Row():
1424
+ demucs_bath_button = gr.Button(i18n("Separate!"), variant = "primary")
1425
+ with gr.Row():
1426
+ demucs_info = gr.Textbox(
1427
+ label = i18n("Output information"),
1428
+ interactive = False
1429
+ )
1430
+
1431
+ demucs_bath_button.click(demucs_batch, [demucs_input_path, demucs_output_path, demucs_model, demucs_output_format, demucs_shifts, demucs_segment_size, demucs_segments_enabled, demucs_overlap, demucs_batch_size, demucs_normalization_threshold, demucs_amplification_threshold], [demucs_info])
1432
+
1433
+ with gr.Row():
1434
+ demucs_button = gr.Button(i18n("Separate!"), variant = "primary")
1435
+ with gr.Row():
1436
+ demucs_stem1 = gr.Audio(
1437
+ show_download_button = True,
1438
+ interactive = False,
1439
+ type = "filepath",
1440
+ label = i18n("Stem 1")
1441
+ )
1442
+ demucs_stem2 = gr.Audio(
1443
+ show_download_button = True,
1444
+ interactive = False,
1445
+ type = "filepath",
1446
+ label = i18n("Stem 2")
1447
+ )
1448
+ with gr.Row():
1449
+ demucs_stem3 = gr.Audio(
1450
+ show_download_button = True,
1451
+ interactive = False,
1452
+ type = "filepath",
1453
+ label = i18n("Stem 3")
1454
+ )
1455
+ demucs_stem4 = gr.Audio(
1456
+ show_download_button = True,
1457
+ interactive = False,
1458
+ type = "filepath",
1459
+ label = i18n("Stem 4")
1460
+ )
1461
+ with gr.Row(visible=False) as stem6:
1462
+ demucs_stem5 = gr.Audio(
1463
+ show_download_button = True,
1464
+ interactive = False,
1465
+ type = "filepath",
1466
+ label = i18n("Stem 5")
1467
+ )
1468
+ demucs_stem6 = gr.Audio(
1469
+ show_download_button = True,
1470
+ interactive = False,
1471
+ type = "filepath",
1472
+ label = i18n("Stem 6")
1473
+ )
1474
+
1475
+ demucs_model.change(update_stems, inputs=[demucs_model], outputs=stem6)
1476
+
1477
+ demucs_button.click(demucs_separator, [demucs_audio, demucs_model, demucs_output_format, demucs_shifts, demucs_segment_size, demucs_segments_enabled, demucs_overlap, demucs_batch_size, demucs_normalization_threshold, demucs_amplification_threshold], [demucs_stem1, demucs_stem2, demucs_stem3, demucs_stem4, demucs_stem5, demucs_stem6])
1478
+
1479
+ with gr.TabItem(i18n("Leaderboard")):
1480
+ with gr.Group():
1481
+ with gr.Row(equal_height=True):
1482
+ list_filter = gr.Dropdown(
1483
+ label = i18n("List filter"),
1484
+ info = i18n("Filter and sort the model list by stem"),
1485
+ choices = ["vocals", "instrumental", "reverb", "echo", "noise", "crowd", "dry", "aspiration", "male", "woodwinds", "kick", "drums", "bass", "guitar", "piano", "other"],
1486
+ value = lambda : None
1487
+ )
1488
+ list_button = gr.Button(i18n("Show list!"), variant = "primary")
1489
+ output_list = gr.HTML(label = i18n("Leaderboard"))
1490
+
1491
+ list_button.click(leaderboard, inputs=list_filter, outputs=output_list)
1492
+
1493
+ with gr.TabItem(i18n("Themes")):
1494
+ themes_select = gr.Dropdown(
1495
+ label = i18n("Theme"),
1496
+ info = i18n("Select the theme you want to use. (Requires restarting the App)"),
1497
+ choices = loadThemes.get_list(),
1498
+ value = loadThemes.read_json(),
1499
+ visible = True
1500
+ )
1501
+ dummy_output = gr.Textbox(visible = False)
1502
+
1503
+ themes_select.change(
1504
+ fn = loadThemes.select_theme,
1505
+ inputs = themes_select,
1506
+ outputs = [dummy_output]
1507
+ )
1508
+
1509
+ with gr.TabItem(i18n("Credits")):
1510
+ gr.Markdown(
1511
+ """
1512
+ UVR5 UI created by **[Eddycrack 864](https://github.com/Eddycrack864).** Join **[AI HUB](https://discord.gg/aihub)** community.
1513
+ * python-audio-separator by [beveradb](https://github.com/beveradb).
1514
+ * Special thanks to [Ilaria](https://github.com/TheStingerX) for hosting this space and help.
1515
+ * Thanks to [Mikus](https://github.com/cappuch) for the help with the code.
1516
+ * Thanks to [Nick088](https://huggingface.co/Nick088) for the help to fix roformers.
1517
+ * Thanks to [yt_dlp](https://github.com/yt-dlp/yt-dlp) devs.
1518
+ * Separation by link source code and improvements by [Blane187](https://huggingface.co/Blane187).
1519
+ * Thanks to [ArisDev](https://github.com/aris-py) for porting UVR5 UI to Kaggle and improvements.
1520
+ * Thanks to [Bebra777228](https://github.com/Bebra777228)'s code for guiding me to improve my code.
1521
+ * Thanks to Nick088, MrM0dZ, Ryouko-Yamanda65777, lucinamari, perariroswe, Enes, Léo and the_undead0 for helping translate UVR5 UI.
1522
+ * Thanks to vadigr123 for creating the images for the Discord Rich Presence.
1523
+
1524
+ You can donate to the original UVR5 project [here](https://www.buymeacoffee.com/uvr5)
1525
+ """
1526
+ )
1527
+
1528
+ app.queue()
1529
+ app.launch()