Skip to content

Batch Generate & Image Quantity

David Sage edited this page Nov 12, 2025 · 11 revisions
Image Quantity   Batch Generate

Images are Generated in Batches

When a user clicks on the Generate button in FooocusPlus and similar programs, a batch of new images is created. In FooocusPlus, the size of the batch is specified using the Image Quantity slider.

The slider can vary the quantity from 1 and 50 images, with a default value of 4 images. The maximum and the default values can be changed in UserDir/config.txt using the "default_max_image_quantity" and "default_image_quantity" settings, respectively.

If a batch of 50 images is not enough - perhaps the computer is intended to continue to generate through the night for example - a right-click on the Generate button will bring up the "Generate Forever" option, which will do that just that (within reason):

Generate Forever

The Batch Control as an Image Quantity Multiplier

As a more controlled alternative, the Batch Control accordion contains the Batch Generate button which will automatically restart the generative process. If the Batch Count is set to 1, then pressing Batch Generate will create one batch of images - just like pressing the Generate button itself. However, if Batch Count is set to 10 for example, then 10 batches will be created automatically. If the Image Quantity is set to 50 and the Batch Count is set to its default maximum of 25 batches then its multiplier value will result in the creation of 1250 images.

The maximum value of the Batch Count is relative to the config.txt "default_max_image_quantity": the Batch Count maximum value is always half the Image Quantity maximum.

Batch Control Accordion

Was That Generate or Batch Generate?

Through force of habit, I have found that it is very easy to press Generate when I really want Batch Generate. However, there is an Info message that appears in the top right corner of the FooocusPlus window, "Starting batch generate", as seen below. If I do not see that message I know that I did not press the correct button, so it is time to press Stop. 🙂

Batch Generate Message

Using Batch Control with Image Grid

Perhaps more importantly, the ability to create several batches at once can be used to create image sets of a certain size automatically - and the size of each set is always determined by the Image Quantity.

For example, if "Generate an Image Grid for Each Batch" is enabled - the control located directly below the Batch Count slider - the set of images within the batch will be automatically grouped together to form one image that contains them all. Please see the Image Grid article for more details. In the example below, the Image Quantity was set to 2 (a grid size of 2) and the Batch Count was set to 2. This allowed two grids to be created automatically using the same prompt:

Image Grid 1 Image Grid 2

Image Batch Control with Prompt Arrays

Prompt Arrays allow alternative keywords or phrases to be inserted into a prompt string. Each option will be processed in order within a batch of images. A prompt array is created by surrounding two or more alternatives within pairs of opening and closing square brackets. By default, each alternative is separated by a vertical bar, as follows: __ethnic__ [[man | woman]]

In this case the prompt array is preceded by the ethnic wildcard (included in FooocusPlus). An image of a man then an image of a woman will be created, each with a random ethnicity. The examples below combine the prompt array concept with image grids, but this is by no means necessary. The Image Quantity was again set to 2 with a Batch Count of 2:

Prompt Array 1 Prompt Array 2

Clone this wiki locally