1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

🎨 fix xl playground device (#8550)

* 🎨 fix xl playground device

* 🎨 run `make fix-copies`

* 🎨 run `make fix-copies`

* edit xl_controlnet_img2img file

* edit playground img2img test slow

* Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_img2img.py

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
Dong
2024-06-24 19:19:55 +08:00
committed by GitHub
parent c375903db5
commit 3fca52022f
3 changed files with 59 additions and 4 deletions

View File

@@ -949,8 +949,8 @@ class StableDiffusionXLControlNetImg2ImgPipeline(
init_latents = init_latents.to(dtype)
if latents_mean is not None and latents_std is not None:
latents_mean = latents_mean.to(device=self.device, dtype=dtype)
latents_std = latents_std.to(device=self.device, dtype=dtype)
latents_mean = latents_mean.to(device=device, dtype=dtype)
latents_std = latents_std.to(device=device, dtype=dtype)
init_latents = (init_latents - latents_mean) * self.vae.config.scaling_factor / latents_std
else:
init_latents = self.vae.config.scaling_factor * init_latents

View File

@@ -723,8 +723,8 @@ class StableDiffusionXLImg2ImgPipeline(
init_latents = init_latents.to(dtype)
if latents_mean is not None and latents_std is not None:
latents_mean = latents_mean.to(device=self.device, dtype=dtype)
latents_std = latents_std.to(device=self.device, dtype=dtype)
latents_mean = latents_mean.to(device=device, dtype=dtype)
latents_std = latents_std.to(device=device, dtype=dtype)
init_latents = (init_latents - latents_mean) * self.vae.config.scaling_factor / latents_std
else:
init_latents = self.vae.config.scaling_factor * init_latents