From 35762149201622069c8626daa3b902bfac126912 Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Sat, 5 Nov 2022 13:35:09 -0400 Subject: [PATCH] Remove prompt_strength and init_image when not using in-painting --- ui/media/js/dnd.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 9154b2a0..9e53451f 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -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)