diff --git a/backend/invoke_ai_web_server.py b/backend/invoke_ai_web_server.py index b9fc147911..64304d395d 100644 --- a/backend/invoke_ai_web_server.py +++ b/backend/invoke_ai_web_server.py @@ -573,11 +573,7 @@ class InvokeAIWebServer: ) ) ) - # crop the mask image - cropped_mask_image = copy_image_from_bounding_box( - mask_image, **generation_parameters["bounding_box"] - ) - generation_parameters["init_mask"] = cropped_mask_image + generation_parameters["init_mask"] = mask_image totalSteps = self.calculate_real_steps( steps=generation_parameters["steps"], diff --git a/frontend/src/features/tabs/Inpainting/util/generateMask.ts b/frontend/src/features/tabs/Inpainting/util/generateMask.ts index 37b3902d94..11e4cc2f00 100644 --- a/frontend/src/features/tabs/Inpainting/util/generateMask.ts +++ b/frontend/src/features/tabs/Inpainting/util/generateMask.ts @@ -101,7 +101,7 @@ const generateMask = ( new Konva.Image({ image: image, globalCompositeOperation: 'source-out' }) ); - const maskDataURL = stage.toDataURL(); + const maskDataURL = stage.toDataURL({ ...boundingBox }); return { maskDataURL, isMaskEmpty }; };