From 315b4ed2e4489a52d14df09edc5ecca1ca1e4ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Deltheil?= Date: Tue, 12 Dec 2023 17:18:29 +0100 Subject: [PATCH] test_schedulers: enforce manual seed --- tests/foundationals/latent_diffusion/test_schedulers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/foundationals/latent_diffusion/test_schedulers.py b/tests/foundationals/latent_diffusion/test_schedulers.py index 553171a..186d88b 100644 --- a/tests/foundationals/latent_diffusion/test_schedulers.py +++ b/tests/foundationals/latent_diffusion/test_schedulers.py @@ -26,9 +26,11 @@ def test_dpm_solver_diffusers(): assert allclose(diffusers_output, refiners_output, rtol=0.01), f"outputs differ at step {step}" -def test_ddim_solver_diffusers(): +def test_ddim_diffusers(): from diffusers import DDIMScheduler # type: ignore + manual_seed(0) + diffusers_scheduler = DDIMScheduler( beta_end=0.012, beta_schedule="scaled_linear", @@ -54,6 +56,8 @@ def test_ddim_solver_diffusers(): def test_scheduler_remove_noise(): from diffusers import DDIMScheduler # type: ignore + manual_seed(0) + diffusers_scheduler = DDIMScheduler( beta_end=0.012, beta_schedule="scaled_linear",