From 1a864435f611428e0304412c7b4f649161a9e9c4 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 21 Nov 2024 23:43:17 -0500 Subject: [PATCH] Update nodes_differential_diffusion.py --- comfy_extras/nodes_differential_diffusion.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/comfy_extras/nodes_differential_diffusion.py b/comfy_extras/nodes_differential_diffusion.py index 03f2a1b0..1ada3270 100644 --- a/comfy_extras/nodes_differential_diffusion.py +++ b/comfy_extras/nodes_differential_diffusion.py @@ -43,9 +43,11 @@ class DifferentialDiffusion(): binary_mask = (denoise_mask >= threshold).to(denoise_mask.dtype) # Blend binary mask with the original denoise_mask using strength - blended_mask = strength * binary_mask + (1 - strength) * denoise_mask - - return blended_mask + if strength and strength < 1: + blended_mask = strength * binary_mask + (1 - strength) * denoise_mask + return blended_mask + else: + return binary_mask NODE_CLASS_MAPPINGS = {