Skip to content

Prompt Arrays

David Sage edited this page Nov 18, 2025 · 11 revisions
Watercolour City and Forest

Prompt Array Syntax

Prompt arrays combine several different prompts into one prompt statement. FooocusPlus will process each of these sub-prompts in order, automatically. Provided that the Image Quantity equals or exceeds the number of these separate prompts, unique images will be created for each one of them.

In the main prompt box, a prompt array is surrounded by double square brackets with each option or sub-prompt separated by a vertical bar: __ethnic__ woman walking [[in the city | in the forest]]

The keywords that are outside of the arrays are used with each possible combination, and the use of the __ethnic__ wildcard introduces some randomness into the results.

For convenient viewing of the example images, the Image Grid feature was enabled.

Two Prompt Arrays

Multiple Prompt Arrays

A prompt can contain more than one prompt array, as shown in this example.

Each of the two arrays contains two options, so in combination there are four possible outcomes. Therefore the Image Quantity should be set to 4 (or a multiple of 4) to show all possible results: a __ethnic__ [[man | woman]] wearing a [[red | blue]] jacket

The resulting prompts are: a Lezgin man wearing a red jacket a Ogoni woman wearing a red jacket a Chinese man wearing a blue jacket a Algerian woman wearing a blue jacket

Comma vs Bar

The Vertical Line Separator

Prompt Array: write gold shiny text: [["comma, " | "bar ", vertical bar]]

In original Fooocus, the comma was used as the separator between elements of the array. Unfortunately this was a frustrating decision because standard punctuation is an important part of prompt writing that affects how the words will be interpreted. Starting with FooocusPlus 1.0.9, the default separator changed to the vertical bar, the original standard used in Automatic1111.

This default can be changed using the config.txt option, "prompt_array_separator".

Woodroffe Stylesheet Prompt Array

Prompt Arrays in Depth

When creating the sample images for The FooocusPlus Stylesheet, a prompt array is used for each style, as follows: [[Redhead girl on sea shores | bedroom with big window | a futuristic transparent concrete bunker | little cute kitten outdoors]]

The example above is for the TC Patrick Woodroffe style, and at the bottom is TC Textural Oil Masterwork.

Detailed longer prompts can be used in each element of the array. Please see the Storyboard article for an example. And this article has more information on creating Image Grids.

Textural Oil Stylesheet Prompt Array

Clone this wiki locally