From 9edc5beddcb2572493ec6ca9a041065e599b80dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Mon, 21 Apr 2025 17:40:13 +0200 Subject: [PATCH] Use config value directly --- .../schedulers/scheduling_flow_match_euler_discrete.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py b/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py index deedfbca40..d953f11282 100644 --- a/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py +++ b/src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py @@ -456,10 +456,8 @@ class FlowMatchEulerDiscreteScheduler(SchedulerMixin, ConfigMixin): next_sigma = sigma_next dt = sigma_next - sigma - # Determine whether to use stochastic sampling for this step - use_stochastic = stochastic_sampling if stochastic_sampling is not None else self.config.stochastic_sampling - - if use_stochastic: + + if self.config.stochastic_sampling: x0 = sample - current_sigma * model_output noise = torch.randn_like(sample) prev_sample = (1.0 - next_sigma) * x0 + next_sigma * noise