mages)
Unless you have a GPU with more RAM, 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!


