mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
refactor monolithic shared.py and separate legacy options with logging
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+8
-1
@@ -4,10 +4,18 @@ import argparse
|
||||
from modules.paths import data_path, models_path
|
||||
|
||||
|
||||
parsed = None
|
||||
parser = argparse.ArgumentParser(description="SD.Next", conflict_handler='resolve', epilog='For other options see UI Settings page', prog='', add_help=True, formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200))
|
||||
parser._optionals = parser.add_argument_group('Other options') # pylint: disable=protected-access
|
||||
|
||||
|
||||
def parse_args():
|
||||
global parsed # pylint: disable=global-statement
|
||||
if parsed is None:
|
||||
parsed, _ = parser.parse_known_args()
|
||||
return parsed
|
||||
|
||||
|
||||
def main_args():
|
||||
# main server args
|
||||
group_config = parser.add_argument_group('Configuration')
|
||||
@@ -152,7 +160,6 @@ def settings_args(opts, args):
|
||||
opts.data['clip_skip'] = 1
|
||||
|
||||
opts.onchange("lora_dir", lambda: setattr(args, "lora_dir", opts.lora_dir))
|
||||
opts.onchange("lyco_dir", lambda: setattr(args, "lyco_dir", opts.lyco_dir))
|
||||
|
||||
if "USED_VSCODE_COMMAND_PICKARGS" in os.environ:
|
||||
import shlex
|
||||
|
||||
Reference in New Issue
Block a user