added sumbmodules

This commit is contained in:
leno3003 2022-03-30 15:42:12 +02:00
parent 675c10a758
commit c131eb692f
2 changed files with 13 additions and 7 deletions

View file

@ -171,7 +171,10 @@ def trainerThread (s2c, c2s, e,
model_save()
is_reached_goal = True
io.log_info ('You can use preview now.')
if os.path.exists("/home/deepfake/interact_dict.pkl"):
if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file:
parameters = pickle.load(file)
if parameters['NoInteractiveMode']:
model_save()
os._exit(1)

View file

@ -295,7 +295,10 @@ class ModelBase(object):
self.choose_preview_history = io.input_bool("Randomly choose new image for preview history", False, help_message="Preview image history will stay stuck with old faces if you reuse the same model on different celebs. Choose no unless you are changing src/dst to a new person")
def ask_target_iter(self, default_value=0):
if os.path.exists("/home/deepfake/interact_dict.pkl"):
if os.path.exists(answer_filename):
with open(answer_filename, 'rb') as file:
parameters = pickle.load(file)
if parameters['NoInteractiveMode']:
default_target_iter = self.load_or_def_option('target_iter', default_value + 10000)
self.options['target_iter'] = max(0, default_target_iter + 10000)
print("TARGET ITERATION: " + str(self.options['target_iter']))