Add Inpainting Settings

- Enable and Disable Inpainting Box (with backend support)
- Enable and Disable Bounding Box Darkening
- Reset Bounding Box
This commit is contained in:
blessedcoolant
2022-10-28 02:26:28 +13:00
committed by psychedelicious
parent 3ce60161d2
commit 5cae8206f9
12 changed files with 315 additions and 126 deletions

View File

@@ -101,13 +101,26 @@ export const frontendToBackendParameters = (
lines,
boundingBoxCoordinate: { x, y },
boundingBoxDimensions: { width, height },
shouldShowBoundingBox,
} = inpaintingState;
let bx = x,
by = y,
bwidth = width,
bheight = height;
if (!shouldShowBoundingBox) {
bx = 0;
by = 0;
bwidth = maskImageElement.width;
bheight = maskImageElement.height;
}
const boundingBox = {
x,
y,
width,
height,
x: bx,
y: by,
width: bwidth,
height: bheight,
};
generationParameters.init_img = imageToProcessUrl;