Remove prompt_strength and init_image when not using in-painting

This commit is contained in:
Marc-Andre Ferland 2022-11-05 13:35:09 -04:00
parent f964fe3750
commit 3576214920

View File

@ -408,6 +408,10 @@ function checkWriteToClipboardPermission (result) {
event.stopPropagation()
const uiState = readUI()
TASK_REQ_NO_EXPORT.forEach((key) => delete uiState.reqBody[key])
if (uiState.reqBody.init_image && !IMAGE_REGEX.test(uiState.reqBody.init_image)) {
delete uiState.reqBody.init_image
delete uiState.reqBody.prompt_strength
}
navigator.clipboard.writeText(JSON.stringify(uiState, undefined, 4))
})
resetSettings.parentNode.insertBefore(copyIcon, resetSettings)