Skip to content

Commit d4c6c9e

Browse files
authored
fix(FeatherMask): correct negative zero indexing for right/bottom feathering (Comfy-Org#12881)
1 parent 264b003 commit d4c6c9e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

comfy_extras/nodes_mask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,15 @@ def execute(cls, mask, left, top, right, bottom) -> IO.NodeOutput:
330330

331331
for x in range(right):
332332
feather_rate = (x + 1) / right
333-
output[:, :, -x] *= feather_rate
333+
output[:, :, -(x + 1)] *= feather_rate
334334

335335
for y in range(top):
336336
feather_rate = (y + 1) / top
337337
output[:, y, :] *= feather_rate
338338

339339
for y in range(bottom):
340340
feather_rate = (y + 1) / bottom
341-
output[:, -y, :] *= feather_rate
341+
output[:, -(y + 1), :] *= feather_rate
342342

343343
return IO.NodeOutput(output)
344344

0 commit comments

Comments
 (0)