Skip to content

Commit 8822e45

Browse files
authored
Merge branch 'main' into add-joyimage-edit-plus
2 parents 4e93efc + a1acc51 commit 8822e45

65 files changed

Lines changed: 299 additions & 285 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/pipelines/animatediff/test_animatediff.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -189,41 +189,41 @@ def test_ip_adapter(self):
189189
if torch_device == "cpu":
190190
expected_pipe_slice = np.array(
191191
[
192-
0.5216,
193-
0.5620,
194-
0.4927,
195-
0.5082,
196-
0.4786,
197-
0.5932,
198-
0.5125,
199-
0.4514,
200-
0.5315,
201-
0.4694,
202-
0.3276,
203-
0.4863,
204-
0.3920,
205-
0.3684,
206-
0.5745,
207-
0.4499,
208-
0.5081,
209-
0.5414,
210-
0.6014,
211-
0.5062,
212-
0.3630,
213-
0.5296,
214-
0.6018,
215-
0.5098,
216-
0.4948,
217-
0.5101,
218-
0.5620,
192+
0.5137,
193+
0.5648,
194+
0.4867,
195+
0.4968,
196+
0.4716,
197+
0.5940,
198+
0.5136,
199+
0.4370,
200+
0.5325,
201+
0.4856,
202+
0.3607,
203+
0.4660,
204+
0.4036,
205+
0.3620,
206+
0.5743,
207+
0.4617,
208+
0.4962,
209+
0.5454,
210+
0.5908,
211+
0.5164,
212+
0.3581,
213+
0.5272,
214+
0.6035,
215+
0.5103,
216+
0.4988,
217+
0.5016,
218+
0.5651,
219219
]
220220
)
221221
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
222222

223223
def test_dict_tuple_outputs_equivalent(self):
224224
expected_slice = None
225225
if torch_device == "cpu":
226-
expected_slice = np.array([0.5125, 0.4514, 0.5315, 0.4499, 0.5081, 0.5414, 0.4948, 0.5101, 0.5620])
226+
expected_slice = np.array([0.5136, 0.4370, 0.5325, 0.4617, 0.4962, 0.5454, 0.4988, 0.5016, 0.5651])
227227
return super().test_dict_tuple_outputs_equivalent(expected_slice=expected_slice)
228228

229229
def test_inference_batch_single_identical(

tests/pipelines/animatediff/test_animatediff_controlnet.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,32 +198,32 @@ def test_ip_adapter(self):
198198
if torch_device == "cpu":
199199
expected_pipe_slice = np.array(
200200
[
201-
0.6604,
202-
0.4099,
203-
0.4928,
204-
0.5706,
205-
0.5096,
206-
0.5012,
207-
0.6051,
208-
0.5169,
209-
0.5021,
210-
0.4864,
211-
0.4261,
212-
0.5779,
213-
0.5822,
214-
0.4049,
215-
0.5253,
216-
0.6160,
217-
0.4150,
218-
0.5155,
201+
0.6680,
202+
0.5061,
203+
0.5069,
204+
0.5930,
205+
0.5747,
206+
0.4737,
207+
0.5885,
208+
0.5630,
209+
0.5083,
210+
0.4910,
211+
0.4132,
212+
0.5721,
213+
0.5793,
214+
0.4540,
215+
0.5094,
216+
0.5943,
217+
0.4598,
218+
0.5104,
219219
]
220220
)
221221
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
222222

223223
def test_dict_tuple_outputs_equivalent(self):
224224
expected_slice = None
225225
if torch_device == "cpu":
226-
expected_slice = np.array([0.6051, 0.5169, 0.5021, 0.6160, 0.4150, 0.5155])
226+
expected_slice = np.array([0.5885, 0.5630, 0.5083, 0.5943, 0.4598, 0.5104])
227227
return super().test_dict_tuple_outputs_equivalent(expected_slice=expected_slice)
228228

229229
def test_inference_batch_single_identical(

tests/pipelines/animatediff/test_animatediff_sparsectrl.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -200,32 +200,32 @@ def test_ip_adapter(self):
200200
if torch_device == "cpu":
201201
expected_pipe_slice = np.array(
202202
[
203-
0.6604,
204-
0.4099,
205-
0.4928,
206-
0.5706,
207-
0.5096,
208-
0.5012,
209-
0.6051,
210-
0.5169,
211-
0.5021,
212-
0.4864,
213-
0.4261,
214-
0.5779,
215-
0.5822,
216-
0.4049,
217-
0.5253,
218-
0.6160,
219-
0.4150,
220-
0.5155,
203+
0.6680,
204+
0.5061,
205+
0.5069,
206+
0.5930,
207+
0.5747,
208+
0.4737,
209+
0.5885,
210+
0.5630,
211+
0.5083,
212+
0.4910,
213+
0.4132,
214+
0.5721,
215+
0.5793,
216+
0.4540,
217+
0.5094,
218+
0.5943,
219+
0.4598,
220+
0.5104,
221221
]
222222
)
223223
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
224224

225225
def test_dict_tuple_outputs_equivalent(self):
226226
expected_slice = None
227227
if torch_device == "cpu":
228-
expected_slice = np.array([0.6051, 0.5169, 0.5021, 0.6160, 0.4150, 0.5155])
228+
expected_slice = np.array([0.5885, 0.5630, 0.5083, 0.5943, 0.4598, 0.5104])
229229
return super().test_dict_tuple_outputs_equivalent(expected_slice=expected_slice)
230230

231231
def test_inference_batch_single_identical(

tests/pipelines/animatediff/test_animatediff_video2video.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -182,23 +182,23 @@ def test_ip_adapter(self):
182182
expected_pipe_slice = np.array(
183183
[
184184
0.5569,
185-
0.6250,
186-
0.4145,
187-
0.5613,
188-
0.5563,
189-
0.5213,
190-
0.5092,
191-
0.4950,
192-
0.4950,
193-
0.5685,
194-
0.3858,
195-
0.4864,
196-
0.6458,
197-
0.4312,
198-
0.5518,
199-
0.5608,
200-
0.4418,
201-
0.5378,
185+
0.6257,
186+
0.4152,
187+
0.5620,
188+
0.5558,
189+
0.5206,
190+
0.5101,
191+
0.4937,
192+
0.4943,
193+
0.5694,
194+
0.3849,
195+
0.4863,
196+
0.6459,
197+
0.4288,
198+
0.5531,
199+
0.5620,
200+
0.4404,
201+
0.5379,
202202
]
203203
)
204204
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)

tests/pipelines/animatediff/test_animatediff_video2video_controlnet.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,23 +198,23 @@ def test_ip_adapter(self):
198198
expected_pipe_slice = np.array(
199199
[
200200
0.5569,
201-
0.6250,
202-
0.4144,
203-
0.5613,
204-
0.5563,
205-
0.5213,
206-
0.5091,
207-
0.4950,
208-
0.4950,
209-
0.5684,
210-
0.3858,
201+
0.6257,
202+
0.4152,
203+
0.5620,
204+
0.5558,
205+
0.5206,
206+
0.5101,
207+
0.4937,
208+
0.4943,
209+
0.5694,
210+
0.3849,
211211
0.4863,
212-
0.6457,
213-
0.4311,
214-
0.5517,
215-
0.5608,
216-
0.4417,
217-
0.5377,
212+
0.6459,
213+
0.4288,
214+
0.5531,
215+
0.5620,
216+
0.4404,
217+
0.5379,
218218
]
219219
)
220220
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)

tests/pipelines/chronoedit/test_chronoedit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def test_inference(self):
156156
self.assertEqual(generated_video.shape, (5, 3, 16, 16))
157157

158158
# fmt: off
159-
expected_slice = torch.tensor([0.4525, 0.4520, 0.4485, 0.4534, 0.4523, 0.4522, 0.4529, 0.4528, 0.5022, 0.5064, 0.5011, 0.5061, 0.5028, 0.4979, 0.5117, 0.5192])
159+
expected_slice = torch.tensor([0.4525, 0.4520, 0.4485, 0.4533, 0.4522, 0.4522, 0.4529, 0.4528, 0.5023, 0.5067, 0.5023, 0.5061, 0.5024, 0.4977, 0.5118, 0.5190])
160160
# fmt: on
161161

162162
generated_slice = generated_video.flatten()

tests/pipelines/cogvideo/test_cogvideox_image2video.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def test_vae_tiling(self, expected_diff_max: float = 0.3):
277277
# The reason to modify it this way is because I2V Transformer limits the generation to resolutions used during initialization.
278278
# This limitation comes from using learned positional embeddings which cannot be generated on-the-fly like sincos or RoPE embeddings.
279279
# See the if-statement on "self.use_learned_positional_embeddings" in diffusers/models/embeddings.py
280+
torch.manual_seed(0)
280281
components["transformer"] = CogVideoXTransformer3DModel.from_config(
281282
components["transformer"].config,
282283
sample_height=16,

tests/pipelines/controlnet/test_controlnet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def test_attention_slicing_forward_pass(self):
178178
def test_ip_adapter(self):
179179
expected_pipe_slice = None
180180
if torch_device == "cpu":
181-
expected_pipe_slice = np.array([0.5234, 0.3333, 0.1745, 0.7605, 0.6224, 0.4637, 0.6989, 0.7526, 0.4665])
181+
expected_pipe_slice = np.array([0.5245, 0.3353, 0.1784, 0.7556, 0.6239, 0.4673, 0.6931, 0.7487, 0.4644])
182182
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
183183

184184
@unittest.skipIf(
@@ -427,7 +427,7 @@ def test_inference_batch_single_identical(self):
427427
def test_ip_adapter(self):
428428
expected_pipe_slice = None
429429
if torch_device == "cpu":
430-
expected_pipe_slice = np.array([0.2422, 0.3425, 0.4048, 0.5351, 0.3503, 0.2419, 0.4645, 0.4570, 0.3804])
430+
expected_pipe_slice = np.array([0.2395, 0.3421, 0.4023, 0.5345, 0.3496, 0.2402, 0.4645, 0.4563, 0.3786])
431431
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
432432

433433
def test_save_pretrained_raise_not_implemented_exception(self):
@@ -655,7 +655,7 @@ def test_inference_batch_single_identical(self):
655655
def test_ip_adapter(self):
656656
expected_pipe_slice = None
657657
if torch_device == "cpu":
658-
expected_pipe_slice = np.array([0.5264, 0.3203, 0.1602, 0.8235, 0.6332, 0.4593, 0.7226, 0.7777, 0.4780])
658+
expected_pipe_slice = np.array([0.5234, 0.3198, 0.1596, 0.8201, 0.6316, 0.4566, 0.7209, 0.7761, 0.4757])
659659
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
660660

661661
def test_save_pretrained_raise_not_implemented_exception(self):

tests/pipelines/controlnet/test_controlnet_img2img.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_attention_slicing_forward_pass(self):
177177
def test_ip_adapter(self):
178178
expected_pipe_slice = None
179179
if torch_device == "cpu":
180-
expected_pipe_slice = np.array([0.7096, 0.5149, 0.3571, 0.5897, 0.4715, 0.4052, 0.6098, 0.6886, 0.4213])
180+
expected_pipe_slice = np.array([0.7051, 0.5142, 0.3632, 0.5896, 0.4731, 0.4075, 0.6059, 0.6865, 0.4203])
181181
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
182182

183183
@unittest.skipIf(
@@ -384,7 +384,7 @@ def test_inference_batch_single_identical(self):
384384
def test_ip_adapter(self):
385385
expected_pipe_slice = None
386386
if torch_device == "cpu":
387-
expected_pipe_slice = np.array([0.5293, 0.7339, 0.6642, 0.3950, 0.5212, 0.5175, 0.7002, 0.5907, 0.5182])
387+
expected_pipe_slice = np.array([0.5241, 0.7318, 0.6612, 0.3910, 0.5169, 0.5151, 0.6959, 0.5856, 0.5151])
388388
return super().test_ip_adapter(expected_pipe_slice=expected_pipe_slice)
389389

390390
def test_save_pretrained_raise_not_implemented_exception(self):

tests/pipelines/controlnet/test_controlnet_inpaint_sdxl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ def test_controlnet_sdxl_guess(self):
343343
output = sd_pipe(**inputs)
344344
image_slice = output.images[0, -3:, -3:, -1]
345345

346-
expected_slice = np.array([0.5460, 0.4943, 0.4635, 0.5832, 0.5366, 0.4815, 0.6034, 0.5741, 0.4341])
346+
expected_slice = np.array(
347+
[0.559845, 0.506214, 0.467439, 0.587851, 0.536138, 0.480375, 0.598892, 0.571167, 0.434700]
348+
)
347349

348350
# make sure that it's equal
349351
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-4

0 commit comments

Comments
 (0)