Skip to content

Commit 675c2a5

Browse files
authored
Update pipeline_onnx_stable_diffusion.py to remove float64
init_noise_sigma was being set as float64 before multiplying with latents, which changed latents into float64 too, which caused errors with onnxruntime since the latter wanted float16.
1 parent 20e4b6a commit 675c2a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def __call__(
383383
# set timesteps
384384
self.scheduler.set_timesteps(num_inference_steps)
385385

386-
latents = latents * np.float64(self.scheduler.init_noise_sigma)
386+
latents = latents * self.scheduler.init_noise_sigma
387387

388388
# prepare extra kwargs for the scheduler step, since not all schedulers have the same signature
389389
# eta (η) is only used with the DDIMScheduler, it will be ignored for other schedulers.

0 commit comments

Comments
 (0)