mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-03-07 06:20:02 +00:00
feat: extra models path option
This commit is contained in:
@@ -53,7 +53,10 @@ from modules.shared import cmd_opts, opts, state
|
||||
|
||||
no_huggingface = getattr(cmd_opts, "ad_no_huggingface", False)
|
||||
adetailer_dir = Path(models_path, "adetailer")
|
||||
model_mapping = get_models(adetailer_dir, huggingface=not no_huggingface)
|
||||
extra_models_dir = Path(shared.opts.data.get("ad_extra_models_dir", ""))
|
||||
model_mapping = get_models(
|
||||
adetailer_dir, extra_dir=extra_models_dir, huggingface=not no_huggingface
|
||||
)
|
||||
txt2img_submit_button = img2img_submit_button = None
|
||||
SCRIPT_DEFAULT = "dynamic_prompting,dynamic_thresholding,wildcard_recursive,wildcards,lora_block_weight"
|
||||
|
||||
@@ -781,6 +784,16 @@ def on_ui_settings():
|
||||
),
|
||||
)
|
||||
|
||||
shared.opts.add_option(
|
||||
"ad_extra_models_path",
|
||||
shared.OptionInfo(
|
||||
default="",
|
||||
label="Extra path to scan adetailer models",
|
||||
component=gr.Textbox,
|
||||
section=section,
|
||||
),
|
||||
)
|
||||
|
||||
shared.opts.add_option(
|
||||
"ad_save_previews",
|
||||
shared.OptionInfo(False, "Save mask previews", section=section),
|
||||
|
||||
Reference in New Issue
Block a user