1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

Use config value directly

This commit is contained in:
apolinário
2025-04-21 17:40:13 +02:00
committed by GitHub
parent f87956e9cf
commit 9edc5beddc

View File

@@ -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