typo fix, version bump

This commit is contained in:
tim h 2024-01-27 07:45:08 -06:00
parent 4d5a8c6134
commit 14b3e63e95
2 changed files with 18 additions and 13 deletions

View file

@ -1,4 +1,4 @@
<!doctype html> <!DOCTYPE html>
<html lang="en-US"> <html lang="en-US">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
@ -337,7 +337,7 @@
<br /> <br />
<span id="version"> <span id="version">
<a href="https://github.com/zero01101/openOutpaint" target="_blank"> <a href="https://github.com/zero01101/openOutpaint" target="_blank">
v20231216.001 v20240127.001
</a> </a>
<br /> <br />
<a <a
@ -560,7 +560,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=c92b1a2" type="text/javascript"></script> <script src="js/index.js?v=70af18f" type="text/javascript"></script>
<script <script
src="js/ui/floating/history.js?v=4f29db4" src="js/ui/floating/history.js?v=4f29db4"

View file

@ -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 // 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 // get cropped canvas, send it to upscaler, download result
@ -1458,7 +1462,7 @@ async function upscaleAndDownload(download = false, add_resource = false, aCanva
); );
imgdata = croppedCanvas.canvas.toDataURL("image/png"); imgdata = croppedCanvas.canvas.toDataURL("image/png");
} else { } else {
console.log("Upscaling recourse canvas."); console.log("Upscaling resource canvas.");
imgdata = aCanvas.toDataURL("image/png"); imgdata = aCanvas.toDataURL("image/png");
} }
@ -1499,13 +1503,13 @@ async function upscaleAndDownload(download = false, add_resource = false, aCanva
link.href = "data:image/png;base64," + data["image"]; link.href = "data:image/png;base64," + data["image"];
if (add_resource == true) { if (add_resource == true) {
console.log("Add upscaled to resource") console.log("Add upscaled to resource");
const img = new Image(); const img = new Image();
img.src = link.href; img.src = link.href;
tools.stamp.state.addResource(guid() + " (upscaled)", img); tools.stamp.state.addResource(guid() + " (upscaled)", img);
} }
if (download == true) { if (download == true) {
console.log("Download upscaled") console.log("Download upscaled");
link.click(); link.click();
} }
}); });
@ -1555,7 +1559,8 @@ function loadSettings() {
document.getElementById("seed").value = Number(_seed); document.getElementById("seed").value = Number(_seed);
document.getElementById("cbxHRFix").checked = Boolean(_enable_hr); document.getElementById("cbxHRFix").checked = Boolean(_enable_hr);
document.getElementById("cbxRestoreFaces").checked = Boolean(_restore_faces); 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("hrFixScale").value = Number(_hrfix_scale);
document.getElementById("hrDenoising").value = Number(_hrfix_denoising); document.getElementById("hrDenoising").value = Number(_hrfix_denoising);
document.getElementById("hrFixLockPx").value = Number(_hrfix_lock_px); document.getElementById("hrFixLockPx").value = Number(_hrfix_lock_px);