DeepFaceLab
DeepFaceLab copied to clipboard
Adding Non-Interactive-Mode feature to DeepFaceLab
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 methodget_default_answeris called in order to understand if there's already an answer fors. 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_keyparameter 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.pythat generates a sample json to show how the module is supposed to be used.