mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tweak format of "result" event in web ui
This commit is contained in:
parent
153c93bdd4
commit
b983d61e93
@ -104,9 +104,8 @@ class DreamServer(BaseHTTPRequestHandler):
|
|||||||
with open("./outputs/img-samples/dream_web_log.txt", "a") as log:
|
with open("./outputs/img-samples/dream_web_log.txt", "a") as log:
|
||||||
log.write(f"{path}: {json.dumps(config)}\n")
|
log.write(f"{path}: {json.dumps(config)}\n")
|
||||||
|
|
||||||
# TODO fix format of this event
|
|
||||||
self.wfile.write(bytes(json.dumps(
|
self.wfile.write(bytes(json.dumps(
|
||||||
{'event': 'result', 'files': [path, seed], 'config': config}
|
{'event': 'result', 'url': path, 'seed': seed, 'config': config}
|
||||||
) + '\n',"utf-8"))
|
) + '\n',"utf-8"))
|
||||||
|
|
||||||
# control state of the "postprocessing..." message
|
# control state of the "postprocessing..." message
|
||||||
|
@ -95,7 +95,7 @@ async function generateSubmit(form) {
|
|||||||
if (data.event === 'result') {
|
if (data.event === 'result') {
|
||||||
noOutputs = false;
|
noOutputs = false;
|
||||||
document.querySelector("#no-results-message")?.remove();
|
document.querySelector("#no-results-message")?.remove();
|
||||||
appendOutput(data.files[0],data.files[1],data.config);
|
appendOutput(data.url, data.seed, data.config);
|
||||||
progressEle.setAttribute('value', 0);
|
progressEle.setAttribute('value', 0);
|
||||||
progressEle.setAttribute('max', totalSteps);
|
progressEle.setAttribute('max', totalSteps);
|
||||||
progressImageEle.src = BLANK_IMAGE_URL;
|
progressImageEle.src = BLANK_IMAGE_URL;
|
||||||
|
Loading…
Reference in New Issue
Block a user