diff --git a/index.html b/index.html index ac87e61..9d4596b 100644 --- a/index.html +++ b/index.html @@ -100,6 +100,7 @@
+
- + - + diff --git a/js/index.js b/js/index.js index b3403a4..a9ee850 100644 --- a/js/index.js +++ b/js/index.js @@ -612,6 +612,17 @@ makeSlider( makeSlider("Steps", document.getElementById("steps"), "steps", 1, 70, 5, 30, 1); +makeSlider( + "HR Fix Lock Px.", + document.getElementById("hrFixLock"), + "hr_fix_lock_px", + 0.0, + 768.0, + 256.0, + 0.0, + 1.0 +); + function changeMaskBlur() { stableDiffusionData.mask_blur = parseInt( document.getElementById("maskBlur").value diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index 0a7b9a5..5ae2ef3 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -1347,8 +1347,16 @@ const dreamTool = () => }; //hacky set non-square auto hrfix values - stableDiffusionData.firstphase_height = resolution.h / 2; - stableDiffusionData.firstphase_width = resolution.w / 2; + let hrLockPx = + localStorage.getItem("openoutpaint/hr_fix_lock_px") ?? 0; + stableDiffusionData.firstphase_height = + hrLockPx == 0 || resolution.h / 2 <= hrLockPx + ? resolution.h / 2 + : hrLockPx; + stableDiffusionData.firstphase_width = + hrLockPx == 0 || resolution.w / 2 <= hrLockPx + ? resolution.w / 2 + : hrLockPx; if (global.connection === "online") { dream_generate_callback(bb, resolution, state);