mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-20 18:08:00 +02:00
Each output render need it own instance of reqBody to avoid altering the other runs after they are completed.
This commit is contained in:
parent
c0c6675423
commit
87122ce211
@ -631,6 +631,10 @@ async function checkTasks() {
|
|||||||
|
|
||||||
const genSeeds = Boolean(typeof task.reqBody.seed !== 'number' || (task.reqBody.seed === task.seed && task.numOutputsTotal > 1))
|
const genSeeds = Boolean(typeof task.reqBody.seed !== 'number' || (task.reqBody.seed === task.seed && task.numOutputsTotal > 1))
|
||||||
for (let i = 0; i < task.batchCount; i++) {
|
for (let i = 0; i < task.batchCount; i++) {
|
||||||
|
if (task.numOutputsTotal > 1) {
|
||||||
|
// Each output render need it own instance of reqBody to avoid altering the other runs after they are completed.
|
||||||
|
task.reqBody = Object.assign({}, task.reqBody)
|
||||||
|
}
|
||||||
if (genSeeds) {
|
if (genSeeds) {
|
||||||
task.reqBody.seed = task.seed + (i * task.reqBody['num_outputs'])
|
task.reqBody.seed = task.seed + (i * task.reqBody['num_outputs'])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user