From 90d2197e04c5b4b6c32eb58dd76e39a45338688c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 26 Oct 2023 07:17:04 -0400 Subject: [PATCH] Revert "add binary mask" This reverts commit fc7e3c57210d6b3fb440d5a41a23afd7fd41c446. --- modules/processing.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index 78aeab57e..70db97412 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -72,14 +72,6 @@ def apply_overlay(image, paste_loc, index, overlays): return image -def create_binary_mask(image): - if image.mode == 'RGBA' and image.getextrema()[-1] != (255, 255): - image = image.split()[-1].convert("L").point(lambda x: 255 if x > 128 else 0) - else: - image = image.convert('L') - return image - - def txt2img_image_conditioning(sd_model, x, width, height): if sd_model.model.conditioning_key in {'hybrid', 'concat'}: # Inpainting models # The "masked-image" in this case will just be all zeros since the entire image is masked.