feat: cn inpaint modules

This commit is contained in:
Bingsu
2023-06-19 23:04:20 +09:00
parent a6467ec968
commit ad13b03fa3
4 changed files with 55 additions and 7 deletions

View File

@@ -49,16 +49,22 @@ class ControlNetExt:
self.cn_models.extend(m for m in models if cn_model_regex.search(m))
def update_scripts_args(
self, p, model: str, weight: float, guidance_start: float, guidance_end: float
self,
p,
model: str,
module: str | None,
weight: float,
guidance_start: float,
guidance_end: float,
):
if (not self.cn_available) or model == "None":
return
module = None
for m, v in cn_model_module.items():
if m in model:
module = v
break
if module is None:
for m, v in cn_model_module.items():
if m in model:
module = v
break
cn_units = [
self.external_cn.ControlNetUnit(