Compare commits

...

2 Commits

Author SHA1 Message Date
AUTOMATIC1111
82a973c043 changelog 2024-07-27 15:49:39 +03:00
AUTOMATIC1111
1d7e9eca09 Merge pull request #16275 from AUTOMATIC1111/fix-image-upscale-on-cpu
fix image upscale on cpu
2024-07-27 15:48:22 +03:00
2 changed files with 7 additions and 1 deletions

View File

@ -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:

View File

@ -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():