mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 13:32:09 -07:00
check if pkl exist to apply modifications
This commit is contained in:
parent
b3134a99d0
commit
5b04cc047e
2 changed files with 13 additions and 6 deletions
|
@ -84,6 +84,7 @@ def trainerThread (s2c, c2s, e,
|
|||
if model.get_target_iter() != 0:
|
||||
if is_reached_goal:
|
||||
io.log_info('Model already trained to target iteration. You can use preview.')
|
||||
if os.path.exists("/home/deepfake/interact_dict.pkl"):
|
||||
model_save()
|
||||
os._exit(1)
|
||||
else:
|
||||
|
@ -165,6 +166,7 @@ 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"):
|
||||
model_save()
|
||||
os._exit(1)
|
||||
|
||||
|
|
|
@ -295,6 +295,11 @@ 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"):
|
||||
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']))
|
||||
else:
|
||||
default_target_iter = self.load_or_def_option('target_iter', default_value)
|
||||
self.options['target_iter'] = max(0, io.input_int("Target iteration", default_target_iter))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue