mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 22:34:25 -07:00
Revert "Revert "Updates Model CLI options""
This reverts commit fd0d94360d
.
This commit is contained in:
parent
fd0d94360d
commit
6c4b68c6b9
1 changed files with 11 additions and 3 deletions
|
@ -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,
|
self.options['face_type'] = io.input_str("Half or Full face? (h/f, ?:help skip:f) : ", default_face_type,
|
||||||
['h', 'f'],
|
['h', 'f'],
|
||||||
help_message="Half face has better resolution, but covers less area of cheeks.").lower()
|
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:
|
else:
|
||||||
self.options['resolution'] = self.options.get('resolution', default_resolution)
|
self.options['resolution'] = self.options.get('resolution', default_resolution)
|
||||||
self.options['face_type'] = self.options.get('face_type', default_face_type)
|
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:
|
if (is_first_run or ask_override) and 'tensorflow' in self.device_config.backend:
|
||||||
def_optimizer_mode = self.options.get('optimizer_mode', 1)
|
def_optimizer_mode = self.options.get('optimizer_mode', 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue