Update nodes_differential_diffusion.py

This commit is contained in:
Eric 2024-11-21 23:43:17 -05:00 committed by GitHub
parent ce31337813
commit 1a864435f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 = {