ry_efficient_attention(attention_op=None)

disable_xformers_memory_efficient_attention

<
source
>
(
)



Disable memory efficient attention as implemented in xformers.

enable_sequential_cpu_offload

<
source
>
(
gpu_id = 0

)



Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
torch.device('meta'