make_image_grid(images, 2, 2) Unless you have a GPU with more vRAM, the code above probably returned an OOM error! Most of the memory is taken up by the cross-attention layers. Instead of running this operation in a batch, you can run it sequentially to save a significant amount of memory. All you have to do is configure the pipeline to use the enable_attention_slicing() function:   Copied pipeline.enable_attention_slicing() Now try increasing the batch_size to 8!   Copied images = pipeline(**get_inputs(batch_size=8)).images