he 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
image_grid(images, rows=2, cols=4)

Whereas before you couldn’t even generate a batch of 4 images, now you can generate a batch of 8 images at ~3.5 seconds per image! This is probably the fastest you can go on a T4 GPU without sacrificing quality.

Quality
	
