Skip to content

Commit

Permalink
Lower minimum required region coverage to 2%
Browse files Browse the repository at this point in the history
  • Loading branch information
Acly committed Jun 10, 2024
1 parent 1d67521 commit 47fa1ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ai_diffusion/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def get_region_inpaint_mask(region_layer: Layer, max_extent: Extent, min_size=0,


def process_regions(
root: RootRegion, bounds: Bounds, parent_layer: Layer | None = None, min_coverage=0.08
root: RootRegion, bounds: Bounds, parent_layer: Layer | None = None, min_coverage=0.02
):
parent_region = None
if parent_layer and not parent_layer.is_root:
Expand Down Expand Up @@ -383,7 +383,7 @@ def process_regions(
continue

coverage_rough = Bounds.intersection(bounds, layer_bounds).area / bounds.area
if coverage_rough < 1.5 * min_coverage:
if coverage_rough < 2 * min_coverage:
continue

region_result = RegionInput(
Expand Down

0 comments on commit 47fa1ab

Please sign in to comment.