Add files via upload

This commit is contained in:
Anjok07
2022-05-11 16:05:05 -05:00
committed by GitHub
parent 03e7019f06
commit 3f68ce8133
4 changed files with 60 additions and 6 deletions

View File

@@ -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')