mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-15 01:23:44 -07:00
automatized arguments with pickle
This commit is contained in:
parent
d132667138
commit
b3134a99d0
2 changed files with 7 additions and 2 deletions
|
@ -5,6 +5,8 @@ dictionary = {
|
||||||
'[png] Output image format ( png/jpg ?:help ) : ' : 'png',
|
'[png] Output image format ( png/jpg ?:help ) : ' : 'png',
|
||||||
'Override' : '0',
|
'Override' : '0',
|
||||||
' Press enter in 2 seconds to override model settings. ' : '\n',
|
' Press enter in 2 seconds to override model settings. ' : '\n',
|
||||||
|
'Enable pretraining mode' : 'n',
|
||||||
|
'Enable gradient clipping' : 'n',
|
||||||
'[0] Which GPU indexes to choose? : ' : '0',
|
'[0] Which GPU indexes to choose? : ' : '0',
|
||||||
'[wf] Face type ( f/wf/head ?:help ) : ' : 'wf',
|
'[wf] Face type ( f/wf/head ?:help ) : ' : 'wf',
|
||||||
'[0] Max number of faces from image ( ?:help ) : ' : '0',
|
'[0] Max number of faces from image ( ?:help ) : ' : '0',
|
||||||
|
@ -14,7 +16,7 @@ dictionary = {
|
||||||
'[y] Continue extraction? ( y/n ?:help ) : ' : 'True',
|
'[y] Continue extraction? ( y/n ?:help ) : ' : 'True',
|
||||||
'[2] Autobackup every N hour ( 0..24 ?:help ) : ' : '2',
|
'[2] Autobackup every N hour ( 0..24 ?:help ) : ' : '2',
|
||||||
'[n] Write preview history ( y/n ?:help ) : ' : 'False',
|
'[n] Write preview history ( y/n ?:help ) : ' : 'False',
|
||||||
'[83000] Target iteration : ' : '100000',
|
'[83000] Target iteration : ' : '110000',
|
||||||
'[n] Flip SRC faces randomly ( y/n ?:help ) : ' : 'False',
|
'[n] Flip SRC faces randomly ( y/n ?:help ) : ' : 'False',
|
||||||
'[n] Flip DST faces randomly ( y/n ?:help ) : ' : 'False',
|
'[n] Flip DST faces randomly ( y/n ?:help ) : ' : 'False',
|
||||||
'[4] Batch_size ( ?:help ) : ' : '4',
|
'[4] Batch_size ( ?:help ) : ' : '4',
|
||||||
|
|
|
@ -84,6 +84,8 @@ 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.')
|
||||||
|
model_save()
|
||||||
|
os._exit(1)
|
||||||
else:
|
else:
|
||||||
io.log_info('Starting. Target iteration: %d. Press "Enter" to stop training and save model.' % ( model.get_target_iter() ) )
|
io.log_info('Starting. Target iteration: %d. Press "Enter" to stop training and save model.' % ( model.get_target_iter() ) )
|
||||||
else:
|
else:
|
||||||
|
@ -163,7 +165,8 @@ def trainerThread (s2c, c2s, e,
|
||||||
model_save()
|
model_save()
|
||||||
is_reached_goal = True
|
is_reached_goal = True
|
||||||
io.log_info ('You can use preview now.')
|
io.log_info ('You can use preview now.')
|
||||||
exit(0)
|
model_save()
|
||||||
|
os._exit(1)
|
||||||
|
|
||||||
need_save = False
|
need_save = False
|
||||||
while time.time() - last_save_time >= save_interval_min*60:
|
while time.time() - last_save_time >= save_interval_min*60:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue