mirror of
https://github.com/vladmandic/automatic
synced 2026-09-17 16:24:33 +02:00
control implement image measure
This commit is contained in:
+6
-1
@@ -419,11 +419,16 @@ function selectReference(name) {
|
||||
gradioApp().getElementById('change_reference').click();
|
||||
}
|
||||
|
||||
function currentImg2imgSourceResolution(_a, _b, scaleBy) {
|
||||
function currentImageResolutionimg2img(_a, _b, scaleBy) {
|
||||
const img = gradioApp().querySelector('#mode_img2img > div[style="display: block;"] img');
|
||||
return img ? [img.naturalWidth, img.naturalHeight, scaleBy] : [0, 0, scaleBy];
|
||||
}
|
||||
|
||||
function currentImageResolutioncontrol(_a, _b, scaleBy) {
|
||||
const img = gradioApp().querySelector('#control-tab-input > div[style="display: block;"] img');
|
||||
return img ? [img.naturalWidth, img.naturalHeight, scaleBy] : [0, 0, scaleBy];
|
||||
}
|
||||
|
||||
function updateImg2imgResizeToTextAfterChangingImage() {
|
||||
setTimeout(() => gradioApp().getElementById('img2img_update_resize_to').click(), 500);
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user