Merge pull request #248 from zero01101/small_fixes

Small fixes
This commit is contained in:
tim h 2023-07-22 11:01:05 -05:00 committed by GitHub
commit 4afb0e0f6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 12 deletions

View file

@ -316,7 +316,7 @@
<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.4</s>
v20230722.001 v20230722.002
</a> </a>
<br /> <br />
<a <a
@ -539,7 +539,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=c6b95a9" type="text/javascript"></script> <script src="js/index.js?v=d4006e8" type="text/javascript"></script>
<script <script
src="js/ui/floating/history.js?v=4f29db4" src="js/ui/floating/history.js?v=4f29db4"
@ -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=1bbd3fe" type="text/javascript"></script> <script src="js/ui/tool/dream.js?v=c97af5b" 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>

View file

@ -1172,7 +1172,17 @@ async function getModels(refresh = false) {
); );
const optData = await optResponse.json(); const optData = await optResponse.json();
const model = optData.sd_model_checkpoint; var model = optData.sd_model_checkpoint;
// 20230722 - sigh so this key is now removed https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/66c5f1bb1556a2d86d9f11aeb92f83d4a09832cc
// no idea why but time to deal with it
if (model === undefined) {
const modelHash = optData.sd_checkpoint_hash;
const hashMap = data.map((option) => ({
hash: option.sha256,
title: option.title,
}));
model = hashMap.find((option) => option.hash === modelHash).title;
}
console.log("Current model: " + model); console.log("Current model: " + model);
if (modelAutoComplete.value !== model) modelAutoComplete.value = model; if (modelAutoComplete.value !== model) modelAutoComplete.value = model;
} catch (e) { } catch (e) {

View file

@ -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();
@ -2035,8 +2032,8 @@ const dreamTool = () =>
"outpainting_fill", "outpainting_fill",
"Outpaint Type", "Outpaint Type",
{ {
0: "fill", 0: "fill (SDXL?)",
1: "original (SDXL)", 1: "original (SDXL?)",
2: "latent noise (SD1.x/2.x)", 2: "latent noise (SD1.x/2.x)",
3: "latent nothing", 3: "latent nothing",
}, },