diff --git a/CHANGELOG.md b/CHANGELOG.md index 6816ccfe4..8af1d23a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Update for 2023-09-13 Started as a mostly a service release with quite a few fixes, but then... -Major changes how **hires** works as well as support for a very interesting new model [wuerstchen](https://huggingface.co/blog/wuertschen) +Major changes how **hires** works as well as support for a very interesting new model [Wuerstchen](https://huggingface.co/blog/wuertschen) - tons of fixes - changes to **hires** @@ -46,8 +46,6 @@ Major changes how **hires** works as well as support for a very interesting new - cleaner server restart - custom exception handling -Note: **wuerstchen** is pending critical bugfix in `diffusers=0.21.1` - ## Update for 2023-09-06 One week later, another large update! diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index e2f5187df..d22c73a13 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -77,6 +77,12 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro if not shared.cmd_opts.lowvram and not shared.opts.diffusers_seq_cpu_offload: model.vae.to(devices.device) latents.to(model.vae.device) + + needs_upcasting = model.vae.dtype == torch.float16 and model.vae.config.force_upcast + if needs_upcasting: # this is done by diffusers automatically if output_type != 'latent' + model.upcast_vae() + latents = latents.to(next(iter(model.vae.post_quant_conv.parameters())).dtype) + decoded = model.vae.decode(latents / model.vae.config.scaling_factor, return_dict=False)[0] if shared.opts.diffusers_move_unet and not model.has_accelerate: model.unet.to(unet_device) diff --git a/requirements.txt b/requirements.txt index d926ae426..67aad81ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -47,7 +47,7 @@ requests==2.31.0 tqdm==4.66.1 accelerate==0.20.3 opencv-python-headless==4.7.0.72 -diffusers==0.20.2 +diffusers==0.21.1 einops==0.4.1 gradio==3.43.2 huggingface_hub==0.17.1