Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions tests/lora/test_lora_layers_cogvideox.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from diffusers.utils.testing_utils import (
floats_tensor,
is_peft_available,
is_torch_version,
require_peft_backend,
skip_mps,
torch_device,
Expand Down Expand Up @@ -126,6 +127,10 @@ def get_dummy_inputs(self, with_generator=True):
return noise, input_ids, pipeline_inputs

@skip_mps
@unittest.skipIf(
torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"),
"Test not supported on PyTorch 2.5 and CPU.",
)
Copy link
Member Author

Choose a reason for hiding this comment

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

@a-r-r-o-w not important for this PR but any reason this had to be rewritten for Cog?

def test_lora_fuse_nan(self):
for scheduler_cls in self.scheduler_classes:
components, text_lora_config, denoiser_lora_config = self.get_dummy_components(scheduler_cls)
Expand Down
5 changes: 5 additions & 0 deletions tests/lora/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from diffusers.utils.testing_utils import (
CaptureLogger,
floats_tensor,
is_torch_version,
require_peft_backend,
require_peft_version_greater,
require_transformers_version_greater,
Expand Down Expand Up @@ -1510,6 +1511,10 @@ def test_simple_inference_with_text_denoiser_multi_adapter_weighted(self):
)

@skip_mps
@unittest.skipIf(
torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"),
"Test not supported on PyTorch 2.5 and CPU.",
)
def test_lora_fuse_nan(self):
for scheduler_cls in self.scheduler_classes:
components, text_lora_config, denoiser_lora_config = self.get_dummy_components(scheduler_cls)
Expand Down
Loading