Unverified Commit fe5911bf authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

[Stable Diffusion Inpaint ]Fix dtype inpaint (#4113)

Fix dtype inpaint
parent b024ebb9
...@@ -684,8 +684,8 @@ class StableDiffusionXLInpaintPipeline( ...@@ -684,8 +684,8 @@ class StableDiffusionXLInpaintPipeline(
return outputs return outputs
def _encode_vae_image(self, image: torch.Tensor, generator: torch.Generator): def _encode_vae_image(self, image: torch.Tensor, generator: torch.Generator):
dtype = image.dtype
if self.vae.config.force_upcast: if self.vae.config.force_upcast:
dtype = image.dtype
image = image.float() image = image.float()
self.vae.to(dtype=torch.float32) self.vae.to(dtype=torch.float32)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment