Skip to content

Commit 0c66254

Browse files
committed
add more
1 parent f604bce commit 0c66254

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/models/test_modeling_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ def test_model_parallelism(self):
876876

877877
self.assertTrue(torch.allclose(base_output[0], new_output[0], atol=1e-5))
878878

879-
@require_torch_gpu
879+
@require_torch_accelerator
880880
def test_sharded_checkpoints(self):
881881
torch.manual_seed(0)
882882
config, inputs_dict = self.prepare_init_args_and_inputs_for_common()
@@ -908,7 +908,7 @@ def test_sharded_checkpoints(self):
908908

909909
self.assertTrue(torch.allclose(base_output[0], new_output[0], atol=1e-5))
910910

911-
@require_torch_gpu
911+
@require_torch_accelerator
912912
def test_sharded_checkpoints_with_variant(self):
913913
torch.manual_seed(0)
914914
config, inputs_dict = self.prepare_init_args_and_inputs_for_common()
@@ -945,7 +945,7 @@ def test_sharded_checkpoints_with_variant(self):
945945

946946
self.assertTrue(torch.allclose(base_output[0], new_output[0], atol=1e-5))
947947

948-
@require_torch_gpu
948+
@require_torch_accelerator
949949
def test_sharded_checkpoints_device_map(self):
950950
config, inputs_dict = self.prepare_init_args_and_inputs_for_common()
951951
model = self.model_class(**config).eval()

tests/single_file/test_model_controlnet_single_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
from diffusers.utils.testing_utils import (
2525
enable_full_determinism,
26-
require_torch_gpu,
26+
require_torch_accelerator,
2727
slow,
2828
)
2929

@@ -32,7 +32,7 @@
3232

3333

3434
@slow
35-
@require_torch_gpu
35+
@require_torch_accelerator
3636
class ControlNetModelSingleFileTests(unittest.TestCase):
3737
model_class = ControlNetModel
3838
ckpt_path = "https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth"

0 commit comments

Comments
 (0)