We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0fece2 commit cb0bf0bCopy full SHA for cb0bf0b
src/diffusers/schedulers/scheduling_ddim.py
@@ -283,8 +283,9 @@ def step(
283
prev_sample = alpha_prod_t_prev ** (0.5) * pred_original_sample + pred_sample_direction
284
285
if eta > 0:
286
+ # randn_like does not support generator https://github.com/pytorch/pytorch/issues/27072
287
device = model_output.device if torch.is_tensor(model_output) else "cpu"
- noise = torch.randn(model_output.shape, generator=generator).to(device)
288
+ noise = torch.randn(model_output.shape, dtype=model_output.dtype, generator=generator).to(device)
289
variance = self._get_variance(timestep, prev_timestep) ** (0.5) * eta * noise
290
291
prev_sample = prev_sample + variance
0 commit comments