Skip to content

Commit 007ad0e

Browse files
authored
[CI] More fixes for Fast GPU Tests on main (#9300)
update
1 parent 0e6a840 commit 007ad0e

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

tests/models/test_modeling_common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ def test_set_xformers_attn_processor_for_determinism(self):
417417

418418
@require_torch_gpu
419419
def test_set_attn_processor_for_determinism(self):
420+
if self.uses_custom_attn_processor:
421+
return
422+
420423
torch.use_deterministic_algorithms(False)
421424
if self.forward_requires_fresh_args:
422425
model = self.model_class(**self.init_dict)

tests/models/transformers/test_models_transformer_flux.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class FluxTransformerTests(ModelTesterMixin, unittest.TestCase):
3232
# We override the items here because the transformer under consideration is small.
3333
model_split_percents = [0.7, 0.6, 0.6]
3434

35+
# Skip setting testing with default: AttnProcessor
36+
uses_custom_attn_processor = True
37+
3538
@property
3639
def dummy_input(self):
3740
batch_size = 1

tests/pipelines/flux/test_pipeline_flux.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class FluxPipelineFastTests(unittest.TestCase, PipelineTesterMixin):
2525
params = frozenset(["prompt", "height", "width", "guidance_scale", "prompt_embeds", "pooled_prompt_embeds"])
2626
batch_params = frozenset(["prompt"])
2727

28+
# there is no xformers processor for Flux
29+
test_xformers_attention = False
30+
2831
def get_dummy_components(self):
2932
torch.manual_seed(0)
3033
transformer = FluxTransformer2DModel(

tests/pipelines/pag/test_pag_sd3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class StableDiffusion3PAGPipelineFastTests(unittest.TestCase, PipelineTesterMixi
3737
]
3838
)
3939
batch_params = frozenset(["prompt", "negative_prompt"])
40+
test_xformers_attention = False
4041

4142
def get_dummy_components(self):
4243
torch.manual_seed(0)

tests/pipelines/stable_audio/test_stable_audio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class StableAudioPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
6868
"callback_steps",
6969
]
7070
)
71+
# There is not xformers version of the StableAudioPipeline custom attention processor
72+
test_xformers_attention = False
7173

7274
def get_dummy_components(self):
7375
torch.manual_seed(0)

0 commit comments

Comments
 (0)