mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-10 15:23:32 -07:00
fix choosing preview image on options override
This commit is contained in:
parent
ba4e377d13
commit
66a12a973a
1 changed files with 29 additions and 31 deletions
|
@ -74,8 +74,8 @@ class ModelBase(object):
|
||||||
self.options.pop('epoch')
|
self.options.pop('epoch')
|
||||||
if self.iter != 0:
|
if self.iter != 0:
|
||||||
self.options = model_data['options']
|
self.options = model_data['options']
|
||||||
self.loss_history = model_data['loss_history'] if 'loss_history' in model_data.keys() else []
|
self.loss_history = model_data.get('loss_history', [])
|
||||||
self.sample_for_preview = model_data['sample_for_preview'] if 'sample_for_preview' in model_data.keys() else None
|
self.sample_for_preview = model_data.get('sample_for_preview', None)
|
||||||
|
|
||||||
ask_override = self.is_training_mode and self.iter != 0 and io.input_in_time ("Press enter in 2 seconds to override model settings.", 5 if io.is_colab() else 2 )
|
ask_override = self.is_training_mode and self.iter != 0 and io.input_in_time ("Press enter in 2 seconds to override model settings.", 5 if io.is_colab() else 2 )
|
||||||
|
|
||||||
|
@ -178,9 +178,7 @@ class ModelBase(object):
|
||||||
if not isinstance(generator, SampleGeneratorBase):
|
if not isinstance(generator, SampleGeneratorBase):
|
||||||
raise ValueError('training data generator is not subclass of SampleGeneratorBase')
|
raise ValueError('training data generator is not subclass of SampleGeneratorBase')
|
||||||
|
|
||||||
if (self.sample_for_preview is None) or (self.iter == 0):
|
if self.sample_for_preview is None or choose_preview_history:
|
||||||
|
|
||||||
if self.iter == 0:
|
|
||||||
if choose_preview_history and io.is_support_windows():
|
if choose_preview_history and io.is_support_windows():
|
||||||
wnd_name = "[p] - next. [enter] - confirm."
|
wnd_name = "[p] - next. [enter] - confirm."
|
||||||
io.named_window(wnd_name)
|
io.named_window(wnd_name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue