fix selected HRfix upscaler localstorage

This commit is contained in:
tim h 2023-01-02 18:29:23 -06:00
parent 0f4aeeb0d5
commit b8c02d630d
2 changed files with 5 additions and 8 deletions

View file

@ -340,7 +340,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=bc49f7d" type="text/javascript"></script> <script src="js/index.js?v=e28f84d" type="text/javascript"></script>
<script <script
src="js/ui/floating/history.js?v=fc92d14" src="js/ui/floating/history.js?v=fc92d14"

View file

@ -797,7 +797,10 @@ async function getUpscalers() {
}); });
upscalerAutoComplete.value = upscalers[0]; upscalerAutoComplete.value = upscalers[0];
hrFixUpscalerAutoComplete.value = upscalersPlusNone[0]; hrFixUpscalerAutoComplete.value =
localStorage.getItem("openoutpaint/hr_upscaler") === null
? "None"
: localStorage.getItem("openoutpaint/hr_upscaler");
} catch (e) { } catch (e) {
console.warn("[index] Failed to fetch upscalers:"); console.warn("[index] Failed to fetch upscalers:");
console.warn(e); console.warn(e);
@ -1109,11 +1112,6 @@ function loadSettings() {
? 2.0 ? 2.0
: localStorage.getItem("openoutpaint/hr_scale"); : localStorage.getItem("openoutpaint/hr_scale");
let _hrfix_upscaler =
localStorage.getItem("openoutpaint/hr_upscaler") === null
? "None"
: localStorage.getItem("openoutpaint/hr_upscaler");
let _hrfix_denoising = let _hrfix_denoising =
localStorage.getItem("openoutpaint/denoising_strength") === null localStorage.getItem("openoutpaint/denoising_strength") === null
? 0.7 ? 0.7
@ -1126,7 +1124,6 @@ function loadSettings() {
document.getElementById("cbxSyncCursorSize").checked = document.getElementById("cbxSyncCursorSize").checked =
Boolean(_sync_cursor_size); Boolean(_sync_cursor_size);
document.getElementById("hrFixScale").value = Number(_hrfix_scale); document.getElementById("hrFixScale").value = Number(_hrfix_scale);
document.getElementById("hrFixUpscaler").value = Number(_hrfix_upscaler);
document.getElementById("hrDenoising").value = Number(_hrfix_denoising); document.getElementById("hrDenoising").value = Number(_hrfix_denoising);
} }