Staticaliza commited on
Commit
858c6b5
·
verified ·
1 Parent(s): ebc69eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
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"