File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/pipelines/controlnet Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
10781078class 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 )
You can’t perform that action at this time.
0 commit comments