From c2cc885672d2a7d8ffb1e9083e8b3ca536968727 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Sep 2024 22:41:47 +0100 Subject: [PATCH] Adding headless parameter to arguments to run from the cli --- modules/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core.py b/modules/core.py index b4e4a31..a66340e 100644 --- a/modules/core.py +++ b/modules/core.py @@ -70,6 +70,7 @@ def parse_args() -> None: choices=suggest_execution_providers(), nargs='+') program.add_argument('--execution-threads', help='Number of execution threads', dest='execution_threads', type=int, default=suggest_execution_threads()) + program.add_argument('--headless', help='Run in headless mode', dest='headless', default=False, action='store_true') program.add_argument('-v', '--version', action='version', version=f'{modules.metadata.name} {modules.metadata.version}') @@ -98,6 +99,7 @@ def parse_args() -> None: modules.globals.max_memory = args.max_memory modules.globals.execution_providers = decode_execution_providers(args.execution_provider) modules.globals.execution_threads = args.execution_threads + modules.globals.headless = args.headless # Handle face enhancer tumbler modules.globals.fp_ui['face_enhancer'] = 'face_enhancer' in args.frame_processor