Commit 29c06f85 authored by lijian6's avatar lijian6
Browse files

fix sd-xl enable xformers fa error


Signed-off-by: lijian6's avatarlijian <lijian6@sugon.com>
parent 2548c728
...@@ -1259,6 +1259,7 @@ class StableDiffusionXLPipeline( ...@@ -1259,6 +1259,7 @@ class StableDiffusionXLPipeline(
if XLA_AVAILABLE: if XLA_AVAILABLE:
xm.mark_step() xm.mark_step()
self.disable_xformers_memory_efficient_attention()
if not output_type == "latent": if not output_type == "latent":
# make sure the VAE is in float32 mode, as it overflows in float16 # make sure the VAE is in float32 mode, as it overflows in float16
needs_upcasting = self.vae.dtype == torch.float16 and self.vae.config.force_upcast needs_upcasting = self.vae.dtype == torch.float16 and self.vae.config.force_upcast
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment