for some reason upscale using cpu will fail with RuntimeError: Inplace update to inference tensor outside InferenceMode switch from no_grad to inference_mode seems to have fixed it