ll this function on all processes. In this case, set is_main_process=True only on
the main process to avoid race conditions.


save_function (Callable) —
The function to use to save the state dictionary. Useful on distributed training like TPUs when one
need to replace torch.save by another method. Can be configured with the environment variable
DIFFUSERS_SAVE_MODE.



Save an attention processor to a directory, so that it can be re-loaded usin