mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-12 08:07:03 -07:00
add more parameters, so that the script can run in non interactive mode
This commit is contained in:
parent
cd83f6fedf
commit
51eccfb5a3
5 changed files with 333 additions and 195 deletions
|
@ -122,7 +122,7 @@ class FacesetEnhancerSubprocessor(Subprocessor):
|
|||
|
||||
return (0, filepath, None)
|
||||
|
||||
def process_folder ( dirpath, cpu_only=False, force_gpu_idxs=None ):
|
||||
def process_folder ( dirpath, cpu_only=False, force_gpu_idxs=None, is_merge=None ):
|
||||
device_config = nn.DeviceConfig.GPUIndexes( force_gpu_idxs or nn.ask_choose_device_idxs(suggest_all_gpu=True) ) \
|
||||
if not cpu_only else nn.DeviceConfig.CPU()
|
||||
|
||||
|
@ -142,7 +142,9 @@ def process_folder ( dirpath, cpu_only=False, force_gpu_idxs=None ):
|
|||
image_paths = [Path(x) for x in pathex.get_image_paths( dirpath )]
|
||||
result = FacesetEnhancerSubprocessor ( image_paths, output_dirpath, device_config=device_config).run()
|
||||
|
||||
is_merge = io.input_bool (f"\r\nMerge {output_dirpath_parts} to {dirpath_parts} ?", True)
|
||||
if is_merge is None:
|
||||
is_merge = io.input_bool (f"\r\nMerge {output_dirpath_parts} to {dirpath_parts} ?", True)
|
||||
|
||||
if is_merge:
|
||||
io.log_info (f"Copying processed files to {dirpath_parts}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue