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