PUs when one
need to replace torch.save by another method. Can be configured with the environment variable
DIFFUSERS_SAVE_MODE.



Save the LoRA parameters corresponding to the UNet and the text encoder.

enable_model_cpu_offload

<
source
>
(
gpu_id = 0

)



Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to enable_sequential_cpu_offload, this method moves one whole model at a time