[Inference.Core] Layer Diffuse Decode (Split)
Unpacking a joint foreground/background batch
- samples
- images
- IMAGE
- IMAGE
- IMAGE
This is the sibling of Inference_Core_LayeredDiffusionDecode for a specific situation: you generated multiple Layer Diffuse layers in one batched pass using one of the Joint Apply nodes (Inference_Core_LayeredDiffusionJointApply or Inference_Core_LayeredDiffusionCondJointApply), and instead of a single RGB-plus-alpha result, you need each layer pulled out as its own separate image.
What "split" actually means here
The Joint Apply nodes work by packing several coordinated layers into one batch and using SD1.5's attention sharing to keep them visually consistent with each other - a foreground layer, a background layer, and sometimes the blended composite of the two, all sampled together so they agree on lighting and placement. Plain Decode assumes one layer per batch entry and collapses everything down to a single image-plus-mask pair, which is the wrong shape for a packed multi-layer batch. DecodeSplit instead pulls the batch apart and hands you three separate IMAGE outputs.
The frames input (2 or 3, default 2) tells it how many layers are actually packed in there. Set it to 2 and you get your two layers back in the first two output slots, with the third effectively unused. Set it to 3 and all three outputs get filled - foreground, background, and the blended composite the joint attention-sharing pass also produced alongside them. Wire whichever outputs you actually need onward into Save Image or further compositing; the ones you don't need can just be left disconnected.
samples and images work exactly as they do in plain Decode - the latent from your sampler and the matching VAE-decoded image, not an arbitrary image from elsewhere in your graph. sd_version (SD15 or SDXL, default SDXL) still has to match your Apply-stage config, and sub_batch_size (1–4096, default 16) is still just a VRAM knob for chunking the decode.
When to use this instead of plain Decode
Only after a Joint Apply node. If you used plain Inference_Core_LayeredDiffusionApply for a single transparent layer, use plain Decode - running DecodeSplit on an ordinary single-layer batch will misinterpret your regular batch images as if they were packed layers, which is not what you want. The frames value should match how the specific Joint Apply node you used actually packs its batch: the two-layer joint nodes want frames=2, the three-layer (Batch size (3N)) joint node wants frames=3.
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. No separate model download beyond whatever Apply already pulled from Hugging Face on first run.
Troubleshooting
Mismatched frames against what was actually packed upstream is the main way this goes sideways - you'll get scrambled or duplicated-looking layers in the output slots rather than a clean error, since the node has no way to know your batch doesn't actually contain what you told it to expect. If your three outputs look like nonsense, double-check frames against which Joint Apply node produced the batch before assuming the decode itself is broken. Beyond that, the same sd_version-mismatch and VRAM-via-sub_batch_size notes from plain Decode apply here unchanged.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| images | IMAGE | — | |
| frames | INT | 22–3 | — |
| sd_version | COMBO | SDXL | 2 options: SD15, SDXL |
| sub_batch_size | INT | 161–4096 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |