fix progress bar in webui when using strength parameter (#254)

This commit is contained in:
Kevin Gibbons 2022-08-31 08:28:11 -07:00 committed by GitHub
parent 0d2e6f90c8
commit a14fd69a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,8 +61,8 @@ async function generateSubmit(form) {
let formData = Object.fromEntries(new FormData(form));
formData.initimg = formData.initimg.name !== '' ? await toBase64(formData.initimg) : null;
let strength = 0.75; // TODO let this be specified in the UI
let totalSteps = formData.initimg ? Math.floor(.75 * formData.steps) : formData.steps;
let strength = formData.strength;
let totalSteps = formData.initimg ? Math.floor(strength * formData.steps) : formData.steps;
let progressSectionEle = document.querySelector('#progress-section');
progressSectionEle.style.display = 'initial';