From bb79c78fe8e030ae36d5c19f162ce92a89ce625d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 12 Nov 2022 21:12:48 +1100 Subject: [PATCH] Fixes AttributeError: 'dict' object has no attribute 'invert_mask' --- frontend/src/common/util/parameterTranslation.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/common/util/parameterTranslation.ts b/frontend/src/common/util/parameterTranslation.ts index 5f3c9294dd..2d010b3815 100644 --- a/frontend/src/common/util/parameterTranslation.ts +++ b/frontend/src/common/util/parameterTranslation.ts @@ -138,9 +138,7 @@ export const frontendToBackendParameters = ( generationParameters.init_img = imageToProcessUrl; generationParameters.strength = img2imgStrength; - if (shouldPreserveMaskedArea) { - generationParameters.invert_mask = true; - } + generationParameters.invert_mask = shouldPreserveMaskedArea; if (shouldUseInpaintReplace) { generationParameters.inpaint_replace = inpaintReplace;