easydiffusion icon indicating copy to clipboard operation
easydiffusion copied to clipboard

Getting duplicate images (seed not incrementing to account for batch size)

Open jk-niersbach opened this issue 2 years ago • 5 comments

Generating several images at a time on a GTX 1660 Super on Win10. Images have started doubling up - the 2nd and subsequent image in each batch will be duplicated at the start of the next batch. Suggests that seed incrementation isn't working correctly.

It looks like it is incrementing the global seed by 1 each time, rather than by batch size. See truncated command line output.txt (generating 12 images, 4 at a time).

Also not sure that the seed number displayed in the web GUI (upper right hand corner of each image) is correct.

Problem didn't exist for the first 500 or so images.

jk-niersbach avatar Sep 09 '22 04:09 jk-niersbach

Thanks, will check that. Are you running the latest version? v2.08? This was fixed recently, but it's possible there's a different bug that's causing this for you.

cmdr2 avatar Sep 09 '22 06:09 cmdr2

Thanks for the response. Version is v2.08 (beta). I tried fixing it locally by changing it to use opt_seed += batch_size but I think it pulls fresh code each time it's started.

Also I note the seed label is the same for each image in a batch. I wonder if this is because it uses imgSeedLabel.innerHTML = 'Seed: ' + seed without incrementing inside the for (let idx in res.output) { loop?

I should mention, I wasn't having this bug yesterday, so maybe something in the latest version?

jk-niersbach avatar Sep 09 '22 11:09 jk-niersbach

I can confirm that I have the same issue.

Althorion avatar Sep 09 '22 19:09 Althorion

I just ran a set of 300 images, 3 at a time and I have 3 duplicates of every image as well. I'm on 2.09 (edit also same behavior on 2.1) image image image are 3 images made in a batch of 3. Not using GFPGAN or upsampling.

RocketPop avatar Sep 10 '22 17:09 RocketPop

Duplicate image generation issue fixed for me on v2.10 (listed as v2.1).

The seed number displayed on each image is still the same for all images in each batch (although this is a minor issue).

jk-niersbach avatar Sep 10 '22 22:09 jk-niersbach

Both the issues have been fixed as of a few versions ago.

cmdr2 avatar Oct 29 '22 08:10 cmdr2