MCPcopy
hub / github.com/huchenlei/ComfyUI-layerdiffuse / apply_c_concat

Method apply_c_concat

layered_diffusion.py:300–313  ·  view source on GitHub ↗

Set foreground/background concat condition.

(self, cond, uncond, c_concat)

Source from the content-addressed store, hash-verified

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,

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected