Report the steps for img2img correctly

This commit is contained in:
cmdr2 2022-09-23 13:38:33 +05:30
parent a3de0820b3
commit 5c827703a1
2 changed files with 3 additions and 2 deletions

View File

@ -771,7 +771,7 @@ async function doMakeImage(reqBody, batchCount) {
if (stepUpdate.step === undefined) {
finalJSON += jsonStr
} else {
let batchSize = parseInt(reqBody['num_inference_steps'])
let batchSize = stepUpdate.total_steps
let overallStepCount = stepUpdate.step + batchesDone * batchSize
let totalSteps = batchCount * batchSize
let percent = 100 * (overallStepCount / totalSteps)

View File

@ -369,7 +369,8 @@ def do_mk_img(req: Request):
partial_x_samples = x_samples
if req.stream_progress_updates:
progress = {"step": i, "total_steps": opt_ddim_steps}
n_steps = opt_ddim_steps if req.init_image is None else t_enc
progress = {"step": i, "total_steps": n_steps}
if req.stream_image_progress and i % 5 == 0:
partial_images = []