diff --git a/static/dream_web/index.js b/static/dream_web/index.js index 27086ebd17..76b0deb1e0 100644 --- a/static/dream_web/index.js +++ b/static/dream_web/index.js @@ -19,6 +19,7 @@ function appendOutput(src, seed, config) { outputNode.addEventListener('click', () => { let form = document.querySelector("#generate-form"); for (const [k, v] of new FormData(form)) { + if (k == 'initimg') { continue; } form.querySelector(`*[name=${k}]`).value = config[k]; } if (config.variation_amount > 0 || config.with_variations != '') { @@ -74,6 +75,7 @@ async function generateSubmit(form) { // Convert file data to base64 let formData = Object.fromEntries(new FormData(form)); + formData.initimg_name = formData.initimg.name formData.initimg = formData.initimg.name !== '' ? await toBase64(formData.initimg) : null; let strength = formData.strength;