Skip to content

Commit 38f9b2b

Browse files
authored
Merge branch 'main' into fix-clip-lora-tests
2 parents 9500e54 + dcbb18a commit 38f9b2b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from ..configuration_utils import ConfigMixin, register_to_config
2323
from ..utils import BaseOutput, is_scipy_available, logging
24+
from ..utils.torch_utils import randn_tensor
2425
from .scheduling_utils import SchedulerMixin
2526

2627

@@ -507,7 +508,7 @@ def step(
507508

508509
if self.config.stochastic_sampling:
509510
x0 = sample - current_sigma * model_output
510-
noise = torch.randn_like(sample)
511+
noise = randn_tensor(sample.shape, generator=generator, device=sample.device, dtype=sample.dtype)
511512
prev_sample = (1.0 - next_sigma) * x0 + next_sigma * noise
512513
else:
513514
prev_sample = sample + dt * model_output

0 commit comments

Comments
 (0)