Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,13 @@ from diffusers.models import AutoencoderKL
|
|
13 |
from PIL import Image
|
14 |
|
15 |
# Pre-Initialize
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
DEVICE = "auto"
|
17 |
if DEVICE == "auto":
|
18 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
13 |
from PIL import Image
|
14 |
|
15 |
# Pre-Initialize
|
16 |
+
|
17 |
+
subprocess.run(
|
18 |
+
"pip install flash-attn --no-build-isolation",
|
19 |
+
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
20 |
+
shell=True,
|
21 |
+
)
|
22 |
+
|
23 |
DEVICE = "auto"
|
24 |
if DEVICE == "auto":
|
25 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|