diff --git a/tests/models/test_modeling_common.py b/tests/models/test_modeling_common.py index 0ce01fb93f40..2437a5a55cda 100644 --- a/tests/models/test_modeling_common.py +++ b/tests/models/test_modeling_common.py @@ -417,6 +417,9 @@ def test_set_xformers_attn_processor_for_determinism(self): @require_torch_gpu def test_set_attn_processor_for_determinism(self): + if self.uses_custom_attn_processor: + return + torch.use_deterministic_algorithms(False) if self.forward_requires_fresh_args: model = self.model_class(**self.init_dict) diff --git a/tests/models/transformers/test_models_transformer_flux.py b/tests/models/transformers/test_models_transformer_flux.py index 538d158cbcb9..6cf7a4f75707 100644 --- a/tests/models/transformers/test_models_transformer_flux.py +++ b/tests/models/transformers/test_models_transformer_flux.py @@ -32,6 +32,9 @@ class FluxTransformerTests(ModelTesterMixin, unittest.TestCase): # We override the items here because the transformer under consideration is small. model_split_percents = [0.7, 0.6, 0.6] + # Skip setting testing with default: AttnProcessor + uses_custom_attn_processor = True + @property def dummy_input(self): batch_size = 1 diff --git a/tests/pipelines/flux/test_pipeline_flux.py b/tests/pipelines/flux/test_pipeline_flux.py index 57aacd164843..4caff4030261 100644 --- a/tests/pipelines/flux/test_pipeline_flux.py +++ b/tests/pipelines/flux/test_pipeline_flux.py @@ -25,6 +25,9 @@ class FluxPipelineFastTests(unittest.TestCase, PipelineTesterMixin): params = frozenset(["prompt", "height", "width", "guidance_scale", "prompt_embeds", "pooled_prompt_embeds"]) batch_params = frozenset(["prompt"]) + # there is no xformers processor for Flux + test_xformers_attention = False + def get_dummy_components(self): torch.manual_seed(0) transformer = FluxTransformer2DModel( diff --git a/tests/pipelines/pag/test_pag_sd3.py b/tests/pipelines/pag/test_pag_sd3.py index 93260870e723..627d613ee20d 100644 --- a/tests/pipelines/pag/test_pag_sd3.py +++ b/tests/pipelines/pag/test_pag_sd3.py @@ -37,6 +37,7 @@ class StableDiffusion3PAGPipelineFastTests(unittest.TestCase, PipelineTesterMixi ] ) batch_params = frozenset(["prompt", "negative_prompt"]) + test_xformers_attention = False def get_dummy_components(self): torch.manual_seed(0) diff --git a/tests/pipelines/stable_audio/test_stable_audio.py b/tests/pipelines/stable_audio/test_stable_audio.py index fe8a684de0cb..41ac94891c6f 100644 --- a/tests/pipelines/stable_audio/test_stable_audio.py +++ b/tests/pipelines/stable_audio/test_stable_audio.py @@ -68,6 +68,8 @@ class StableAudioPipelineFastTests(PipelineTesterMixin, unittest.TestCase): "callback_steps", ] ) + # There is not xformers version of the StableAudioPipeline custom attention processor + test_xformers_attention = False def get_dummy_components(self): torch.manual_seed(0)