Skip to content

Commit 30c575b

Browse files
committed
up
1 parent a31e59e commit 30c575b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/pipelines/test_pipelines_common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2354,7 +2354,10 @@ def test_pipeline_with_accelerator_device_map(self, expected_max_difference=1e-4
23542354
with tempfile.TemporaryDirectory() as tmpdir:
23552355
pipe.save_pretrained(tmpdir)
23562356
loaded_pipe = self.pipeline_class.from_pretrained(tmpdir, device_map=torch_device)
2357-
inputs = self.get_dummy_inputs(torch_device)
2357+
for component in loaded_pipe.components.values():
2358+
if hasattr(component, "set_default_attn_processor"):
2359+
component.set_default_attn_processor()
2360+
inputs["generator"] = torch.manual_seed(0)
23582361
loaded_out = loaded_pipe(**inputs)[0]
23592362
max_diff = np.abs(to_np(out) - to_np(loaded_out)).max()
23602363
self.assertLess(max_diff, expected_max_difference)

0 commit comments

Comments
 (0)