PommesPeter commited on
Commit
14c1dbf
1 Parent(s): 718eae1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,7 +1,7 @@
1
- import os
2
- os.system("mkdir -p ./checkpoints")
3
- os.system("huggingface-cli download --resume-download Alpha-VLLM/Lumina-Next-T2I --local-dir ./checkpoints --local-dir-use-symlinks False")
4
- os.system("pip install flash-attn --no-build-isolation")
5
 
6
  import argparse
7
  import builtins
@@ -11,7 +11,7 @@ import random
11
  import socket
12
  import spaces
13
  import traceback
14
-
15
  import fairscale.nn.model_parallel.initialize as fs_init
16
  import gradio as gr
17
  import numpy as np
 
1
+ import subprocess
2
+ subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
3
+ subprocess.run("mkdir -p ./checkpoints", shell=True)
4
+ subprocess.run("huggingface-cli download --resume-download Alpha-VLLM/Lumina-Next-T2I --local-dir ./checkpoints --local-dir-use-symlinks False", shell=True)
5
 
6
  import argparse
7
  import builtins
 
11
  import socket
12
  import spaces
13
  import traceback
14
+ import os
15
  import fairscale.nn.model_parallel.initialize as fs_init
16
  import gradio as gr
17
  import numpy as np