From 1d7e9eca098d3ae66bb1db184b88f80781891e51 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 27 Jul 2024 15:47:49 +0300 Subject: [PATCH 1/2] Merge pull request #16275 from AUTOMATIC1111/fix-image-upscale-on-cpu fix image upscale on cpu --- modules/upscaler_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/upscaler_utils.py b/modules/upscaler_utils.py index 5ecbbed96..a8408f05b 100644 --- a/modules/upscaler_utils.py +++ b/modules/upscaler_utils.py @@ -41,7 +41,7 @@ def upscale_pil_patch(model, img: Image.Image) -> Image.Image: """ param = torch_utils.get_param(model) - with torch.no_grad(): + with torch.inference_mode(): tensor = pil_image_to_torch_bgr(img).unsqueeze(0) # add batch dimension tensor = tensor.to(device=param.device, dtype=param.dtype) with devices.without_autocast(): From 82a973c04367123ae98bd9abdf80d9eda9b910e2 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 27 Jul 2024 15:49:39 +0300 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 301bfd068..5f7e59351 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.10.1 + +### Bug Fixes: +* fix image upscale on cpu ([#16275](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/16275)) + + ## 1.10.0 ### Features: