diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-15 04:33:16 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-15 04:33:16 +0000 |
commit | 14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8 (patch) | |
tree | aa32bd3e131ebf200db5706301668cc413286629 | |
parent | 5dee0fa1f812cf9f5fa6675c22c9a57afad39983 (diff) | |
download | stable-diffusion-webui-gfx803-14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8.tar.gz stable-diffusion-webui-gfx803-14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8.tar.bz2 stable-diffusion-webui-gfx803-14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8.zip |
fix an issue in live previews that happens when you use SDXL with fp16 VAE
-rw-r--r-- | modules/processing.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py index f68e010d..eb4a60eb 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -539,8 +539,7 @@ def create_random_tensors(shape, seeds, subseeds=None, subseed_strength=0.0, see def decode_first_stage(model, x):
- with devices.autocast(disable=x.dtype == devices.dtype_vae):
- x = model.decode_first_stage(x)
+ x = model.decode_first_stage(x.to(devices.dtype_vae))
return x
|