Skip to content

Commit 863d28f

Browse files
committed
add condition
1 parent 82571a4 commit 863d28f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/lora/test_lora_layers_cogvideox.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ def get_dummy_inputs(self, with_generator=True):
127127
return noise, input_ids, pipeline_inputs
128128

129129
@skip_mps
130-
@pytest.mark.xfail(reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.", strict=True)
130+
@pytest.mark.xfail(
131+
condtion=torch.device(torch_device).type == "cpu",
132+
reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.",
133+
strict=True,
134+
)
131135
def test_lora_fuse_nan(self):
132136
for scheduler_cls in self.scheduler_classes:
133137
components, text_lora_config, denoiser_lora_config = self.get_dummy_components(scheduler_cls)

tests/lora/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,11 @@ def test_simple_inference_with_text_denoiser_multi_adapter_weighted(self):
15111511
)
15121512

15131513
@skip_mps
1514-
@pytest.mark.xfail(reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.", strict=True)
1514+
@pytest.mark.xfail(
1515+
condtion=torch.device(torch_device).type == "cpu",
1516+
reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.",
1517+
strict=True,
1518+
)
15151519
def test_lora_fuse_nan(self):
15161520
for scheduler_cls in self.scheduler_classes:
15171521
components, text_lora_config, denoiser_lora_config = self.get_dummy_components(scheduler_cls)

0 commit comments

Comments
 (0)