- handler.py +5 -1
- requirements.txt +1 -1
handler.py
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
import string
|
| 2 |
import warnings
|
| 3 |
warnings.filterwarnings('ignore')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
from entklei import get_nude
|
| 5 |
from scipy.ndimage import binary_dilation
|
| 6 |
|
| 7 |
-
import subprocess, io, os, sys, time
|
| 8 |
|
| 9 |
is_production = True
|
| 10 |
install_stuff = True
|
|
|
|
| 1 |
import string
|
| 2 |
import warnings
|
| 3 |
warnings.filterwarnings('ignore')
|
| 4 |
+
import subprocess, io, os, sys, time
|
| 5 |
+
|
| 6 |
+
os.environ["XFORMERS_DISABLE_FLASH_ATTN"] = "1"
|
| 7 |
+
result = subprocess.run(['pip', 'install', 'git+https://github.com/facebookresearch/xformers.git@main#egg=xformers'], check=True)
|
| 8 |
+
|
| 9 |
from entklei import get_nude
|
| 10 |
from scipy.ndimage import binary_dilation
|
| 11 |
|
|
|
|
| 12 |
|
| 13 |
is_production = True
|
| 14 |
install_stuff = True
|
requirements.txt
CHANGED
|
@@ -46,7 +46,7 @@ tencentcloud-sdk-python
|
|
| 46 |
pydash
|
| 47 |
boto3
|
| 48 |
ninja # (Optional) Makes the build much faster
|
| 49 |
-
git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
|
| 50 |
git+https://github.com/huggingface/diffusers.git@main#egg=diffusers
|
| 51 |
git+https://github.com/huggingface/peft.git@main#egg=peft
|
| 52 |
git+https://github.com/huggingface/transformers.git@main#egg=transformers
|
|
|
|
| 46 |
pydash
|
| 47 |
boto3
|
| 48 |
ninja # (Optional) Makes the build much faster
|
| 49 |
+
# git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
|
| 50 |
git+https://github.com/huggingface/diffusers.git@main#egg=diffusers
|
| 51 |
git+https://github.com/huggingface/peft.git@main#egg=peft
|
| 52 |
git+https://github.com/huggingface/transformers.git@main#egg=transformers
|