turnoff torchscript fuser feature

https://github.com/Sanster/lama-cleaner/issues/1
This commit is contained in:
Sanster 2022-02-18 13:29:10 +08:00
parent 799ab7607b
commit f09d40cbef
2 changed files with 9 additions and 2 deletions

View File

@ -53,8 +53,6 @@ docker run --gpus all -p 8080:8080 -e CACHE_DIR=/app/models -v $(pwd)/models:/ap
Then open [http://localhost:8080](http://localhost:8080)
https://www.buymeacoffee.com/Sanster
## Like My Work?
<a href="https://www.buymeacoffee.com/Sanster">
<img height="50em" src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Sanster" />

View File

@ -11,6 +11,15 @@ from typing import Union
import cv2
import numpy as np
import torch
try:
torch._C._jit_override_can_fuse_on_cpu(False)
torch._C._jit_override_can_fuse_on_gpu(False)
torch._C._jit_set_texpr_fuser_enabled(False)
torch._C._jit_set_nvfuser_enabled(False)
except:
pass
from flask import Flask, request, send_file
from flask_cors import CORS