Set foreground/background concat condition.
(self, cond, uncond, c_concat)
| 298 | ) |
| 299 | |
| 300 | def apply_c_concat(self, cond, uncond, c_concat): |
| 301 | """Set foreground/background concat condition.""" |
| 302 | |
| 303 | def write_c_concat(cond): |
| 304 | new_cond = [] |
| 305 | for t in cond: |
| 306 | n = [t[0], t[1].copy()] |
| 307 | if "model_conds" not in n[1]: |
| 308 | n[1]["model_conds"] = {} |
| 309 | n[1]["model_conds"]["c_concat"] = CONDRegular(c_concat) |
| 310 | new_cond.append(n) |
| 311 | return new_cond |
| 312 | |
| 313 | return (write_c_concat(cond), write_c_concat(uncond)) |
| 314 | |
| 315 | def apply_layered_diffusion( |
| 316 | self, |
no outgoing calls
no test coverage detected