def METHOD_NAME():
    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()