def METHOD_NAME(
    img: np.ndarray,
    model: PyTorchSRModel,
    tile_size: TileSize,
    options: PyTorchSettings,
):
    with torch.no_grad():
        # Borrowed from iNNfer
        logger.debug("Upscaling image")
        # TODO: use bfloat16 if RTX
        use_fp16 = options.use_fp16 and model.supports_fp16
        device = options.device
        def estimate():
            if "cuda" in device.type:
                mem_info: Tuple[int, int] = torch.cuda.mem_get_info(device)  # type: ignore
                free, _total = mem_info
                element_size = 2 if use_fp16 else 4
                model_bytes = sum(p.numel() * element_size for p in model.parameters())
                budget = int(free * 0.8)
                return MaxTileSize(
                    estimate_tile_size(
                        budget,
                        model_bytes,
                        img,
                        element_size,
                    )
                )
            return MaxTileSize()
        # Disable tiling for SCUNet
        upscale_tile_size = tile_size
        if model.model_arch == "SCUNet":
            upscale_tile_size = NO_TILING
        img_out = pytorch_auto_split(
            img,
            model=model,
            device=device,
            use_fp16=use_fp16,
            tiler=parse_tile_size_input(upscale_tile_size, estimate),
        )
        logger.debug("Done upscaling")
        return img_out