mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
rename dump_dflive to export_dfm
This commit is contained in:
parent
9d6b6feb1f
commit
63c794b3d0
4 changed files with 12 additions and 12 deletions
10
main.py
10
main.py
|
@ -148,15 +148,15 @@ if __name__ == "__main__":
|
||||||
p.add_argument('--execute-program', dest="execute_program", default=[], action='append', nargs='+')
|
p.add_argument('--execute-program', dest="execute_program", default=[], action='append', nargs='+')
|
||||||
p.set_defaults (func=process_train)
|
p.set_defaults (func=process_train)
|
||||||
|
|
||||||
def process_dumpdflive(arguments):
|
def process_exportdfm(arguments):
|
||||||
osex.set_process_lowest_prio()
|
osex.set_process_lowest_prio()
|
||||||
from mainscripts import DumpDFLive
|
from mainscripts import ExportDFM
|
||||||
DumpDFLive.main(model_class_name = arguments.model_name, saved_models_path = Path(arguments.model_dir))
|
ExportDFM.main(model_class_name = arguments.model_name, saved_models_path = Path(arguments.model_dir))
|
||||||
|
|
||||||
p = subparsers.add_parser( "dumpdflive", help="Dump model to use in DFLive.")
|
p = subparsers.add_parser( "exportdfm", help="Export model to use in DeepFaceLive.")
|
||||||
p.add_argument('--model-dir', required=True, action=fixPathAction, dest="model_dir", help="Saved models dir.")
|
p.add_argument('--model-dir', required=True, action=fixPathAction, dest="model_dir", help="Saved models dir.")
|
||||||
p.add_argument('--model', required=True, dest="model_name", choices=pathex.get_all_dir_names_startswith ( Path(__file__).parent / 'models' , 'Model_'), help="Model class name.")
|
p.add_argument('--model', required=True, dest="model_name", choices=pathex.get_all_dir_names_startswith ( Path(__file__).parent / 'models' , 'Model_'), help="Model class name.")
|
||||||
p.set_defaults (func=process_dumpdflive)
|
p.set_defaults (func=process_exportdfm)
|
||||||
|
|
||||||
def process_merge(arguments):
|
def process_merge(arguments):
|
||||||
osex.set_process_lowest_prio()
|
osex.set_process_lowest_prio()
|
||||||
|
|
|
@ -19,4 +19,4 @@ def main(model_class_name, saved_models_path):
|
||||||
is_training=False,
|
is_training=False,
|
||||||
saved_models_path=saved_models_path,
|
saved_models_path=saved_models_path,
|
||||||
cpu_only=True)
|
cpu_only=True)
|
||||||
model.dump_dflive ()
|
model.export_dfm ()
|
|
@ -638,10 +638,10 @@ class AMPModel(ModelBase):
|
||||||
self.update_sample_for_preview(force_new=True)
|
self.update_sample_for_preview(force_new=True)
|
||||||
|
|
||||||
|
|
||||||
def dump_dflive (self):
|
def export_dfm (self):
|
||||||
output_path=self.get_strpath_storage_for_file('model.dflive')
|
output_path=self.get_strpath_storage_for_file('model.dfm')
|
||||||
|
|
||||||
io.log_info(f'Dumping .dflive to {output_path}')
|
io.log_info(f'Dumping .dfm to {output_path}')
|
||||||
|
|
||||||
tf = nn.tf
|
tf = nn.tf
|
||||||
with tf.device (nn.tf_default_device_name):
|
with tf.device (nn.tf_default_device_name):
|
||||||
|
|
|
@ -659,10 +659,10 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
|
||||||
if self.pretrain_just_disabled:
|
if self.pretrain_just_disabled:
|
||||||
self.update_sample_for_preview(force_new=True)
|
self.update_sample_for_preview(force_new=True)
|
||||||
|
|
||||||
def dump_dflive (self):
|
def export_dfm (self):
|
||||||
output_path=self.get_strpath_storage_for_file('model.dflive')
|
output_path=self.get_strpath_storage_for_file('model.dfm')
|
||||||
|
|
||||||
io.log_info(f'Dumping .dflive to {output_path}')
|
io.log_info(f'Dumping .dfm to {output_path}')
|
||||||
|
|
||||||
tf = nn.tf
|
tf = nn.tf
|
||||||
nn.set_data_format('NCHW')
|
nn.set_data_format('NCHW')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue