diff --git a/onediff_diffusers_extensions/examples/text_to_image_sdxl_enterprise.py b/onediff_diffusers_extensions/examples/text_to_image_sdxl_enterprise.py index 2c53aa3eb..258c82fa3 100644 --- a/onediff_diffusers_extensions/examples/text_to_image_sdxl_enterprise.py +++ b/onediff_diffusers_extensions/examples/text_to_image_sdxl_enterprise.py @@ -83,7 +83,6 @@ def parse_args(): args.model, torch_dtype=torch.float16, use_safetensors=True, - variant="fp16", ) pipe.to("cuda") diff --git a/src/infer_compiler_registry/register_diffusers/attention_processor_oflow.py b/src/infer_compiler_registry/register_diffusers/attention_processor_oflow.py index 70684b16c..2aab4f440 100644 --- a/src/infer_compiler_registry/register_diffusers/attention_processor_oflow.py +++ b/src/infer_compiler_registry/register_diffusers/attention_processor_oflow.py @@ -361,6 +361,16 @@ def forward( # here we simply pass along all tensors to the selected processor class # For standard processors that are defined here, `**cross_attention_kwargs` is empty + from diffusers.models.attention_processor import ( + AttnProcessor as DiffusersAttnProcessor, + AttnProcessor2_0 as DiffusersAttnProcessor2_0, + ) + + if isinstance(self.processor, DiffusersAttnProcessor) or isinstance( + self.processor, DiffusersAttnProcessor2_0 + ): + self.set_processor(AttnProcessor()) + return self.processor( self, hidden_states,