Skip to content

Commit d8fa2de

Browse files
committed
remove more unused func
1 parent d92855d commit d8fa2de

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

tests/pipelines/test_modular_pipelines_common.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ def to_np(tensor):
3333
return tensor
3434

3535

36-
def check_same_shape(tensor_list):
37-
shapes = [tensor.shape for tensor in tensor_list]
38-
return all(shape == shapes[0] for shape in shapes[1:])
39-
40-
4136
class ModularIPAdapterTesterMixin:
4237
"""
4338
This mixin is designed to be used with PipelineTesterMixin and unittest.TestCase classes.
@@ -677,13 +672,3 @@ def test_cfg(self):
677672
out_cfg = pipe(**inputs, output="images")
678673

679674
assert out_cfg.shape == out_no_cfg.shape
680-
681-
682-
# Some models (e.g. unCLIP) are extremely likely to significantly deviate depending on which hardware is used.
683-
# This helper function is used to check that the image doesn't deviate on average more than 10 pixels from a
684-
# reference image.
685-
def assert_mean_pixel_difference(image, expected_image, expected_max_diff=10):
686-
image = np.asarray(DiffusionPipeline.numpy_to_pil(image)[0], dtype=np.float32)
687-
expected_image = np.asarray(DiffusionPipeline.numpy_to_pil(expected_image)[0], dtype=np.float32)
688-
avg_diff = np.abs(image - expected_image).mean()
689-
assert avg_diff < expected_max_diff, f"Error image deviates {avg_diff} pixels on average"

0 commit comments

Comments
 (0)