mirror of
https://github.com/Anjok07/ultimatevocalremovergui.git
synced 2024-11-23 23:10:57 +01:00
Add files via upload
This commit is contained in:
parent
03e7019f06
commit
3f68ce8133
11
UVR.py
11
UVR.py
@ -1,5 +1,10 @@
|
||||
# GUI modules
|
||||
import os
|
||||
try:
|
||||
with open(os.path.join(os.getcwd(), 'tmp', 'splash.txt'), 'w') as f:
|
||||
f.write('1')
|
||||
except:
|
||||
pass
|
||||
import pyperclip
|
||||
from gc import freeze
|
||||
import tkinter as tk
|
||||
@ -66,7 +71,6 @@ mdx_opt_path = os.path.join(base_path, 'img', 'mdx_opt.png')
|
||||
vr_opt_path = os.path.join(base_path, 'img', 'vr_opt.png')
|
||||
ense_opt_path = os.path.join(base_path, 'img', 'ense_opt.png')
|
||||
user_ens_opt_path = os.path.join(base_path, 'img', 'user_ens_opt.png')
|
||||
more_info_path = os.path.join(base_path, 'img', 'more_info.png')
|
||||
credits_path = os.path.join(base_path, 'img', 'credits.png')
|
||||
|
||||
DEFAULT_DATA = {
|
||||
@ -277,8 +281,6 @@ class MainWindow(TkinterDnD.Tk):
|
||||
size=(1016, 826))
|
||||
self.user_ens_opt_img = open_image(path=user_ens_opt_path,
|
||||
size=(1016, 826))
|
||||
self.more_info_img = open_image(path=more_info_path,
|
||||
size=(1016, 826))
|
||||
self.credits_img = open_image(path=credits_path,
|
||||
size=(100, 100))
|
||||
|
||||
@ -334,9 +336,6 @@ class MainWindow(TkinterDnD.Tk):
|
||||
self.progress_var = tk.IntVar(value=0)
|
||||
# Font
|
||||
pyglet.font.add_file('lib_v5/fonts/centurygothic/GOTHIC.TTF')
|
||||
pyglet.font.add_file('lib_v5/fonts/unispace/unispace.ttf')
|
||||
#Font(file="lib_v5/fonts/centurygothic/GOTHIC.TTF", family="Century Gothic")
|
||||
#Font(file="lib_v5/fonts/unispace/unispace.ttf", family="Unispace")
|
||||
self.font = tk.font.Font(family='Century Gothic', size=10)
|
||||
self.fontRadio = tk.font.Font(family='Century Gothic', size=8)
|
||||
# --Widgets--
|
||||
|
@ -709,6 +709,7 @@ def main(window: tk.Wm, text_widget: tk.Text, button_widget: tk.Button, progress
|
||||
#Error Handling
|
||||
|
||||
onnxmissing = "[ONNXRuntimeError] : 3 : NO_SUCHFILE"
|
||||
onnxmemerror = "onnxruntime::CudaCall CUDA failure 2: out of memory"
|
||||
runtimeerr = "CUDNN error executing cudnnSetTensorNdDescriptor"
|
||||
cuda_err = "CUDA out of memory"
|
||||
mod_err = "ModuleNotFoundError"
|
||||
@ -716,6 +717,7 @@ def main(window: tk.Wm, text_widget: tk.Text, button_widget: tk.Button, progress
|
||||
ffmp_err = """audioread\__init__.py", line 116, in audio_open"""
|
||||
sf_write_err = "sf.write"
|
||||
|
||||
|
||||
try:
|
||||
with open('errorlog.txt', 'w') as f:
|
||||
f.write(f'No errors to report at this time.' + f'\n\nLast Process Method Used: MDX-Net' +
|
||||
@ -958,6 +960,30 @@ def main(window: tk.Wm, text_widget: tk.Text, button_widget: tk.Button, progress
|
||||
button_widget.configure(state=tk.NORMAL) # Enable Button
|
||||
return
|
||||
|
||||
if onnxmemerror in message:
|
||||
text_widget.write("\n" + base_text + f'Separation failed for the following audio file:\n')
|
||||
text_widget.write(base_text + f'"{os.path.basename(music_file)}"\n')
|
||||
text_widget.write(f'\nError Received:\n\n')
|
||||
text_widget.write(f'The application was unable to allocate enough GPU memory to use this model.\n')
|
||||
text_widget.write(f'\nPlease do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n')
|
||||
text_widget.write(f'If the error persists, your GPU might not be supported.\n\n')
|
||||
text_widget.write(f'Time Elapsed: {time.strftime("%H:%M:%S", time.gmtime(int(time.perf_counter() - stime)))}')
|
||||
try:
|
||||
with open('errorlog.txt', 'w') as f:
|
||||
f.write(f'Last Error Received:\n\n' +
|
||||
f'Error Received while processing "{os.path.basename(music_file)}":\n' +
|
||||
f'Process Method: MDX-Net\n\n' +
|
||||
f'The application was unable to allocate enough GPU memory to use this model.\n' +
|
||||
f'\nPlease do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n' +
|
||||
f'If the error persists, your GPU might not be supported.\n\n' +
|
||||
message + f'\nError Time Stamp [{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}]\n')
|
||||
except:
|
||||
pass
|
||||
torch.cuda.empty_cache()
|
||||
progress_var.set(0)
|
||||
button_widget.configure(state=tk.NORMAL) # Enable Button
|
||||
return
|
||||
|
||||
if sf_write_err in message:
|
||||
text_widget.write("\n" + base_text + f'Separation failed for the following audio file:\n')
|
||||
text_widget.write(base_text + f'"{os.path.basename(music_file)}"\n')
|
||||
|
@ -98,6 +98,8 @@ def main(window: tk.Wm, text_widget: tk.Text, button_widget: tk.Button, progress
|
||||
global nn_arch_sizes
|
||||
global nn_architecture
|
||||
|
||||
#Error Handling
|
||||
|
||||
runtimeerr = "CUDNN error executing cudnnSetTensorNdDescriptor"
|
||||
cuda_err = "CUDA out of memory"
|
||||
mod_err = "ModuleNotFoundError"
|
||||
|
@ -603,8 +603,11 @@ def main(window: tk.Wm, text_widget: tk.Text, button_widget: tk.Button, progress
|
||||
|
||||
widget_text = text_widget
|
||||
gui_progress_bar = progress_var
|
||||
|
||||
#Error Handling
|
||||
|
||||
onnxmissing = "[ONNXRuntimeError] : 3 : NO_SUCHFILE"
|
||||
onnxmemerror = "onnxruntime::CudaCall CUDA failure 2: out of memory"
|
||||
runtimeerr = "CUDNN error executing cudnnSetTensorNdDescriptor"
|
||||
cuda_err = "CUDA out of memory"
|
||||
mod_err = "ModuleNotFoundError"
|
||||
@ -1975,6 +1978,30 @@ def main(window: tk.Wm, text_widget: tk.Text, button_widget: tk.Button, progress
|
||||
button_widget.configure(state=tk.NORMAL) # Enable Button
|
||||
return
|
||||
|
||||
if onnxmemerror in message:
|
||||
text_widget.write("\n" + base_text + f'Separation failed for the following audio file:\n')
|
||||
text_widget.write(base_text + f'"{os.path.basename(music_file)}"\n')
|
||||
text_widget.write(f'\nError Received:\n\n')
|
||||
text_widget.write(f'The application was unable to allocate enough GPU memory to use this model.\n')
|
||||
text_widget.write(f'Please do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n')
|
||||
text_widget.write(f'If the error persists, your GPU might not be supported.\n\n')
|
||||
text_widget.write(f'Time Elapsed: {time.strftime("%H:%M:%S", time.gmtime(int(time.perf_counter() - stime)))}')
|
||||
try:
|
||||
with open('errorlog.txt', 'w') as f:
|
||||
f.write(f'Last Error Received:\n\n' +
|
||||
f'Error Received while processing "{os.path.basename(music_file)}":\n' +
|
||||
f'Process Method: Ensemble Mode\n\n' +
|
||||
f'The application was unable to allocate enough GPU memory to use this model.\n' +
|
||||
f'Please do the following:\n\n1. Close any GPU intensive applications.\n2. Lower the set chunk size.\n3. Then try again.\n\n' +
|
||||
f'If the error persists, your GPU might not be supported.\n\n' +
|
||||
message + f'\nError Time Stamp [{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}]\n')
|
||||
except:
|
||||
pass
|
||||
torch.cuda.empty_cache()
|
||||
progress_var.set(0)
|
||||
button_widget.configure(state=tk.NORMAL) # Enable Button
|
||||
return
|
||||
|
||||
if sf_write_err in message:
|
||||
text_widget.write("\n" + base_text + f'Separation failed for the following audio file:\n')
|
||||
text_widget.write(base_text + f'"{os.path.basename(music_file)}"\n')
|
||||
|
Loading…
Reference in New Issue
Block a user