mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
make initimg appear in web log
This commit is contained in:
parent
b90a215000
commit
d0d95d3a2a
@ -87,7 +87,7 @@ class DreamServer(BaseHTTPRequestHandler):
|
|||||||
# across images generated by each call to prompt2img(), so we define it in
|
# across images generated by each call to prompt2img(), so we define it in
|
||||||
# the outer scope of image_done()
|
# the outer scope of image_done()
|
||||||
config = post_data.copy() # Shallow copy
|
config = post_data.copy() # Shallow copy
|
||||||
config['initimg'] = ''
|
config['initimg'] = config.pop('initimg_name','')
|
||||||
|
|
||||||
images_generated = 0 # helps keep track of when upscaling is started
|
images_generated = 0 # helps keep track of when upscaling is started
|
||||||
images_upscaled = 0 # helps keep track of when upscaling is completed
|
images_upscaled = 0 # helps keep track of when upscaling is completed
|
||||||
|
@ -19,7 +19,8 @@ function appendOutput(src, seed, config) {
|
|||||||
outputNode.addEventListener('click', () => {
|
outputNode.addEventListener('click', () => {
|
||||||
let form = document.querySelector("#generate-form");
|
let form = document.querySelector("#generate-form");
|
||||||
for (const [k, v] of new FormData(form)) {
|
for (const [k, v] of new FormData(form)) {
|
||||||
form.querySelector(`*[name=${k}]`).value = config[k];
|
if (k == 'initimg') { continue; }
|
||||||
|
form.querySelector(`*[name=${k}]`).value = config[k];
|
||||||
}
|
}
|
||||||
document.querySelector("#seed").value = seed;
|
document.querySelector("#seed").value = seed;
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ async function generateSubmit(form) {
|
|||||||
|
|
||||||
// Convert file data to base64
|
// Convert file data to base64
|
||||||
let formData = Object.fromEntries(new FormData(form));
|
let formData = Object.fromEntries(new FormData(form));
|
||||||
|
formData.initimg_name = formData.initimg.name
|
||||||
formData.initimg = formData.initimg.name !== '' ? await toBase64(formData.initimg) : null;
|
formData.initimg = formData.initimg.name !== '' ? await toBase64(formData.initimg) : null;
|
||||||
|
|
||||||
let strength = formData.strength;
|
let strength = formData.strength;
|
||||||
|
Loading…
Reference in New Issue
Block a user