mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-04-02 20:16:32 +02:00
show initimg in task list
This commit is contained in:
parent
e3184622e8
commit
099fde2652
@ -27,6 +27,7 @@
|
|||||||
- Support loading models in the safetensor format, for improved safety
|
- Support loading models in the safetensor format, for improved safety
|
||||||
|
|
||||||
### Detailed changelog
|
### Detailed changelog
|
||||||
|
* 2.4.19 - 10 Dec 2022 - Show init img in task list
|
||||||
* 2.4.19 - 7 Dec 2022 - Use pre-trained hypernetworks while generating images. Thanks @C0bra5
|
* 2.4.19 - 7 Dec 2022 - Use pre-trained hypernetworks while generating images. Thanks @C0bra5
|
||||||
* 2.4.19 - 6 Dec 2022 - Allow processing new tasks first. Thanks @madrang
|
* 2.4.19 - 6 Dec 2022 - Allow processing new tasks first. Thanks @madrang
|
||||||
* 2.4.19 - 6 Dec 2022 - Allow reordering the task queue (by dragging tasks). Thanks @madrang
|
* 2.4.19 - 6 Dec 2022 - Allow reordering the task queue (by dragging tasks). Thanks @madrang
|
||||||
|
@ -945,6 +945,7 @@ input::file-selector-button {
|
|||||||
height: 16px;
|
height: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: 0.25s 1s border, 0.25s 1s height;
|
transition: 0.25s 1s border, 0.25s 1s height;
|
||||||
|
clear: both;
|
||||||
}
|
}
|
||||||
.progress-bar > div {
|
.progress-bar > div {
|
||||||
background: var(--accent-color);
|
background: var(--accent-color);
|
||||||
@ -1096,6 +1097,15 @@ button:active {
|
|||||||
left: 1px;
|
left: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.task-initimg > img {
|
||||||
|
margin-right: 6px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
div.task-fs-initimage {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
button#save-system-settings-btn {
|
button#save-system-settings-btn {
|
||||||
padding: 4pt 8pt;
|
padding: 4pt 8pt;
|
||||||
}
|
}
|
||||||
|
@ -757,8 +757,37 @@ function onTaskStart(task) {
|
|||||||
previewTools.style.display = 'block'
|
previewTools.style.display = 'block'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hover effect for the init image in the task list */
|
||||||
|
function createInitImageHover(taskEntry) {
|
||||||
|
var $tooltip = $( taskEntry.querySelector('.task-fs-initimage') )
|
||||||
|
$( taskEntry.querySelector('div.task-initimg > img') ).on('mouseenter', function() {
|
||||||
|
var img = this,
|
||||||
|
$img = $(img),
|
||||||
|
offset = $img.offset();
|
||||||
|
|
||||||
|
$tooltip
|
||||||
|
.css({
|
||||||
|
'top': offset.top,
|
||||||
|
'left': offset.left,
|
||||||
|
'z-index': 99999,
|
||||||
|
'display': 'block'
|
||||||
|
})
|
||||||
|
.append($img.clone().css({width:"", height:""}));
|
||||||
|
})
|
||||||
|
$tooltip.on('mouseleave', function() {
|
||||||
|
$tooltip.empty().addClass('hidden');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function createTask(task) {
|
function createTask(task) {
|
||||||
let taskConfig = `<b>Seed:</b> ${task.seed}, <b>Sampler:</b> ${task.reqBody.sampler}, <b>Inference Steps:</b> ${task.reqBody.num_inference_steps}, <b>Guidance Scale:</b> ${task.reqBody.guidance_scale}, <b>Model:</b> ${task.reqBody.use_stable_diffusion_model}`
|
let taskConfig = ''
|
||||||
|
|
||||||
|
if (task.reqBody.init_image !== undefined) {
|
||||||
|
let h = 80
|
||||||
|
let w = task.reqBody.width * h / task.reqBody.height >>0
|
||||||
|
taskConfig += `<div class="task-initimg" style="float:left;"><img style="width:${w}px;height:${h}px;" src="${task.reqBody.init_image}"><div class="task-fs-initimage"></div></div>`
|
||||||
|
}
|
||||||
|
taskConfig += `<b>Seed:</b> ${task.seed}, <b>Sampler:</b> ${task.reqBody.sampler}, <b>Inference Steps:</b> ${task.reqBody.num_inference_steps}, <b>Guidance Scale:</b> ${task.reqBody.guidance_scale}, <b>Model:</b> ${task.reqBody.use_stable_diffusion_model}`
|
||||||
if (task.reqBody.use_vae_model.trim() !== '') {
|
if (task.reqBody.use_vae_model.trim() !== '') {
|
||||||
taskConfig += `, <b>VAE:</b> ${task.reqBody.use_vae_model}`
|
taskConfig += `, <b>VAE:</b> ${task.reqBody.use_vae_model}`
|
||||||
}
|
}
|
||||||
@ -797,6 +826,11 @@ function createTask(task) {
|
|||||||
|
|
||||||
createCollapsibles(taskEntry)
|
createCollapsibles(taskEntry)
|
||||||
|
|
||||||
|
|
||||||
|
if (task.reqBody.init_image !== undefined) {
|
||||||
|
createInitImageHover(taskEntry)
|
||||||
|
}
|
||||||
|
|
||||||
task['taskStatusLabel'] = taskEntry.querySelector('.taskStatusLabel')
|
task['taskStatusLabel'] = taskEntry.querySelector('.taskStatusLabel')
|
||||||
task['outputContainer'] = taskEntry.querySelector('.img-preview')
|
task['outputContainer'] = taskEntry.querySelector('.img-preview')
|
||||||
task['outputMsg'] = taskEntry.querySelector('.outputMsg')
|
task['outputMsg'] = taskEntry.querySelector('.outputMsg')
|
||||||
|
Loading…
Reference in New Issue
Block a user