fix: controlnet unit input_mode

This commit is contained in:
Bingsu
2023-05-24 09:20:37 +09:00
parent b63205b4e3
commit a156ad89c5
2 changed files with 6 additions and 5 deletions

View File

@@ -1 +1 @@
__version__ = "23.5.17"
__version__ = "23.5.18.dev0"

View File

@@ -301,11 +301,12 @@ class AfterDetailerScript(scripts.Script):
def disable_controlnet_units(self, script_args: list[Any]) -> bool:
cn_used = False
for obj in script_args:
if "controlnet" in obj.__class__.__name__.lower() and hasattr(
obj, "enabled"
):
obj.enabled = False
if "controlnet" in obj.__class__.__name__.lower():
cn_used = True
if hasattr(obj, "enabled"):
obj.enabled = False
if hasattr(obj, "input_mode"):
obj.input_mode = getattr(obj.input_mode, "SIMPLE", "simple")
return cn_used