localstorage for new hrfix junk
This commit is contained in:
parent
5523ee71ec
commit
3043622ecd
2 changed files with 20 additions and 2 deletions
|
@ -340,7 +340,7 @@
|
|||
|
||||
<!-- Content -->
|
||||
<script src="js/prompt.js?v=7a1c68c" type="text/javascript"></script>
|
||||
<script src="js/index.js?v=9056c91" type="text/javascript"></script>
|
||||
<script src="js/index.js?v=134f3eb" type="text/javascript"></script>
|
||||
|
||||
<script
|
||||
src="js/ui/floating/history.js?v=fc92d14"
|
||||
|
|
20
js/index.js
20
js/index.js
|
@ -560,6 +560,7 @@ const hrFixUpscalerAutoComplete = createAutoComplete(
|
|||
);
|
||||
hrFixUpscalerAutoComplete.onchange.on(({value}) => {
|
||||
stableDiffusionData.hr_upscaler = value;
|
||||
localStorage.setItem(`openoutpaint/hr_upscaler`, value);
|
||||
});
|
||||
|
||||
const resSlider = makeSlider(
|
||||
|
@ -647,7 +648,7 @@ makeSlider(
|
|||
"denoising_strength",
|
||||
0.0,
|
||||
1.0,
|
||||
0.1,
|
||||
0.05,
|
||||
0.7,
|
||||
0.01
|
||||
);
|
||||
|
@ -1103,6 +1104,20 @@ function loadSettings() {
|
|||
? true
|
||||
: localStorage.getItem("openoutpaint/sync_cursor_size") === "true";
|
||||
|
||||
let _hrfix_scale =
|
||||
localStorage.getItem("openoutpaint/hr_scale") === null
|
||||
? 2.0
|
||||
: localStorage.getItem("openoutpaint/hr_scale");
|
||||
|
||||
let _hrfix_upscaler =
|
||||
localStorage.getItem("openoutpaint/hr_upscaler") === null
|
||||
? "None"
|
||||
: localStorage.getItem("openoutpaint/hr_upscaler");
|
||||
|
||||
let _hrfix_denoising =
|
||||
localStorage.getItem("openoutpaint/denoising_strength") === null
|
||||
? 0.7
|
||||
: localStorage.getItem("openoutpaint/denoising_strength");
|
||||
// set the values into the UI
|
||||
document.getElementById("maskBlur").value = Number(_mask_blur);
|
||||
document.getElementById("seed").value = Number(_seed);
|
||||
|
@ -1110,6 +1125,9 @@ function loadSettings() {
|
|||
document.getElementById("cbxRestoreFaces").checked = Boolean(_restore_faces);
|
||||
document.getElementById("cbxSyncCursorSize").checked =
|
||||
Boolean(_sync_cursor_size);
|
||||
document.getElementById("hrFixScale").value = Number(_hrfix_scale);
|
||||
document.getElementById("hrFixUpscaler").value = Number(_hrfix_upscaler);
|
||||
document.getElementById("hrDenoising").value = Number(_hrfix_denoising);
|
||||
}
|
||||
|
||||
imageCollection.element.addEventListener(
|
||||
|
|
Loading…
Reference in a new issue