Skip to content

Commit c8b9e25

Browse files
authored
Update pipeline_onnx_stable_diffusion_upscale.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 16dba23 commit c8b9e25

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def __call__(
481481
timesteps = self.scheduler.timesteps
482482

483483
# Scale the initial noise by the standard deviation required by the scheduler
484-
latents = latents * np.float64(self.scheduler.init_noise_sigma)
484+
latents = latents * self.scheduler.init_noise_sigma
485485

486486
# 5. Add noise to image
487487
noise_level = np.array([noise_level]).astype(np.int64)

0 commit comments

Comments
 (0)