Layer Diffuse Joint Apply
Foreground, background, and blend from a single sampler run
- model
- fg_cond
- bg_cond
- blended_cond
- MODEL
This is the endgame node of the LayerDiffuse pack: generate the foreground, the background, and the blended composite all in one inference run. No input image, no conditioning on an existing layer - just a model, a prompt per layer, and a batch size big enough to hold all three outputs. It's the layer_diffusion_joint.json workflow, it's SD 1.5 only, and it's the flashiest and fiddliest node in the family.
How it works
LayeredDiffusionJointApply patches your model with the layer_sd15_joint.safetensors attention-sharing weights, which teach a single sampler pass to produce three related latents per group. The config has exactly one option - SD15, attn_sharing, Batch size (3N) - and it's a hint you shouldn't ignore: for every group of outputs, the sampler needs three latent slots. Your EmptyLatentImage batch must be a multiple of 3. Batch 3 = one foreground, one background, one blended. Batch 6 = two groups.
The three optional CONDITIONING inputs - fg_cond, bg_cond, blended_cond - are the prompts for each layer, and they're written straight into the model's transformer options as cond overrides. Give the node CLIPTextEncode output for each, or leave them empty and let the defaults ride. Output is a single patched MODEL for the KSampler.
The decode is not optional
You cannot just VAEDecode the result and move on. The batch contains interleaved layers, and only the foreground carries alpha. The pack's example workflow feeds the output through LayeredDiffusionDecodeSplit with frames: 3, which RGBA-decodes every 3rd image (your foreground) and passes the other two through as plain RGB. Then you've got three clean outputs: subject on transparency, matching background, and the composite. Get the decode wrong and you're staring at a three-slot mystery batch.
Should you use it?
It's the most elegant thing in the pack on paper - three consistent layers from one denoise, with the blend matching the subject's lighting by construction, which is exactly the part post-hoc compositing always gets wrong. The reality is that it's also the most brittle: SD 1.5 only, strict 3N batch requirement, decode gymnastics, and the author's own notes flag that the color-consistency of separated layers was never fully validated. Combined with the pack being dormant since early 2025, treat it as a fun proof-of-concept for a visual-novel or sticker-pipeline niche rather than a daily-driver tool. Same family rules otherwise: 64-multiple dimensions, ~2–3GB extra VRAM, no Flux.
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 | — |