From ea67e35a455d45b1a44ba739d7e554b04f88ce3f Mon Sep 17 00:00:00 2001 From: Gee <17325189+GeeCastro@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:32:06 +0000 Subject: [PATCH] add sum case to blend node --- comfy_extras/nodes_post_processing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/comfy_extras/nodes_post_processing.py b/comfy_extras/nodes_post_processing.py index a52a90e2c..7ac83ca64 100644 --- a/comfy_extras/nodes_post_processing.py +++ b/comfy_extras/nodes_post_processing.py @@ -24,7 +24,7 @@ class Blend(io.ComfyNode): io.Image.Input("image1"), io.Image.Input("image2"), io.Float.Input("blend_factor", default=0.5, min=0.0, max=1.0, step=0.01), - io.Combo.Input("blend_mode", options=["normal", "multiply", "screen", "overlay", "soft_light", "difference"]), + io.Combo.Input("blend_mode", options=["normal", "multiply", "screen", "overlay", "soft_light", "difference", "sum"]), ], outputs=[ io.Image.Output(), @@ -59,6 +59,8 @@ class Blend(io.ComfyNode): return torch.where(img2 <= 0.5, img1 - (1 - 2 * img2) * img1 * (1 - img1), img1 + (2 * img2 - 1) * (cls.g(img1) - img1)) elif mode == "difference": return img1 - img2 + elif mode == "sum": + return img1 + img2 raise ValueError(f"Unsupported blend mode: {mode}") @classmethod