@@ -198,7 +198,7 @@ def test_inference_batch_single_identical(
198198 max_diff = torch .abs (output_batch [0 ] - output [0 ]).max ()
199199 assert max_diff < expected_max_diff , "Batch inference results different from single inference results"
200200
201- @pytest .mark .skipif (torch_device ! = "cpu" , reason = "Test needs an accelerator." )
201+ @pytest .mark .skipif (torch_device = = "cpu" , reason = "Test needs an accelerator." )
202202 def test_float16_inference (self , expected_max_diff = 5e-2 ):
203203 pipe = self .get_pipeline ()
204204 pipe .to (torch_device , torch .float32 )
@@ -227,7 +227,7 @@ def test_float16_inference(self, expected_max_diff=5e-2):
227227 max_diff = numpy_cosine_similarity_distance (output .flatten (), output_fp16 .flatten ())
228228 assert max_diff < expected_max_diff , "FP16 inference is different from FP32 inference"
229229
230- @pytest .mark .skipif (torch_device ! = "cpu" , reason = "Test needs an accelerator." )
230+ @pytest .mark .skipif (torch_device = = "cpu" , reason = "Test needs an accelerator." )
231231 def test_to_device (self ):
232232 pipe = self .get_pipeline ()
233233 pipe .set_progress_bar_config (disable = None )
@@ -254,7 +254,7 @@ def test_inference_is_not_nan_cpu(self):
254254 output = pipe (** self .get_dummy_inputs (), output = "images" )
255255 assert torch .isnan (output ).sum () == 0 , "CPU Inference returns NaN"
256256
257- @pytest .mark .skipif (torch_device ! = "cpu" , reason = "Test needs an accelerator." )
257+ @pytest .mark .skipif (torch_device = = "cpu" , reason = "Test needs an accelerator." )
258258 def test_inference_is_not_nan (self ):
259259 pipe = self .get_pipeline ()
260260 pipe .set_progress_bar_config (disable = None )
@@ -287,7 +287,7 @@ def test_num_images_per_prompt(self):
287287
288288 assert images .shape [0 ] == batch_size * num_images_per_prompt
289289
290- @pytest .mark .skipif (torch_device ! = "cpu" , reason = "Test needs an accelerator." )
290+ @pytest .mark .skipif (torch_device = = "cpu" , reason = "Test needs an accelerator." )
291291 def test_components_auto_cpu_offload_inference_consistent (self ):
292292 base_pipe = self .get_pipeline ().to (torch_device )
293293
0 commit comments