Skip to content

Commit

Permalink
typo fix, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
zero01101 committed Jan 27, 2024
1 parent 4d5a8c6 commit 14b3e63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
Expand Down Expand Up @@ -337,7 +337,7 @@
<br />
<span id="version">
<a href="https://github.com/zero01101/openOutpaint" target="_blank">
v20231216.001
v20240127.001
</a>
<br />
<a
Expand Down Expand Up @@ -560,7 +560,7 @@

<!-- Content -->
<script src="js/prompt.js?v=7a1c68c" type="text/javascript"></script>
<script src="js/index.js?v=c92b1a2" type="text/javascript"></script>
<script src="js/index.js?v=70af18f" type="text/javascript"></script>

<script
src="js/ui/floating/history.js?v=4f29db4"
Expand Down
25 changes: 15 additions & 10 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,10 @@ async function getUpscalers() {
return {name: u, value: u};
});

upscalerAutoComplete.value =
upscalerAutoComplete.value =
localStorage.getItem("openoutpaint/upscaler") === null
? upscalers[0]
: localStorage.getItem("openoutpaint/upscaler");
? upscalers[0]
: localStorage.getItem("openoutpaint/upscaler");

hrFixUpscalerAutoComplete.value =
localStorage.getItem("openoutpaint/hr_upscaler") === null
Expand Down Expand Up @@ -1434,7 +1434,11 @@ async function getSamplers() {
}
}

async function upscaleAndDownload(download = false, add_resource = false, aCanvas = null) {
async function upscaleAndDownload(
download = false,
add_resource = false,
aCanvas = null
) {
// Future improvements: some upscalers take a while to upscale, so we should show a loading bar or something, also a slider for the upscale amount

// get cropped canvas, send it to upscaler, download result
Expand All @@ -1458,7 +1462,7 @@ async function upscaleAndDownload(download = false, add_resource = false, aCanva
);
imgdata = croppedCanvas.canvas.toDataURL("image/png");
} else {
console.log("Upscaling recourse canvas.");
console.log("Upscaling resource canvas.");
imgdata = aCanvas.toDataURL("image/png");
}

Expand Down Expand Up @@ -1499,13 +1503,13 @@ async function upscaleAndDownload(download = false, add_resource = false, aCanva
link.href = "data:image/png;base64," + data["image"];

if (add_resource == true) {
console.log("Add upscaled to resource")
console.log("Add upscaled to resource");
const img = new Image();
img.src = link.href;
tools.stamp.state.addResource(guid()+" (upscaled)", img);
tools.stamp.state.addResource(guid() + " (upscaled)", img);
}
if (download == true){
console.log("Download upscaled")
if (download == true) {
console.log("Download upscaled");
link.click();
}
});
Expand Down Expand Up @@ -1555,7 +1559,8 @@ function loadSettings() {
document.getElementById("seed").value = Number(_seed);
document.getElementById("cbxHRFix").checked = Boolean(_enable_hr);
document.getElementById("cbxRestoreFaces").checked = Boolean(_restore_faces);
document.getElementById("cbxSyncCursorSize").checked = Boolean(_sync_cursor_size);
document.getElementById("cbxSyncCursorSize").checked =
Boolean(_sync_cursor_size);
document.getElementById("hrFixScale").value = Number(_hrfix_scale);
document.getElementById("hrDenoising").value = Number(_hrfix_denoising);
document.getElementById("hrFixLockPx").value = Number(_hrfix_lock_px);
Expand Down

0 comments on commit 14b3e63

Please sign in to comment.