From 067695be6f4f48c9351ddb195188de35d129975b Mon Sep 17 00:00:00 2001 From: DilanBoskan Date: Wed, 2 Dec 2020 15:02:42 +0100 Subject: [PATCH] Save last selected models #36 --- VocalRemover.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/VocalRemover.py b/VocalRemover.py index f08f79ea..d46de321 100644 --- a/VocalRemover.py +++ b/VocalRemover.py @@ -55,6 +55,8 @@ 'stackOnly': False, 'saveAllStacked': False, 'modelFolder': False, + 'modelInstrumentalLabel': 'model_iter26_sr33075_hl384_w512.pth', + 'modelStackedLabel': 'baseline.pth', 'aiModel': 'v4', 'useModel': 'instrumental', @@ -286,8 +288,8 @@ def __init__(self): self.tta_var = tk.BooleanVar(value=data['tta']) self.outputImage_var = tk.BooleanVar(value=data['output_image']) # Models - self.instrumentalModel_var = tk.StringVar(value='') - self.stackedModel_var = tk.StringVar(value='') + self.instrumentalModel_var = tk.StringVar(value=data['modelInstrumentalLabel']) + self.stackedModel_var = tk.StringVar(value=data['modelStackedLabel']) # Stacked Options self.stack_var = tk.BooleanVar(value=data['stack']) self.stackLoops_var = tk.StringVar(value=data['stackPasses']) @@ -956,6 +958,8 @@ def save_values(self): 'useModel': 'instrumental', 'lastDir': self.lastDir, 'modelFolder': self.modelFolder_var.get(), + 'modelInstrumentalLabel': self.instrumentalModel_var.get(), + 'modelStackedLabel': self.stackedModel_var.get(), 'aiModel': self.aiModel_var.get(), })