Skip to content

Commit 16dba23

Browse files
authored
Update pipeline_onnx_stable_diffusion_inpaint.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 675c2a5 commit 16dba23

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_inpaint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ def __call__(
483483
self.scheduler.set_timesteps(num_inference_steps)
484484

485485
# scale the initial noise by the standard deviation required by the scheduler
486-
latents = latents * np.float64(self.scheduler.init_noise_sigma)
486+
latents = latents * self.scheduler.init_noise_sigma
487487

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

0 commit comments

Comments
 (0)