From bc9f6770175507fbacba7ac41343c4198e745479 Mon Sep 17 00:00:00 2001 From: Taited Date: Wed, 9 Aug 2023 19:30:19 +0800 Subject: [PATCH] fix unit test bug --- .../test_stable_diffusion/test_stable_diffusion_inpaint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion_inpaint.py b/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion_inpaint.py index 36b210fd4b..dc12afcaee 100644 --- a/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion_inpaint.py +++ b/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion_inpaint.py @@ -102,7 +102,7 @@ def test_stable_diffusion(): StableDiffuser.text_encoder = dummy_text_encoder() image = torch.clip(torch.randn((1, 3, 64, 64)), -1, 1) - mask = torch.clip(torch.randn((1, 3, 64, 64)), -1, 1) + mask = torch.clip(torch.randn((1, 3, 64, 64)), 0, 1) with pytest.raises(Exception): StableDiffuser.infer('temp', image, mask, height=31, width=31)