We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c19d044 commit 1d7e9ecCopy full SHA for 1d7e9ec
modules/upscaler_utils.py
@@ -41,7 +41,7 @@ def upscale_pil_patch(model, img: Image.Image) -> Image.Image:
41
"""
42
param = torch_utils.get_param(model)
43
44
- with torch.no_grad():
+ with torch.inference_mode():
45
tensor = pil_image_to_torch_bgr(img).unsqueeze(0) # add batch dimension
46
tensor = tensor.to(device=param.device, dtype=param.dtype)
47
with devices.without_autocast():
0 commit comments