Show the final output, if it was sent in a single streaming packet

This commit is contained in:
cmdr2 2022-09-14 17:21:00 +05:30
parent 7a540f2a88
commit 74a9c46f08

View File

@ -669,7 +669,9 @@ async function doMakeImage(reqBody, batchCount) {
try { try {
let stepUpdate = JSON.parse(jsonStr) let stepUpdate = JSON.parse(jsonStr)
if (stepUpdate.step !== undefined) { if (stepUpdate.step === undefined) {
finalJSON += jsonStr
} else {
let batchSize = parseInt(reqBody['num_inference_steps']) let batchSize = parseInt(reqBody['num_inference_steps'])
let overallStepCount = stepUpdate.step + batchesDone * batchSize let overallStepCount = stepUpdate.step + batchesDone * batchSize
let totalSteps = batchCount * batchSize let totalSteps = batchCount * batchSize