significantly more useful hrfix updates
adds lock-to-max-hrfix-px slider which works pretty well if i do say so myself
This commit is contained in:
parent
c9a768d406
commit
aee0c33c7b
3 changed files with 24 additions and 4 deletions
|
@ -100,6 +100,7 @@
|
||||||
<input type="checkbox" id="cbxHRFix" onchange="changeHiResFix()" />
|
<input type="checkbox" id="cbxHRFix" onchange="changeHiResFix()" />
|
||||||
<label for="cbxHRFix">Auto txt2img HRfix</label>
|
<label for="cbxHRFix">Auto txt2img HRfix</label>
|
||||||
<br />
|
<br />
|
||||||
|
<div id="hrFixLock"></div>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="cbxRestoreFaces"
|
id="cbxRestoreFaces"
|
||||||
|
@ -334,7 +335,7 @@
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<script src="js/prompt.js?v=7a1c68c" type="text/javascript"></script>
|
<script src="js/prompt.js?v=7a1c68c" type="text/javascript"></script>
|
||||||
<script src="js/index.js?v=34359a1" type="text/javascript"></script>
|
<script src="js/index.js?v=7624a72" type="text/javascript"></script>
|
||||||
|
|
||||||
<script
|
<script
|
||||||
src="js/ui/floating/history.js?v=fc92d14"
|
src="js/ui/floating/history.js?v=fc92d14"
|
||||||
|
@ -348,7 +349,7 @@
|
||||||
src="js/ui/tool/generic.js?v=2bcd36d"
|
src="js/ui/tool/generic.js?v=2bcd36d"
|
||||||
type="text/javascript"></script>
|
type="text/javascript"></script>
|
||||||
|
|
||||||
<script src="js/ui/tool/dream.js?v=2b099b5" type="text/javascript"></script>
|
<script src="js/ui/tool/dream.js?v=1de8e4e" type="text/javascript"></script>
|
||||||
<script
|
<script
|
||||||
src="js/ui/tool/maskbrush.js?v=1e8a893"
|
src="js/ui/tool/maskbrush.js?v=1e8a893"
|
||||||
type="text/javascript"></script>
|
type="text/javascript"></script>
|
||||||
|
|
11
js/index.js
11
js/index.js
|
@ -612,6 +612,17 @@ makeSlider(
|
||||||
|
|
||||||
makeSlider("Steps", document.getElementById("steps"), "steps", 1, 70, 5, 30, 1);
|
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() {
|
function changeMaskBlur() {
|
||||||
stableDiffusionData.mask_blur = parseInt(
|
stableDiffusionData.mask_blur = parseInt(
|
||||||
document.getElementById("maskBlur").value
|
document.getElementById("maskBlur").value
|
||||||
|
|
|
@ -1347,8 +1347,16 @@ const dreamTool = () =>
|
||||||
};
|
};
|
||||||
|
|
||||||
//hacky set non-square auto hrfix values
|
//hacky set non-square auto hrfix values
|
||||||
stableDiffusionData.firstphase_height = resolution.h / 2;
|
let hrLockPx =
|
||||||
stableDiffusionData.firstphase_width = resolution.w / 2;
|
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") {
|
if (global.connection === "online") {
|
||||||
dream_generate_callback(bb, resolution, state);
|
dream_generate_callback(bb, resolution, state);
|
||||||
|
|
Loading…
Reference in a new issue