Skip to content

Commit 18bae04

Browse files
committed
fix precision
1 parent bbd0c16 commit 18bae04

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/pipelines/controlnet_hunyuandit/test_controlnet_hunyuandit.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from diffusers.models import HunyuanDiT2DControlNetModel, HunyuanDiT2DMultiControlNetModel
3030
from diffusers.utils import load_image
3131
from diffusers.utils.testing_utils import (
32+
Expectations,
3233
backend_empty_cache,
3334
enable_full_determinism,
3435
require_torch_accelerator,
@@ -238,8 +239,12 @@ def test_canny(self):
238239

239240
original_image = image[-3:, -3:, -1].flatten()
240241

241-
expected_image = np.array(
242-
[0.43652344, 0.4399414, 0.44921875, 0.45043945, 0.45703125, 0.44873047, 0.43579102, 0.44018555, 0.42578125]
242+
expected_image = Expectations(
243+
{
244+
("xpu", 3): np.array([0.64709055, 0.64534926, 0.644328, 0.6434535, 0.6505399, 0.638746, 0.6558074, 0.6602831, 0.646336]),
245+
("cuda", 7): np.array([0.43652344, 0.4399414, 0.44921875, 0.45043945, 0.45703125, 0.44873047, 0.43579102, 0.44018555, 0.42578125])
246+
}
247+
243248
)
244249

245250
assert np.abs(original_image.flatten() - expected_image).max() < 1e-2

0 commit comments

Comments
 (0)