[Inference.Core] Layer Diffuse Joint Apply
Generating foreground, background, and composite together
- model
- fg_cond
- bg_cond
- blended_cond
- MODEL
Joint Apply is the from-scratch sibling of Inference_Core_LayeredDiffusionCondJointApply. That node pulls a layer out of an existing photo; this one needs no source image at all - it generates a foreground layer, a background layer, and the blended composite of the two, all together in one batched sampling pass, using SD1.5's shared attention to keep all three views consistent with each other from the ground up.
Why there's only one config option
config has exactly one choice here: SD15, attn_sharing, Batch size (3N). That's not an oversight - this node is specifically the three-way joint mode, and SD1.5 is the only base this pack wires it up for. The "3N" in the name tells you what's happening to your batch under the hood: internally, your generation triples to cover all three layers at once, sharing attention across them during sampling so the foreground, background, and composite stay visually glued together rather than drifting into three unrelated images that happen to share a seed.
Instead of a single top-level cond/uncond pair, conditioning happens per-layer through three optional inputs: fg_cond, bg_cond, and blended_cond. Leave any of them empty for a zero-conditioning generation of that layer, or wire in text conditioning to steer a specific layer independently - say, describing the foreground subject and background scene separately while still letting attention sharing keep them visually consistent. model is the only required input beyond config.
What it costs
That 3N batch multiplier is real compute, not just a naming quirk. A batch size of 1 in your Empty Latent effectively becomes 3 samples' worth of memory and time once this node's patch is applied, on top of whatever SD1.5 already needs. Budget VRAM accordingly - this is noticeably heavier than a normal SD1.5 generation, especially if you push resolution above SD1.5's comfortable native range.
Where it fits downstream
This is the exact node Inference_Core_LayeredDiffusionDecodeSplit with frames=3 is built for. Sample the triple-batch latent normally, VAE Decode it, then feed both into DecodeSplit to get your foreground, background, and blended composite back out as three separate images.
Installing it
Comes with the pack. ComfyUI Manager: search "ComfyUI-Inference-Core-Nodes". Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes
then install.py, or pip install -e .[cuda] (or [cuda12] / [rocm] / [directml] / [cpu]) and restart. Expect a first-run download of Layer Diffuse's conversion weights, same as the rest of the family.
Practical notes
Since this is SD1.5-only, an SDXL checkpoint fed into it will fail outright rather than produce a subtly wrong result - confirm your base model first if something breaks immediately. Beyond that, the honest tradeoff to know going in: SD1.5 remains genuinely light hardware-wise (the community still runs it comfortably on very modest cards), but tripling the batch under attention sharing eats back a real chunk of that headroom, so don't assume "it's just SD1.5" means this specific node is cheap. If VRAM is tight, this is the Layer Diffuse node to be most careful with - start at a small batch size and modest resolution before scaling up.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| config | COMBO | 1 options: SD15, attn_sharing, Batch size (3N) | |
| fg_condopt | CONDITIONING | — | |
| bg_condopt | CONDITIONING | — | |
| blended_condopt | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |