Skip to content

Commit 9aaa400

Browse files
authored
fix: use correct base dimensions for outpaint mask padding (#2612)
1 parent 7564dd5 commit 9aaa400

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/async_worker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,12 +614,12 @@ def handler(async_task):
614614

615615
H, W, C = inpaint_image.shape
616616
if 'left' in outpaint_selections:
617-
inpaint_image = np.pad(inpaint_image, [[0, 0], [int(H * 0.3), 0], [0, 0]], mode='edge')
618-
inpaint_mask = np.pad(inpaint_mask, [[0, 0], [int(H * 0.3), 0]], mode='constant',
617+
inpaint_image = np.pad(inpaint_image, [[0, 0], [int(W * 0.3), 0], [0, 0]], mode='edge')
618+
inpaint_mask = np.pad(inpaint_mask, [[0, 0], [int(W * 0.3), 0]], mode='constant',
619619
constant_values=255)
620620
if 'right' in outpaint_selections:
621-
inpaint_image = np.pad(inpaint_image, [[0, 0], [0, int(H * 0.3)], [0, 0]], mode='edge')
622-
inpaint_mask = np.pad(inpaint_mask, [[0, 0], [0, int(H * 0.3)]], mode='constant',
621+
inpaint_image = np.pad(inpaint_image, [[0, 0], [0, int(W * 0.3)], [0, 0]], mode='edge')
622+
inpaint_mask = np.pad(inpaint_mask, [[0, 0], [0, int(W * 0.3)]], mode='constant',
623623
constant_values=255)
624624

625625
inpaint_image = np.ascontiguousarray(inpaint_image.copy())

0 commit comments

Comments
 (0)