forked from extern/easydiffusion
commit
307b00cc05
@ -463,9 +463,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="clearfix" style="clear: both;"></div>
|
<div class="clearfix" style="clear: both;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="supportBanner" class="displayNone">
|
|
||||||
If you found this project useful and want to help keep it alive, please consider <a href="https://ko-fi.com/easydiffusion" target="_blank">buying me a coffee</a> or <a href="https://www.patreon.com/EasyDiffusion" target="_blank">supporting me on Patreon</a> to help cover the cost of development and maintenance! Or even better, <a href="https://cmdr2.itch.io/easydiffusion" target="_blank">donating the actual cost of this software</a>. Thanks for your support!
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -810,6 +807,8 @@
|
|||||||
<div id="footer-spacer"></div>
|
<div id="footer-spacer"></div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div class="line-separator"> </div>
|
<div class="line-separator"> </div>
|
||||||
|
<div id="supportBanner" style="display: none;"></div>
|
||||||
|
<p>If you found this project useful and want to help keep it alive, please <a href="https://ko-fi.com/easydiffusion" target="_blank"><img src="/media/images/kofi.png" id="coffeeButton"></a> or <a href="https://www.patreon.com/EasyDiffusion" target="_blank">support me on Patreon</a> to help cover the cost of development and maintenance! Or even better, <a href="https://cmdr2.itch.io/easydiffusion" target="_blank">donate the actual cost of this software</a>. Thanks for your support!</p>
|
||||||
<p>Please feel free to join the <a href="https://discord.com/invite/u9yhsFmEkB" target="_blank">discord community</a> or <a href="https://github.com/easydiffusion/easydiffusion/issues" target="_blank">file an issue</a> if you have any problems or suggestions in using this interface.</p>
|
<p>Please feel free to join the <a href="https://discord.com/invite/u9yhsFmEkB" target="_blank">discord community</a> or <a href="https://github.com/easydiffusion/easydiffusion/issues" target="_blank">file an issue</a> if you have any problems or suggestions in using this interface.</p>
|
||||||
<div id="footer-legal">
|
<div id="footer-legal">
|
||||||
<p><b>Disclaimer:</b> The authors of this project are not responsible for any content generated using this interface.</p>
|
<p><b>Disclaimer:</b> The authors of this project are not responsible for any content generated using this interface.</p>
|
||||||
|
@ -514,7 +514,7 @@ function showImages(reqBody, res, outputContainer, livePreview) {
|
|||||||
{
|
{
|
||||||
text: "Use as Thumbnail",
|
text: "Use as Thumbnail",
|
||||||
on_click: onUseAsThumbnailClick,
|
on_click: onUseAsThumbnailClick,
|
||||||
filter: (req, img) => "use_embeddings_model" in req || "use_lora_model" in req
|
filter: (req, img) => "use_embeddings_model" in req || "use_lora_model" in req,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -766,7 +766,6 @@ function onUseAsThumbnailClick(req, img) {
|
|||||||
useAsThumbSelect.appendChild(embOptions)
|
useAsThumbSelect.appendChild(embOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ("use_lora_model" in req) {
|
if ("use_lora_model" in req) {
|
||||||
let LORA = req.use_lora_model
|
let LORA = req.use_lora_model
|
||||||
if (typeof LORA == "string") {
|
if (typeof LORA == "string") {
|
||||||
@ -832,8 +831,7 @@ const Bucket = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getList(path) {
|
getList(path) {
|
||||||
return fetch(`bucket/${path}`)
|
return fetch(`bucket/${path}`).then((response) => (response.status == 200 ? response.json() : []))
|
||||||
.then((response) => (response.status == 200 ? response.json() : []))
|
|
||||||
},
|
},
|
||||||
|
|
||||||
store(path, data) {
|
store(path, data) {
|
||||||
@ -841,8 +839,7 @@ const Bucket = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
retrieve(path) {
|
retrieve(path) {
|
||||||
return fetch(`bucket/${path}.json`)
|
return fetch(`bucket/${path}.json`).then((response) => (response.status == 200 ? response.json() : null))
|
||||||
.then((response) => (response.status == 200 ? response.json() : null))
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -860,9 +857,7 @@ useAsThumbSaveBtn.addEventListener("click", (e) => {
|
|||||||
let options = useAsThumbSelect.selectedOptions
|
let options = useAsThumbSelect.selectedOptions
|
||||||
let promises = []
|
let promises = []
|
||||||
for (let embedding of options) {
|
for (let embedding of options) {
|
||||||
promises.push(
|
promises.push(Bucket.upload(`${profileName}/${embedding.dataset["type"]}/${embedding.value}.png`, blob))
|
||||||
Bucket.upload(`${profileName}/${embedding.dataset["type"]}/${embedding.value}.png`, blob)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
return Promise.all(promises)
|
return Promise.all(promises)
|
||||||
})
|
})
|
||||||
@ -1045,12 +1040,12 @@ function makeImage() {
|
|||||||
|
|
||||||
updateInitialText()
|
updateInitialText()
|
||||||
|
|
||||||
const countBeforeBanner = localStorage.getItem("countBeforeBanner") || 1
|
// const countBeforeBanner = localStorage.getItem("countBeforeBanner") || 1
|
||||||
if (countBeforeBanner <= 0) {
|
// if (countBeforeBanner <= 0) {
|
||||||
// supportBanner.classList.remove("displayNone")
|
// // supportBanner.classList.remove("displayNone")
|
||||||
} else {
|
// } else {
|
||||||
localStorage.setItem("countBeforeBanner", countBeforeBanner - 1)
|
// localStorage.setItem("countBeforeBanner", countBeforeBanner - 1)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hover effect for the init image in the task list */
|
/* Hover effect for the init image in the task list */
|
||||||
@ -1250,7 +1245,7 @@ function createTask(task) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
task.isProcessing = true
|
task.isProcessing = true
|
||||||
taskEntry = imagePreviewContent.insertBefore(taskEntry, supportBanner.nextSibling)
|
taskEntry = imagePreviewContent.insertBefore(taskEntry, previewTools.nextSibling)
|
||||||
htmlTaskMap.set(taskEntry, task)
|
htmlTaskMap.set(taskEntry, task)
|
||||||
|
|
||||||
task.previewPrompt.innerText = task.reqBody.prompt
|
task.previewPrompt.innerText = task.reqBody.prompt
|
||||||
@ -1621,16 +1616,16 @@ function updateInitialText() {
|
|||||||
}
|
}
|
||||||
previewTools.classList.add("displayNone")
|
previewTools.classList.add("displayNone")
|
||||||
initialText.classList.remove("displayNone")
|
initialText.classList.remove("displayNone")
|
||||||
supportBanner.classList.add("displayNone")
|
// supportBanner.classList.add("displayNone")
|
||||||
} else {
|
} else {
|
||||||
initialText.classList.add("displayNone")
|
initialText.classList.add("displayNone")
|
||||||
previewTools.classList.remove("displayNone")
|
previewTools.classList.remove("displayNone")
|
||||||
document.querySelector("div.display-settings").prepend(undoButton)
|
document.querySelector("div.display-settings").prepend(undoButton)
|
||||||
|
|
||||||
const countBeforeBanner = localStorage.getItem("countBeforeBanner") || 1
|
// const countBeforeBanner = localStorage.getItem("countBeforeBanner") || 1
|
||||||
if (countBeforeBanner <= 0) {
|
// if (countBeforeBanner <= 0) {
|
||||||
supportBanner.classList.remove("displayNone")
|
// supportBanner.classList.remove("displayNone")
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2531,14 +2526,13 @@ function updateEmbeddingsList(filter = "") {
|
|||||||
if (icons.includes(`${loraname}.png`)) {
|
if (icons.includes(`${loraname}.png`)) {
|
||||||
keywords.forEach((kw) => {
|
keywords.forEach((kw) => {
|
||||||
iconMap[kw.toLowerCase()] = `lora/${loraname}.png`
|
iconMap[kw.toLowerCase()] = `lora/${loraname}.png`
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let tokenList = [...modelsOptions.embeddings]
|
let tokenList = [...modelsOptions.embeddings]
|
||||||
if (loraTokens.length != 0) {
|
if (loraTokens.length != 0) {
|
||||||
tokenList.unshift(['LORA Keywords', loraTokens])
|
tokenList.unshift(["LORA Keywords", loraTokens])
|
||||||
}
|
}
|
||||||
embeddingsList.replaceChildren(html(tokenList, iconMap, "", filter))
|
embeddingsList.replaceChildren(html(tokenList, iconMap, "", filter))
|
||||||
createCollapsibles(embeddingsList)
|
createCollapsibles(embeddingsList)
|
||||||
|
Loading…
Reference in New Issue
Block a user