Revert "Revert "Updates Model CLI options""

This reverts commit fd0d94360d.
This commit is contained in:
Jeremy Hummel 2019-09-07 16:11:42 -07:00
commit 6c4b68c6b9

View file

@ -45,12 +45,20 @@ class SAEModel(ModelBase):
self.options['face_type'] = io.input_str("Half or Full face? (h/f, ?:help skip:f) : ", default_face_type,
['h', 'f'],
help_message="Half face has better resolution, but covers less area of cheeks.").lower()
self.options['learn_mask'] = io.input_bool("Learn mask? (y/n, ?:help skip:y) : ", True,
help_message="Learning mask can help model to recognize face directions. Learn without mask can reduce model size, in this case converter forced to use 'not predicted mask' that is not smooth as predicted. Model with style values can be learned without mask and produce same quality result.")
else:
self.options['resolution'] = self.options.get('resolution', default_resolution)
self.options['face_type'] = self.options.get('face_type', default_face_type)
self.options['learn_mask'] = self.options.get('learn_mask', True)
if is_first_run or ask_override:
default_learn_mask = self.options.get('learn_mask', True)
self.options['learn_mask'] = io.input_bool(
f'Learn mask? (y/n, ?:help skip:{yn_str[default_learn_mask]}) : ',
default_learn_mask,
help_message="Learning mask can help model to recognize face directions. Learn without mask can reduce "
"model size, in this case converter forced to use 'not predicted mask' that is not smooth "
"as predicted. Model with style values can be learned without mask and produce same "
"quality result."
)
if (is_first_run or ask_override) and 'tensorflow' in self.device_config.backend:
def_optimizer_mode = self.options.get('optimizer_mode', 1)