File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1616import unittest
1717
1818import numpy as np
19+ import pytest
1920import torch
2021from transformers import AutoTokenizer , T5EncoderModel
2122
2930from diffusers .utils .testing_utils import (
3031 floats_tensor ,
3132 is_peft_available ,
32- is_torch_version ,
3333 require_peft_backend ,
3434 skip_mps ,
3535 torch_device ,
@@ -127,10 +127,7 @@ def get_dummy_inputs(self, with_generator=True):
127127 return noise , input_ids , pipeline_inputs
128128
129129 @skip_mps
130- @unittest .skipIf (
131- torch .device (torch_device ).type == "cpu" and is_torch_version (">=" , "2.5" ),
132- "Test not supported on PyTorch 2.5 and CPU." ,
133- )
130+ @pytest .mark .xfail ("Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1." , strict = True )
134131 def test_lora_fuse_nan (self ):
135132 for scheduler_cls in self .scheduler_classes :
136133 components , text_lora_config , denoiser_lora_config = self .get_dummy_components (scheduler_cls )
Original file line number Diff line number Diff line change 1919from itertools import product
2020
2121import numpy as np
22+ import pytest
2223import torch
2324
2425from diffusers import (
3233from diffusers .utils .testing_utils import (
3334 CaptureLogger ,
3435 floats_tensor ,
35- is_torch_version ,
3636 require_peft_backend ,
3737 require_peft_version_greater ,
3838 require_transformers_version_greater ,
@@ -1511,10 +1511,7 @@ def test_simple_inference_with_text_denoiser_multi_adapter_weighted(self):
15111511 )
15121512
15131513 @skip_mps
1514- @unittest .skipIf (
1515- torch .device (torch_device ).type == "cpu" and is_torch_version (">=" , "2.5" ),
1516- "Test not supported on PyTorch 2.5 and CPU." ,
1517- )
1514+ @pytest .mark .xfail ("Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1." , strict = True )
15181515 def test_lora_fuse_nan (self ):
15191516 for scheduler_cls in self .scheduler_classes :
15201517 components , text_lora_config , denoiser_lora_config = self .get_dummy_components (scheduler_cls )
You can’t perform that action at this time.
0 commit comments