We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 834297b + 8e0881d commit 850e149Copy full SHA for 850e149
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