mirror of
https://github.com/anapnoe/stable-diffusion-webui-ux.git
synced 2026-09-18 16:55:15 +02:00
Merge branch 'dev' of https://github.com/anapnoe/stable-diffusion-webui-ux into dev
This commit is contained in:
+20
-1
@@ -1546,6 +1546,7 @@ function selectCheckpoint(name){
|
||||
desiredCheckpointName = name;
|
||||
gradioApp().getElementById('change_checkpoint').click()
|
||||
}
|
||||
|
||||
document.addEventListener('readystatechange', function (e) {
|
||||
document.body.style.display = "none";
|
||||
if(localStorage.hasOwnProperty('bg_color')){
|
||||
@@ -1560,4 +1561,22 @@ window.onload = function() {
|
||||
document.body.style.display = "none";
|
||||
setTimeout(function(){document.body.style.display = "block";},1000)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function currentImg2imgSourceResolution(_, _, scaleBy){
|
||||
var img = gradioApp().querySelector('#mode_img2img > div[style="display: block;"] img')
|
||||
return img ? [img.naturalWidth, img.naturalHeight, scaleBy] : [0, 0, scaleBy]
|
||||
}
|
||||
|
||||
function updateImg2imgResizeToTextAfterChangingImage(){
|
||||
// At the time this is called from gradio, the image has no yet been replaced.
|
||||
// There may be a better solution, but this is simple and straightforward so I'm going with it.
|
||||
|
||||
setTimeout(function() {
|
||||
gradioApp().getElementById('img2img_update_resize_to').click()
|
||||
}, 500);
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user