Skip to content

How to use X/Y/Z Grid

Introduction

The X/Y/Z Grid script generates multiple images while automatically varying selected values, then displays results in labeled grids.

To activate X/Y/Z Grid, open the Script dropdown and select "X/Y/Z Grid".

Several new UI controls will appear.

X, Y, and Z Types define what changes across generated images.

X Type creates columns, Y Type creates rows, and Z Type creates separate grid images (a "3D grid" effect). X/Y/Z Values define the actual values to test. For some types, values are selected from a dropdown. For others, values are comma-separated.

Most options are self-explanatory, such as Model, Seed, VAE, and CLiP Skip.

Prompt S/R

"Prompt S/R" means Prompt Search and Replace. After selecting this type, enter a word already present in your prompt, followed by comma-separated replacements.

For example, if your prompt is "a lazy cat" and Prompt S/R is cat,dog,monkey, the script creates three images: a lazy cat, a lazy dog, and a lazy monkey.

You are not limited to single words. You can replace phrases, for example lazy cat,boisterous dog,mischievous monkey, or even the full prompt, for example a lazy cat,three blind mice,an astronaut on the moon.

Embeddings and LoRAs are also valid search-and-replace terms, for example <lora:FirstLora:1>,<lora:SecondLora:1>,<lora:ThirdLora:1>.

You could also change the strength of a lora; <lora:FirstLora:1>,<lora:FirstLora:0.75>,<lora:FirstLora:0.5>,<lora:FirstLora:0.25>.
(Note: You could strip this down to FirstLora:1,FirstLora:0.75,FirstLora:0.5,FirstLora:0.25.)