Skip to content

Commit

Permalink
Update nodes_differential_diffusion.py
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBCoding authored Nov 22, 2024
1 parent ce31337 commit 1a86443
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions comfy_extras/nodes_differential_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ def forward(self, sigma: torch.Tensor, denoise_mask: torch.Tensor, extra_options
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 = {
Expand Down

0 comments on commit 1a86443

Please sign in to comment.