Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
|
|
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)
|