mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-03-13 17:30:01 +00:00
fix: controlnet_forge boolean -> controlnet_type
This commit is contained in:
@@ -2,20 +2,20 @@ try:
|
||||
from .controlnet_ext_forge import (
|
||||
ControlNetExt,
|
||||
controlnet_exists,
|
||||
controlnet_forge,
|
||||
controlnet_type,
|
||||
get_cn_models,
|
||||
)
|
||||
except ImportError:
|
||||
from .controlnet_ext import (
|
||||
ControlNetExt,
|
||||
controlnet_exists,
|
||||
controlnet_forge,
|
||||
controlnet_type,
|
||||
get_cn_models,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"ControlNetExt",
|
||||
"controlnet_exists",
|
||||
"controlnet_forge",
|
||||
"controlnet_type",
|
||||
"get_cn_models",
|
||||
]
|
||||
|
||||
@@ -23,7 +23,7 @@ except ImportError as e:
|
||||
ext_path = Path(extensions_dir)
|
||||
ext_builtin_path = Path(extensions_builtin_dir)
|
||||
controlnet_exists = False
|
||||
controlnet_forge = False
|
||||
controlnet_type = "standard"
|
||||
controlnet_path = None
|
||||
cn_base_path = ""
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from modules.processing import StableDiffusionProcessing
|
||||
from .common import cn_model_regex
|
||||
|
||||
controlnet_exists = True
|
||||
controlnet_forge = True
|
||||
controlnet_type = "forge"
|
||||
|
||||
|
||||
def find_script(p: StableDiffusionProcessing, script_title: str) -> scripts.Script:
|
||||
|
||||
@@ -39,7 +39,7 @@ from adetailer.ui import WebuiInfo, adui, ordinal, suffix
|
||||
from controlnet_ext import (
|
||||
ControlNetExt,
|
||||
controlnet_exists,
|
||||
controlnet_forge,
|
||||
controlnet_type,
|
||||
get_cn_models,
|
||||
)
|
||||
from controlnet_ext.restore import (
|
||||
@@ -522,7 +522,7 @@ class AfterDetailerScript(scripts.Script):
|
||||
i2i._ad_disabled = True
|
||||
i2i._ad_inner = True
|
||||
|
||||
if args.ad_controlnet_model != "Passthrough" and not controlnet_forge:
|
||||
if args.ad_controlnet_model != "Passthrough" and controlnet_type != "forge":
|
||||
self.disable_controlnet_units(i2i.script_args)
|
||||
|
||||
if args.ad_controlnet_model not in ["None", "Passthrough"]:
|
||||
|
||||
Reference in New Issue
Block a user