mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-04-25 16:59:00 +00:00
feat: controlnet passthrough option
This commit is contained in:
@@ -424,7 +424,6 @@ class AfterDetailerScript(scripts.Script):
|
||||
def script_filter(self, p, args: ADetailerArgs):
|
||||
script_runner = copy(p.scripts)
|
||||
script_args = self.script_args_copy(p.script_args)
|
||||
self.disable_controlnet_units(script_args)
|
||||
|
||||
ad_only_seleted_scripts = opts.data.get("ad_only_seleted_scripts", True)
|
||||
if not ad_only_seleted_scripts:
|
||||
@@ -515,9 +514,12 @@ class AfterDetailerScript(scripts.Script):
|
||||
i2i._ad_disabled = True
|
||||
i2i._ad_inner = True
|
||||
|
||||
if args.ad_controlnet_model != "None":
|
||||
if args.ad_controlnet_model != "Passthrough":
|
||||
self.disable_controlnet_units(i2i.script_args)
|
||||
|
||||
if args.ad_controlnet_model not in ["None", "Passthrough"]:
|
||||
self.update_controlnet_args(i2i, args)
|
||||
else:
|
||||
elif args.ad_controlnet_model != "Passthrough":
|
||||
i2i.control_net_enabled = False
|
||||
|
||||
return i2i
|
||||
|
||||
Reference in New Issue
Block a user