Skip to content

Commit cba548d

Browse files
authored
fix(pipeline): k sampler sigmas device (#9189)
If Karras is not enabled, a device inconsistency error will occur. This is due to the fact that sigmas were not moved to the specified device.
1 parent db829a4 commit cba548d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ def __call__(
602602
sigma_min: float = self.k_diffusion_model.sigmas[0].item()
603603
sigma_max: float = self.k_diffusion_model.sigmas[-1].item()
604604
sigmas = get_sigmas_karras(n=num_inference_steps, sigma_min=sigma_min, sigma_max=sigma_max)
605-
sigmas = sigmas.to(device)
606605
else:
607606
sigmas = self.scheduler.sigmas
607+
sigmas = sigmas.to(device)
608608
sigmas = sigmas.to(prompt_embeds.dtype)
609609

610610
# 6. Prepare latent variables

0 commit comments

Comments
 (0)