Skip to content

Commit 78f6850

Browse files
committed
Fix gradient mask values range
1 parent e1509bc commit 78f6850

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

invokeai/app/invocations/create_gradient_mask.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def invoke(self, context: InvocationContext) -> GradientMaskOutput:
9393

9494
# redistribute blur so that the original edges are 0 and blur outwards to 1
9595
blur_tensor = (blur_tensor - 0.5) * 2
96+
blur_tensor[blur_tensor < 0] = 0.0
9697

9798
threshold = 1 - self.minimum_denoise
9899

0 commit comments

Comments
 (0)