[Inference.Core] Layer Diffuse Cond Joint Apply
Pulling a transparent layer out of a real photo
- model
- image
- cond
- blended_cond
- MODEL
Every other node in the Layer Diffuse family generates a transparent layer from a prompt and noise. This one is different - it takes an image input, which means it's built for pulling a coherent layer out of an image you already have, rather than generating one from scratch. If you've got a real photo and want to smart-cutout a subject with soft, diffusion-quality alpha edges instead of a hard segmentation mask, this is the node in the family built for that.
Why it works differently
Inference_Core_LayeredDiffusionCondJointApply is SD1.5-only - its only config choice is either SD15, Foreground, attn_sharing, Batch size (2N) or SD15, Background, attn_sharing, Batch size (2N). The name spells out the mechanism: it runs an img2img-style joint pass where your batch gets internally duplicated to 2N samples, and attention is shared across that pair during sampling so the layer being solved for stays visually locked to your source image instead of drifting into something disconnected - a real risk with SD1.5, which is small enough to hallucinate freely if you don't anchor it.
image is your source photo - the thing you're extracting a layer from. config picks which side you're solving for: Foreground if you want the subject isolated with alpha, Background if you want the plate behind it reconstructed. cond and blended_cond are both optional - leave them empty for a zero-conditioning extraction, or wire text conditioning in if the automatic result isn't isolating the subject you actually wanted.
The output is a single patched MODEL. Sample it and decode with Inference_Core_LayeredDiffusionDecode downstream to get your actual image-plus-alpha result.
When to reach for this over its siblings
If you're generating art from a prompt and want it transparent, use plain Inference_Core_LayeredDiffusionApply - it's simpler and doesn't require a source image at all. Reach for Cond Joint Apply specifically when you're starting from a real photograph and want a diffusion-quality cutout rather than a from-scratch generation. It sits closer to "smart cutout powered by an SD1.5 prior" than to "generate a sticker."
Installing it
Comes with the pack. Via 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] (swap the extra for [cuda12] / [rocm] / [directml] / [cpu] to match your hardware) and restart. Expect the first run to fetch Layer Diffuse's conversion weights from Hugging Face, same as the rest of this family.
Practical gotchas
Because this is built on SD1.5, feed it images sized close to SD1.5's comfortable native range rather than a huge modern photo straight off a phone. SD1.5 handling large resolutions without tiling or an upscale step tends to duplicate features and go weird - that's a general SD1.5 limitation, not something specific to this node, but it shows up here just the same. The community's own read on SD1.5 is still worth keeping in mind: it's a genuinely small, fast model that still runs comfortably on very modest hardware, which is a real part of why LayerDiffuse-on-SD1.5 pipelines keep showing up in lightweight local tools rather than only on beefier SDXL setups.
Since this is SD1.5-only, wiring an SDXL checkpoint into it won't produce a subtly wrong cutout - it'll fail outright on the mismatched architecture, so confirm your model before debugging anything else.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| image | IMAGE | — | |
| config | COMBO | 2 options: SD15, Foreground, attn_sharing, Batch size (2N), SD15, Background, attn_sharing, Batch size (2N) | |
| condopt | CONDITIONING | — | |
| blended_condopt | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |