From 62591c43bd7acbf96b07daff292bee6f29682787 Mon Sep 17 00:00:00 2001 From: Dowon Date: Sat, 20 Jul 2024 17:23:37 +0900 Subject: [PATCH] fix: fix typo --- aaaaaa/helper.py | 2 +- scripts/!adetailer.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aaaaaa/helper.py b/aaaaaa/helper.py index 27dd6a9..c9c50c9 100644 --- a/aaaaaa/helper.py +++ b/aaaaaa/helper.py @@ -45,7 +45,7 @@ def pause_total_tqdm(): @contextmanager -def preseve_prompts(p: PT): +def preserve_prompts(p: PT): all_pt = copy(p.all_prompts) all_ng = copy(p.all_negative_prompts) try: diff --git a/scripts/!adetailer.py b/scripts/!adetailer.py index 2037b5e..e47df57 100644 --- a/scripts/!adetailer.py +++ b/scripts/!adetailer.py @@ -20,7 +20,7 @@ from aaaaaa.helper import ( change_torch_load, copy_extra_params, pause_total_tqdm, - preseve_prompts, + preserve_prompts, ) from aaaaaa.p_method import ( get_i, @@ -447,8 +447,8 @@ class AfterDetailerScript(scripts.Script): script_runner = copy(p.scripts) script_args = self.script_args_copy(p.script_args) - ad_only_seleted_scripts = opts.data.get("ad_only_seleted_scripts", True) - if not ad_only_seleted_scripts: + ad_only_selected_scripts = opts.data.get("ad_only_selected_scripts", True) + if not ad_only_selected_scripts: return script_runner, script_args ad_script_names_string: str = opts.data.get("ad_script_names", SCRIPT_DEFAULT) @@ -802,7 +802,7 @@ class AfterDetailerScript(scripts.Script): if need_call_postprocess(p): dummy = Processed(p, [], p.seed, "") - with preseve_prompts(p): + with preserve_prompts(p): p.scripts.postprocess(copy(p), dummy) is_processed = False @@ -818,7 +818,7 @@ class AfterDetailerScript(scripts.Script): ) if need_call_process(p): - with preseve_prompts(p): + with preserve_prompts(p): copy_p = copy(p) if hasattr(p.scripts, "before_process"): p.scripts.before_process(copy_p) @@ -854,7 +854,7 @@ def on_ui_settings(): "ad_extra_models_dir", shared.OptionInfo( default="", - label="Extra paths to scan adetailer models seperated by vertical bars(|)", + label="Extra paths to scan adetailer models separated by vertical bars(|)", component=gr.Textbox, section=section, ) @@ -873,7 +873,7 @@ def on_ui_settings(): ) shared.opts.add_option( - "ad_only_seleted_scripts", + "ad_only_selected_scripts", shared.OptionInfo( True, "Apply only selected scripts to ADetailer", section=section ),