DeepFaceLab icon indicating copy to clipboard operation
DeepFaceLab copied to clipboard

Adding Non-Interactive-Mode feature to DeepFaceLab

Open leno3003 opened this issue 3 years ago • 0 comments

Hi everyone, this patch adds to DeepFaceLab a full non-interactive-mode so that DeepFaceLab can optionally run without asking any question to the user. It's entirely optional, so if it is not enabled, the current flow remains unchanged.

The non-interactive-mode works by adding a json file in workspace/interact/no_interact_dict.json that contains a dictionary of key/value pairs, one for each question that is answered automatically. Most of the changes are in the interact.py module, where the various input_* have been changed in the following way:

  • when asking a question s, a method get_default_answer is called in order to understand if there's already an answer for s. In that case, the answer is taken from the json file, without asking anything to the user.
  • In addition all methods add an optional answer_key parameter to control the key searched in the dictionary.
  • The trainer module can run with the non-interactive-mode.
  • I've added a new file no_interact_dict.py that generates a sample json to show how the module is supposed to be used.

leno3003 avatar Apr 04 '22 08:04 leno3003