mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-01-26 19:29:54 +00:00
feat: add controlnet union model
This commit is contained in:
@@ -8,4 +8,5 @@ cn_model_module = {
|
||||
"tile": "tile_resample",
|
||||
"depth": "depth_midas",
|
||||
}
|
||||
cn_model_regex = re.compile("|".join(cn_model_module.keys()), flags=re.IGNORECASE)
|
||||
_names = [*cn_model_module, "union"]
|
||||
cn_model_regex = re.compile("|".join(_names), flags=re.IGNORECASE)
|
||||
|
||||
@@ -61,13 +61,13 @@ class ControlNetExt:
|
||||
if (not self.cn_available) or model == "None":
|
||||
return
|
||||
|
||||
if module is None or module == "None":
|
||||
if module == "None":
|
||||
module = None
|
||||
if module is None:
|
||||
for m, v in cn_model_module.items():
|
||||
if m in model:
|
||||
module = v
|
||||
break
|
||||
else:
|
||||
module = None
|
||||
|
||||
cn_units = [
|
||||
self.external_cn.ControlNetUnit(
|
||||
|
||||
Reference in New Issue
Block a user