gokaygokay commited on
Commit
6a9afc3
·
verified ·
1 Parent(s): e66b15d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,8 @@ dtype = torch.float16
22
  # Download Kolors model
23
  ckpt_dir = snapshot_download(repo_id="Kwai-Kolors/Kolors")
24
 
25
- subprocess.run('pip install flash-attn --no-build-isolation', shell=True)
 
26
 
27
  # Load Kolors models
28
  text_encoder = ChatGLMModel.from_pretrained(os.path.join(ckpt_dir, 'text_encoder'), torch_dtype=dtype).to(device)
 
22
  # Download Kolors model
23
  ckpt_dir = snapshot_download(repo_id="Kwai-Kolors/Kolors")
24
 
25
+ import subprocess
26
+ subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
27
 
28
  # Load Kolors models
29
  text_encoder = ChatGLMModel.from_pretrained(os.path.join(ckpt_dir, 'text_encoder'), torch_dtype=dtype).to(device)