mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-24 20:01:42 +02:00
Merge pull request #444 from madrang/beta
Remove prompt_strength and init_image when not using in-painting
This commit is contained in:
commit
b52b854270
@ -13,11 +13,13 @@ function parseBoolean(stringValue) {
|
|||||||
switch(stringValue?.toLowerCase()?.trim()) {
|
switch(stringValue?.toLowerCase()?.trim()) {
|
||||||
case "true":
|
case "true":
|
||||||
case "yes":
|
case "yes":
|
||||||
|
case "on":
|
||||||
case "1":
|
case "1":
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "false":
|
case "false":
|
||||||
case "no":
|
case "no":
|
||||||
|
case "off":
|
||||||
case "0":
|
case "0":
|
||||||
case null:
|
case null:
|
||||||
case undefined:
|
case undefined:
|
||||||
@ -406,6 +408,10 @@ function checkWriteToClipboardPermission (result) {
|
|||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
const uiState = readUI()
|
const uiState = readUI()
|
||||||
TASK_REQ_NO_EXPORT.forEach((key) => delete uiState.reqBody[key])
|
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))
|
navigator.clipboard.writeText(JSON.stringify(uiState, undefined, 4))
|
||||||
})
|
})
|
||||||
resetSettings.parentNode.insertBefore(copyIcon, resetSettings)
|
resetSettings.parentNode.insertBefore(copyIcon, resetSettings)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user