Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/models/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions tests/models/transformers/test_models_transformer_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +35 to +36
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be added to Fal as well no?


@property
def dummy_input(self):
batch_size = 1
Expand Down
3 changes: 3 additions & 0 deletions tests/pipelines/flux/test_pipeline_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

@sayakpaul sayakpaul Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


def get_dummy_components(self):
torch.manual_seed(0)
transformer = FluxTransformer2DModel(
Expand Down
1 change: 1 addition & 0 deletions tests/pipelines/pag/test_pag_sd3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tests/pipelines/stable_audio/test_stable_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down