Skip to content

Commit e32a9ac

Browse files
committed
fix one more
1 parent 88919c0 commit e32a9ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/pipelines/controlnet/test_controlnet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,17 +1074,17 @@ def test_v11_shuffle_global_pool_conditions(self):
10741074

10751075

10761076
@slow
1077-
@require_torch_gpu
1077+
@require_torch_accelerator
10781078
class StableDiffusionMultiControlNetPipelineSlowTests(unittest.TestCase):
10791079
def setUp(self):
10801080
super().setUp()
10811081
gc.collect()
1082-
torch.cuda.empty_cache()
1082+
backend_empty_cache(torch_device)
10831083

10841084
def tearDown(self):
10851085
super().tearDown()
10861086
gc.collect()
1087-
torch.cuda.empty_cache()
1087+
backend_empty_cache(torch_device)
10881088

10891089
def test_pose_and_canny(self):
10901090
controlnet_canny = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny")
@@ -1095,7 +1095,7 @@ def test_pose_and_canny(self):
10951095
safety_checker=None,
10961096
controlnet=[controlnet_pose, controlnet_canny],
10971097
)
1098-
pipe.enable_model_cpu_offload()
1098+
pipe.enable_model_cpu_offload(device=torch_device)
10991099
pipe.set_progress_bar_config(disable=None)
11001100

11011101
generator = torch.Generator(device="cpu").manual_seed(0)

0 commit comments

Comments
 (0)