@@ -1485,8 +1485,8 @@ def test_to_device(self):
14851485 model_devices = [component .device .type for component in components .values () if hasattr (component , "device" )]
14861486 self .assertTrue (all (device == torch_device for device in model_devices ))
14871487
1488- output_cuda = pipe (** self .get_dummy_inputs (torch_device ))[0 ]
1489- self .assertTrue (np .isnan (to_np (output_cuda )).sum () == 0 )
1488+ output_device = pipe (** self .get_dummy_inputs (torch_device ))[0 ]
1489+ self .assertTrue (np .isnan (to_np (output_device )).sum () == 0 )
14901490
14911491 def test_to_dtype (self ):
14921492 components = self .get_dummy_components ()
@@ -1677,11 +1677,11 @@ def test_cpu_offload_forward_pass_twice(self, expected_max_diff=2e-4):
16771677
16781678 pipe .set_progress_bar_config (disable = None )
16791679
1680- pipe .enable_model_cpu_offload (device = torch_device )
1680+ pipe .enable_model_cpu_offload ()
16811681 inputs = self .get_dummy_inputs (generator_device )
16821682 output_with_offload = pipe (** inputs )[0 ]
16831683
1684- pipe .enable_model_cpu_offload (device = torch_device )
1684+ pipe .enable_model_cpu_offload ()
16851685 inputs = self .get_dummy_inputs (generator_device )
16861686 output_with_offload_twice = pipe (** inputs )[0 ]
16871687
@@ -2226,7 +2226,7 @@ def create_pipe():
22262226
22272227 def enable_group_offload_on_component (pipe , group_offloading_kwargs ):
22282228 # We intentionally don't test VAE's here. This is because some tests enable tiling on the VAE. If
2229- # tiling is enabled and a forward pass is run, when cuda streams are used, the execution order of
2229+ # tiling is enabled and a forward pass is run, when accelerator streams are used, the execution order of
22302230 # the layers is not traced correctly. This causes errors. For apply group offloading to VAE, a
22312231 # warmup forward pass (even with dummy small inputs) is recommended.
22322232 for component_name in [
0 commit comments