Skip to content

Commit 3562525

Browse files
committed
Fix context area for inpaint being smaller than intended
* the workflow kind is modified after the compute_bounds call
1 parent a798c16 commit 3562525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ai_diffusion/resolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def compute_bounds(extent: Extent, mask_bounds: Bounds | None, op: WorkflowKind)
2121
In many cases diffusion context and mask bounds are the same.
2222
"""
2323
if mask_bounds is not None:
24-
if op is WorkflowKind.inpaint:
24+
if op in (WorkflowKind.generate, WorkflowKind.inpaint):
2525
# For 100% strength inpainting get additional surrounding image content for context
2626
context_padding = max(extent.longest_side // 16, mask_bounds.extent.average_side // 2)
2727
image_bounds = Bounds.pad(

0 commit comments

Comments
 (0)