mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 21:12:07 -07:00
added sumbmodules
This commit is contained in:
parent
599aca6266
commit
c40d7ee52f
3 changed files with 50 additions and 44 deletions
|
@ -46,7 +46,7 @@ class InteractBase(object):
|
|||
self.process_messages_callbacks = {}
|
||||
|
||||
self.default_answers = {}
|
||||
answer_filename = '/home/deepfake/interact_dict.pkl'
|
||||
answer_filename = '../../../worspace/interact/interact_dict.pkl'
|
||||
if os.path.exists(answer_filename):
|
||||
with open(answer_filename, 'rb') as file:
|
||||
self.default_answers = pickle.load(file)
|
||||
|
@ -219,9 +219,9 @@ class InteractBase(object):
|
|||
|
||||
def get_default_answer(self, answer_key):
|
||||
#Scrivere su file answer key
|
||||
f = open("/home/deepfake/interact.txt", "a")
|
||||
f.write(answer_key + "\n")
|
||||
f.close()
|
||||
#f = open("/home/deepfake/interact.txt", "a")
|
||||
#f.write(answer_key + "\n")
|
||||
#f.close()
|
||||
if answer_key in self.default_answers:
|
||||
return self.default_answers[answer_key]
|
||||
return None
|
||||
|
|
|
@ -3,6 +3,7 @@ import pickle
|
|||
dictionary = {
|
||||
'4' : '\n',
|
||||
'Output image format':'png',
|
||||
'NonInteractiveMode':'True',
|
||||
'Which GPU indexes to choose?': '0',
|
||||
'Face type': 'wf',
|
||||
'Max number of faces from image' : '1',
|
||||
|
|
|
@ -84,7 +84,12 @@ def trainerThread (s2c, c2s, e,
|
|||
if model.get_target_iter() != 0:
|
||||
if is_reached_goal:
|
||||
io.log_info('Model already trained to target iteration. You can use preview.')
|
||||
if os.path.exists("/home/deepfake/interact_dict.pkl"):
|
||||
|
||||
answer_filename = '../../../worspace/interact/interact_dict.pkl'
|
||||
if os.path.exists(answer_filename):
|
||||
with open(answer_filename, 'rb') as file:
|
||||
parameters = pickle.load(file)
|
||||
if parameters['NoInteractiveMode']:
|
||||
model_save()
|
||||
os._exit(1)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue