Skip to content

Commit 17fa206

Browse files
committed
Add support for V3 Nodes with backwards compatibility
1 parent b4f6a9e commit 17fa206

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

layered_diffusion.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ class LayeredDiffusionDecodeRGBA(LayeredDiffusionDecode):
129129
def decode(self, samples, images, sd_version: str, sub_batch_size: int):
130130
image, mask = super().decode(samples, images, sd_version, sub_batch_size)
131131
alpha = 1.0 - mask
132-
return JoinImageWithAlpha().join_image_with_alpha(image, alpha)
132+
if hasattr(JoinImageWithAlpha, 'execute') and callable(JoinImageWithAlpha.execute):
133+
return JoinImageWithAlpha().execute(image, alpha)
134+
else:
135+
return JoinImageWithAlpha().join_image_with_alpha(image, alpha)
133136

134137

135138
class LayeredDiffusionDecodeSplit(LayeredDiffusionDecodeRGBA):

0 commit comments

Comments
 (0)