mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-14 02:05:21 +02:00
'Use for Controlnet', Drag'n'Drop (#1501)
* Drop area for Controlnet * 'Use for Controlnet', DND
This commit is contained in:
@ -517,6 +517,7 @@ function showImages(reqBody, res, outputContainer, livePreview) {
|
||||
const imageRedoBuffer = []
|
||||
let buttons = [
|
||||
{ text: "Use as Input", on_click: onUseAsInputClick },
|
||||
{ text: "Use for Controlnet", on_click: onUseForControlnetClick },
|
||||
[
|
||||
{
|
||||
html: '<i class="fa-solid fa-download"></i> Download Image',
|
||||
@ -627,6 +628,10 @@ function onUseAsInputClick(req, img) {
|
||||
maskSetting.checked = false
|
||||
}
|
||||
|
||||
function onUseForControlnetClick(req, img) {
|
||||
controlImagePreview.src = img.src
|
||||
}
|
||||
|
||||
function getDownloadFilename(img, suffix) {
|
||||
const imageSeed = img.getAttribute("data-seed")
|
||||
const imagePrompt = img.getAttribute("data-prompt")
|
||||
|
Reference in New Issue
Block a user