I wrote a patch related to #1339. This patch makes xFormers use Flash Attention as a priority. More details to see: Generating (almost) reproducible pictures using Diffusers with xFormers

main...takuma104:diffusers:force_xformers_flash_attention
I would like to get some feedback.
- Is it worth opening a PR?
- I have put an argument to enable_xformers_memory_efficient_attention() to specify if this patch is enabled or not, is there a better way to specify it?
- Any other advice?