Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ComfyUI-layerdiffuse
# ComfyUI-layerdiffuse - with fix for ComfyUI V3 Schema
This fork contains fix for V3 Schema in ComfyUi, while it also keeps backwards compability for V1. It can be used with older, as well as newer ComfyUI versions.

ComfyUI implementation of https://github.com/layerdiffusion/LayerDiffuse.

## Installation
Expand Down
5 changes: 4 additions & 1 deletion layered_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ class LayeredDiffusionDecodeRGBA(LayeredDiffusionDecode):
def decode(self, samples, images, sd_version: str, sub_batch_size: int):
image, mask = super().decode(samples, images, sd_version, sub_batch_size)
alpha = 1.0 - mask
return JoinImageWithAlpha().join_image_with_alpha(image, alpha)
if hasattr(JoinImageWithAlpha, 'execute') and callable(JoinImageWithAlpha.execute):
return JoinImageWithAlpha().execute(image, alpha)
else:
return JoinImageWithAlpha().join_image_with_alpha(image, alpha)


class LayeredDiffusionDecodeSplit(LayeredDiffusionDecodeRGBA):
Expand Down