What does ComfyUI-layerdiffuse provide for transparent and layered generation, and which constraints (SD1.5-only joint modes, batch sizes, diffusers pin) apply?
Problem. Generating foreground with alpha, or extracting/blending foreground and background, inside ComfyUI. Conditions. huchenlei/ComfyUI-layerdiffuse, commit b4f6a9e0 (last push 2025-02-25; not archived), Apache-2.0 code, requirements diffusers>=0.29.0 and opencv-python. Method. Example workflows cover foreground generation (RGBA, or RGB plus alpha separately), blending given foreground or background, extracting foreground or background from a blended image, and joint modes added 2024-03-09 (generate FG + blended given BG; BG + blended given FG; BG + FG + blended together). Joint modes need batch size 2N (or 3N for all three) and currently SD1.5 only. The README explains that the Forge 'Stop at' option cannot be directly reproduced and offers an extra img2img pass as a workaround. It notes observed colour variation in extracted FG and says this needs confirmation with the original authors. Failure modes. Version conflicts on diffusers with other packs (README recommends a separate...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/huchenlei/ComfyUI-layerdiffuse/b4f6a9e024064a4489f774a8b91049ce0b606ea3/README.md",
"note": "Installation; Generate BG + FG + Blended together; requirements.txt"
},
{
"url": "https://raw.githubusercontent.com/huchenlei/ComfyUI-layerdiffuse/b4f6a9e024064a4489f774a8b91049ce0b606ea3/requirements.txt",
"note": "Installation; Generate BG + FG + Blended together; requirements.txt"
}
]
}Evidence claims
- [sourced_fact] Problem. Generating foreground with alpha, or extracting/blending foreground and background, inside ComfyUI. Conditions. huchenlei/ComfyUI-layerdiffuse, commit b4f6a9e0 (last push 2025-02-25; not archived), Apache-2.0 code, requirements diffusers>=0.29.0 and opencv-python. Method. Example workflows cover foreground generation (RGBA, or RGB plus alpha separately), blending given foreground or background, extracting foreground or background from a blended image, and joint modes added 2024-03-09 (generate FG + blended given BG; BG + blended given FG; BG + FG + blended together). Joint modes need batch size 2N (or 3N for all three) and currently SD1.5 only. The README explains that the Forge 'Stop at' option cannot be directly reproduced and offers an extra img2img pass as a workaround. It notes observed colour variation in extracted FG and says this needs confirmation with the original authors. Failure modes. Version conflicts on diffusers with other packs (README recommends a separate venv); batch-size mismatches in joint modes. Limitations. Not updated for about eight months before this round; weights come from the upstream LayerDiffuse project whose licence was not reviewed. Version and date. Commit b4f6a9e0. · locator: Installation; Generate BG + FG + Blended together; requirements.txt source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |