adds options for + button to update prompt in request and jump to new images automatically, reverts stupid outpaint type suggestion because it was Bad
This commit is contained in:
parent
5abf5914a3
commit
e5dfa4fa93
5 changed files with 91 additions and 24 deletions
|
@ -24,7 +24,7 @@ this is a completely vanilla javascript and html canvas outpainting convenience
|
||||||
- arbitrary dream reticle size - draw the rectangle of your dreams
|
- arbitrary dream reticle size - draw the rectangle of your dreams
|
||||||
- an [effectively infinite](https://github.com/zero01101/openOutpaint/pull/108), resizable, scalable canvas for you to paint all over
|
- an [effectively infinite](https://github.com/zero01101/openOutpaint/pull/108), resizable, scalable canvas for you to paint all over
|
||||||
- **_NOTE: v0.0.10 introduces a new "camera control" modifier key - hold [`CTRL`] and use the scrollwheel to zoom (scroll the wheel or use the two-finger vertical gesture on, uh, modern touchpads) and pan (hold the scrollwheel button, or if you don't have one, left-click button) around the canvas_**
|
- **_NOTE: v0.0.10 introduces a new "camera control" modifier key - hold [`CTRL`] and use the scrollwheel to zoom (scroll the wheel or use the two-finger vertical gesture on, uh, modern touchpads) and pan (hold the scrollwheel button, or if you don't have one, left-click button) around the canvas_**
|
||||||
- extremely limited, janky support for a shockingly restrictive list of A1111 extensions including controlnet inpainting for legitimately [magic](https://github.com/Mikubill/sd-webui-controlnet/discussions/1464) [promptless inpainting](https://github.com/Mikubill/sd-webui-controlnet/discussions/1143) and [outpainting](https://github.com/Mikubill/sd-webui-controlnet/discussions/1597) and in-line reference preprocessors for keeping existing style while replacing things (reference requires at least 2 controlnet units enabled in A1111 settings), as well as a very very basic dynamic-prompts-on-or-off toggle
|
- extremely limited, janky support for a shockingly restrictive list of A1111 extensions including controlnet inpainting for legitimately magic promptless inpainting and outpainting ([a](https://github.com/Mikubill/sd-webui-controlnet/discussions/1464), [b](https://github.com/Mikubill/sd-webui-controlnet/discussions/1143), [c](https://github.com/Mikubill/sd-webui-controlnet/discussions/1597)) and in-line reference preprocessors for keeping existing style while replacing things (reference requires at least 2 controlnet units enabled in A1111 settings), as well as a very very basic dynamic-prompts-on-or-off toggle
|
||||||
- **_NOTE: this is_ JANKY, _pull requests greatly welcomed lol_**
|
- **_NOTE: this is_ JANKY, _pull requests greatly welcomed lol_**
|
||||||
- a very nicely functional and familiar layer system
|
- a very nicely functional and familiar layer system
|
||||||
- save, load, import, and export workspaces - includes all your layers, history, canvas size, you name it!
|
- save, load, import, and export workspaces - includes all your layers, history, canvas size, you name it!
|
||||||
|
|
|
@ -82,9 +82,7 @@ body {
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
overflow-y: clip;
|
overflow-y: clip;
|
||||||
overflow-x: visible;
|
overflow-x: visible;
|
||||||
transition:
|
transition: max-height 0.2s ease-out, height 0s ease-out;
|
||||||
max-height 0.2s ease-out,
|
|
||||||
height 0s ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-container {
|
.menu-container {
|
||||||
|
@ -132,9 +130,10 @@ body {
|
||||||
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
||||||
min-width: 360px;
|
min-width: 400px;
|
||||||
width: 360px;
|
width: 400px;
|
||||||
/* min-height: 250px; */
|
min-height: 260px;
|
||||||
|
height: 260px;
|
||||||
|
|
||||||
color: var(--c-text);
|
color: var(--c-text);
|
||||||
|
|
||||||
|
|
10
index.html
10
index.html
|
@ -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" />
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
<link href="css/colors.css?v=f732f19" rel="stylesheet" />
|
<link href="css/colors.css?v=f732f19" rel="stylesheet" />
|
||||||
<link href="css/icons.css?v=e6f94af" rel="stylesheet" />
|
<link href="css/icons.css?v=e6f94af" rel="stylesheet" />
|
||||||
|
|
||||||
<link href="css/index.css?v=fad20a2" rel="stylesheet" />
|
<link href="css/index.css?v=a1f5bff" rel="stylesheet" />
|
||||||
<link href="css/layers.css?v=92c0352" rel="stylesheet" />
|
<link href="css/layers.css?v=92c0352" rel="stylesheet" />
|
||||||
|
|
||||||
<link href="css/ui/generic.css?v=30837f8" rel="stylesheet" />
|
<link href="css/ui/generic.css?v=30837f8" rel="stylesheet" />
|
||||||
|
@ -315,8 +315,8 @@
|
||||||
<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">
|
||||||
<s>Alpha release v0.0.16.4</s>
|
<s>Alpha release v0.0.16.5</s>
|
||||||
v20230722.002
|
v20230812.001
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<a
|
<a
|
||||||
|
@ -553,7 +553,7 @@
|
||||||
src="js/ui/tool/generic.js?v=3e678e0"
|
src="js/ui/tool/generic.js?v=3e678e0"
|
||||||
type="text/javascript"></script>
|
type="text/javascript"></script>
|
||||||
|
|
||||||
<script src="js/ui/tool/dream.js?v=c97af5b" type="text/javascript"></script>
|
<script src="js/ui/tool/dream.js?v=95bd3f0" type="text/javascript"></script>
|
||||||
<script
|
<script
|
||||||
src="js/ui/tool/maskbrush.js?v=e9bd0eb"
|
src="js/ui/tool/maskbrush.js?v=e9bd0eb"
|
||||||
type="text/javascript"></script>
|
type="text/javascript"></script>
|
||||||
|
|
|
@ -62,12 +62,9 @@ const _monitorProgress = (bb, oncheck = null) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const timeSpent = performance.now() - init;
|
const timeSpent = performance.now() - init;
|
||||||
setTimeout(
|
setTimeout(() => {
|
||||||
() => {
|
|
||||||
if (running) _checkProgress();
|
if (running) _checkProgress();
|
||||||
},
|
}, Math.max(0, minDelay - timeSpent));
|
||||||
Math.max(0, minDelay - timeSpent)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_checkProgress();
|
_checkProgress();
|
||||||
|
@ -697,10 +694,29 @@ const _generate = async (endpoint, request, bb, options = {}) => {
|
||||||
parseInt(requestCopy.seed) +
|
parseInt(requestCopy.seed) +
|
||||||
requestCopy.batch_size * requestCopy.n_iter;
|
requestCopy.batch_size * requestCopy.n_iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
localStorage.getItem(
|
||||||
|
"openoutpaint/settings.update-prompt-on-more-button"
|
||||||
|
) == "true"
|
||||||
|
) {
|
||||||
|
requestCopy.prompt = document.getElementById("prompt").value;
|
||||||
|
requestCopy.negative_prompt =
|
||||||
|
document.getElementById("negPrompt").value;
|
||||||
|
}
|
||||||
dreamData = await _dream(endpoint, requestCopy);
|
dreamData = await _dream(endpoint, requestCopy);
|
||||||
images.push(...dreamData.images);
|
images.push(...dreamData.images);
|
||||||
seeds.push(...dreamData.seeds);
|
seeds.push(...dreamData.seeds);
|
||||||
|
if (
|
||||||
|
localStorage.getItem(
|
||||||
|
"openoutpaint/settings.jump-to-1st-new-on-more-button"
|
||||||
|
) == "true"
|
||||||
|
) {
|
||||||
|
at = images.length - requestCopy.n_iter * requestCopy.batch_size;
|
||||||
|
activateImgAt(at);
|
||||||
|
} else {
|
||||||
updateImageIndexText();
|
updateImageIndexText();
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (alertCount < 2) {
|
if (alertCount < 2) {
|
||||||
notifications.notify(
|
notifications.notify(
|
||||||
|
@ -2035,9 +2051,9 @@ const dreamTool = () =>
|
||||||
"outpainting_fill",
|
"outpainting_fill",
|
||||||
"Outpaint Type",
|
"Outpaint Type",
|
||||||
{
|
{
|
||||||
0: "fill (SDXL?)",
|
0: "fill",
|
||||||
1: "original (SDXL?)",
|
1: "original",
|
||||||
2: "latent noise (SD1.x/2.x)",
|
2: "latent noise (suggested)",
|
||||||
3: "latent nothing",
|
3: "latent nothing",
|
||||||
},
|
},
|
||||||
2, // AVOID ORIGINAL FOR OUTPAINT OR ELSE but we still give you the option because we love you and because it seems to work better for SDXL
|
2, // AVOID ORIGINAL FOR OUTPAINT OR ELSE but we still give you the option because we love you and because it seems to work better for SDXL
|
||||||
|
|
|
@ -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" />
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
<link href="../css/colors.css?v=f732f19" rel="stylesheet" />
|
<link href="../css/colors.css?v=f732f19" rel="stylesheet" />
|
||||||
<link href="../css/icons.css?v=e6f94af" rel="stylesheet" />
|
<link href="../css/icons.css?v=e6f94af" rel="stylesheet" />
|
||||||
|
|
||||||
<link href="../css/index.css?v=fad20a2" rel="stylesheet" />
|
<link href="../css/index.css?v=a1f5bff" rel="stylesheet" />
|
||||||
<link href="../css/layers.css?v=92c0352" rel="stylesheet" />
|
<link href="../css/layers.css?v=92c0352" rel="stylesheet" />
|
||||||
|
|
||||||
<link href="../css/ui/generic.css?v=30837f8" rel="stylesheet" />
|
<link href="../css/ui/generic.css?v=30837f8" rel="stylesheet" />
|
||||||
|
@ -142,6 +142,24 @@
|
||||||
onchange="changeSmoothRendering()" />
|
onchange="changeSmoothRendering()" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">+ Button Updates Prompt</td>
|
||||||
|
<td class="input">
|
||||||
|
<input
|
||||||
|
id="cbxUpdatePromptOnMoreButton"
|
||||||
|
class="canvas-size-input"
|
||||||
|
type="checkbox" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">Jump to 1st New on +</td>
|
||||||
|
<td class="input">
|
||||||
|
<input
|
||||||
|
id="cbxJumpTo1stNewOnMoreButton"
|
||||||
|
class="canvas-size-input"
|
||||||
|
type="checkbox" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<!-- //TODO implement this
|
<!-- //TODO implement this
|
||||||
<tr>
|
<tr>
|
||||||
<td class="title">Marching Ants Update MS</td>
|
<td class="title">Marching Ants Update MS</td>
|
||||||
|
@ -165,6 +183,12 @@
|
||||||
const hrfixLiar = document.getElementById("hrfix-liar");
|
const hrfixLiar = document.getElementById("hrfix-liar");
|
||||||
const autolayer = document.getElementById("autolayer");
|
const autolayer = document.getElementById("autolayer");
|
||||||
const smoothRendering = document.getElementById("cbxSmooth");
|
const smoothRendering = document.getElementById("cbxSmooth");
|
||||||
|
const updatePromptOnMoreButton = document.getElementById(
|
||||||
|
"cbxUpdatePromptOnMoreButton"
|
||||||
|
);
|
||||||
|
const jumpTo1stNewOnMoreButton = document.getElementById(
|
||||||
|
"cbxJumpTo1stNewOnMoreButton"
|
||||||
|
);
|
||||||
|
|
||||||
function writeToLocalStorage() {
|
function writeToLocalStorage() {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
|
@ -190,6 +214,14 @@
|
||||||
"openoutpaint/settings.smooth",
|
"openoutpaint/settings.smooth",
|
||||||
smoothRendering.checked
|
smoothRendering.checked
|
||||||
);
|
);
|
||||||
|
localStorage.setItem(
|
||||||
|
"openoutpaint/settings.update-prompt-on-more-button",
|
||||||
|
updatePromptOnMoreButton.checked
|
||||||
|
);
|
||||||
|
localStorage.setItem(
|
||||||
|
"openoutpaint/settings.jump-to-1st-new-on-more-button",
|
||||||
|
jumpTo1stNewOnMoreButton.checked
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loads values from local storage
|
// Loads values from local storage
|
||||||
|
@ -219,6 +251,24 @@
|
||||||
: localStorage.getItem("openoutpaint/settings.smooth") === "true";
|
: localStorage.getItem("openoutpaint/settings.smooth") === "true";
|
||||||
smoothRendering.checked = _enable_smooth;
|
smoothRendering.checked = _enable_smooth;
|
||||||
|
|
||||||
|
let _enable_update_prompt_on_more_button =
|
||||||
|
localStorage.getItem(
|
||||||
|
"openoutpaint/settings.update-prompt-on-more-button"
|
||||||
|
) === null
|
||||||
|
? true
|
||||||
|
: localStorage.getItem(
|
||||||
|
"openoutpaint/settings.update-prompt-on-more-button"
|
||||||
|
) === "true";
|
||||||
|
|
||||||
|
let _enable_jump_to_1st_new_on_more_button =
|
||||||
|
localStorage.getItem(
|
||||||
|
"openoutpaint/settings.jump-to-1st-new-on-more-button"
|
||||||
|
) === null
|
||||||
|
? true
|
||||||
|
: localStorage.getItem(
|
||||||
|
"openoutpaint/settings.jump-to-1st-new-on-more-button"
|
||||||
|
) === "true";
|
||||||
|
|
||||||
writeToLocalStorage();
|
writeToLocalStorage();
|
||||||
|
|
||||||
canvasWidth.onchange = writeToLocalStorage;
|
canvasWidth.onchange = writeToLocalStorage;
|
||||||
|
@ -229,6 +279,8 @@
|
||||||
hrfixLiar.onchange = writeToLocalStorage;
|
hrfixLiar.onchange = writeToLocalStorage;
|
||||||
autolayer.onchange = writeToLocalStorage;
|
autolayer.onchange = writeToLocalStorage;
|
||||||
smoothRendering.onchange = writeToLocalStorage;
|
smoothRendering.onchange = writeToLocalStorage;
|
||||||
|
updatePromptOnMoreButton.onchange = writeToLocalStorage;
|
||||||
|
jumpTo1stNewOnMoreButton.onchange = writeToLocalStorage;
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue