mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-04-11 13:08:24 +02:00
Report the steps for img2img correctly
This commit is contained in:
parent
a3de0820b3
commit
5c827703a1
@ -771,7 +771,7 @@ async function doMakeImage(reqBody, batchCount) {
|
|||||||
if (stepUpdate.step === undefined) {
|
if (stepUpdate.step === undefined) {
|
||||||
finalJSON += jsonStr
|
finalJSON += jsonStr
|
||||||
} else {
|
} else {
|
||||||
let batchSize = parseInt(reqBody['num_inference_steps'])
|
let batchSize = stepUpdate.total_steps
|
||||||
let overallStepCount = stepUpdate.step + batchesDone * batchSize
|
let overallStepCount = stepUpdate.step + batchesDone * batchSize
|
||||||
let totalSteps = batchCount * batchSize
|
let totalSteps = batchCount * batchSize
|
||||||
let percent = 100 * (overallStepCount / totalSteps)
|
let percent = 100 * (overallStepCount / totalSteps)
|
||||||
|
@ -369,7 +369,8 @@ def do_mk_img(req: Request):
|
|||||||
partial_x_samples = x_samples
|
partial_x_samples = x_samples
|
||||||
|
|
||||||
if req.stream_progress_updates:
|
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:
|
if req.stream_image_progress and i % 5 == 0:
|
||||||
partial_images = []
|
partial_images = []
|
||||||
|
Loading…
Reference in New Issue
Block a user