diffusionbee-stable-diffusion-ui icon indicating copy to clipboard operation
diffusionbee-stable-diffusion-ui copied to clipboard

Crashing on batch size 8; batch should be something else(?)

Open mrwebandgraphic opened this issue 4 years ago • 3 comments

When choosing a batch size of 8, the program will crash:

image

image

First I believed this happens, since 14 is not dividable by 8. But this also happens with Num. Images 8.

Therefor I conclude any setting with Batch size 8 will crash the software.

I am on MacOS Monterey 12.6.


What purpose does the current batch implementation serve?

If I choose Num Images: 2 and batch size: 7 it creates 7 images. So it is ignoring the Num images and defaults to the batch size?

I would rather understand batch size as an extra set of images. So choosing 14 images and a batch size of let's say 5, I would expect to generate 70 images. (14 * 5)

Since we have a "Stop" button, the Num images and Batch size should not be drop downs, but rather input fields, so I could generate hundreds or thousands of images if I would like to.


Love the fact that Mac users can now have this super simple installer to dive into the world of SD. Looking forward to the progress of this software!

mrwebandgraphic avatar Sep 27 '22 12:09 mrwebandgraphic

Mine also crashes when Batch size 8 is selected. Batch explanation below.

Batch in its current form is simply just processing Num Images in parallel to get more results in the same amount of time. For example if you select Num Images 12 and Batch size 6, in the same time it would have taken to generate two individual images one by one (Num Images 2 and Batch size 1), you can get a total of 12 generated images aka Num Images total—provided there is enough ram to do the process.

One anomaly I've discovered however is if you run Num Images 14 and Batch size 6, it actually generates 18 total images instead of 14.

The current limit of 14 is probably one of the largest feature requests and I think we can all expect that it's being worked on.

z-stevens avatar Sep 28 '22 05:09 z-stevens

@zachschrock I tested Num Images 14 and Batch size 1:

The images then took around 1 minute to generate: Total time for 14 images: 14 minutes.

image

Then I tried Num Images 14, batch size 7. Each batch took around 15 minutes and so it took more than 30 minutes for 14 images. So it was way slower? Maybe I still do not understand the concept 🙈 ...

image

But I agree, having more control over the total amount of images generated would be a priority right now...

Maybe @divamgupta can clarify the batch process in more detail.

mrwebandgraphic avatar Sep 28 '22 06:09 mrwebandgraphic

Other than making it possible to generate more than 14 images, I doubt there's any benefit to processing in batches. It will just make it eat more ram. Maybe if you have 128GB of vram (unified memory on apple silicon), or if you're generating really small images, it might let you finish faster, but it's realistically more likely to make you run out of ram and have to use swap, which would explain why you found it to be slower.

Maybe if you were on a machine with multiple physical GPUs (not cores, I mean multiple graphics cards, though an M1 Ultra might count for this purpose), it might allow you to use them more efficiently, but since ram is going to be the limiting factor for most of us, I would keep the batch size to 1 (2 at the most).

whosawhatsis avatar Sep 29 '22 03:09 whosawhatsis