Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- scripts/build_sage_attention.py +8 -10
- utils/app_utils.py +1 -1
scripts/build_sage_attention.py
CHANGED
|
@@ -8,20 +8,18 @@ REPO_DIR = "SageAttention"
|
|
| 8 |
|
| 9 |
def run_command(command, cwd=None, env=None):
|
| 10 |
print(f"🚀 Running command: {' '.join(command)}")
|
| 11 |
-
|
| 12 |
command,
|
| 13 |
-
stdout=subprocess.PIPE,
|
| 14 |
-
stderr=subprocess.STDOUT,
|
| 15 |
cwd=cwd,
|
| 16 |
env=env,
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 19 |
)
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
raise subprocess.CalledProcessError(process.returncode, command)
|
| 25 |
|
| 26 |
def patch_setup_py(setup_py_path):
|
| 27 |
print(f"--- [SageAttention Build] Applying patches to {setup_py_path} ---")
|
|
|
|
| 8 |
|
| 9 |
def run_command(command, cwd=None, env=None):
|
| 10 |
print(f"🚀 Running command: {' '.join(command)}")
|
| 11 |
+
result = subprocess.run(
|
| 12 |
command,
|
|
|
|
|
|
|
| 13 |
cwd=cwd,
|
| 14 |
env=env,
|
| 15 |
+
stdout=subprocess.PIPE,
|
| 16 |
+
stderr=subprocess.STDOUT,
|
| 17 |
+
text=True
|
| 18 |
)
|
| 19 |
+
|
| 20 |
+
if result.returncode != 0:
|
| 21 |
+
print(result.stdout)
|
| 22 |
+
raise subprocess.CalledProcessError(result.returncode, command)
|
|
|
|
| 23 |
|
| 24 |
def patch_setup_py(setup_py_path):
|
| 25 |
print(f"--- [SageAttention Build] Applying patches to {setup_py_path} ---")
|
utils/app_utils.py
CHANGED
|
@@ -583,7 +583,7 @@ def build_preprocessor_parameter_map():
|
|
| 583 |
|
| 584 |
def print_welcome_message():
|
| 585 |
author_name = "RioShiina"
|
| 586 |
-
project_url = "https://huggingface.co/
|
| 587 |
border = "=" * 72
|
| 588 |
|
| 589 |
message = (
|
|
|
|
| 583 |
|
| 584 |
def print_welcome_message():
|
| 585 |
author_name = "RioShiina"
|
| 586 |
+
project_url = "https://huggingface.co/RioShiina"
|
| 587 |
border = "=" * 72
|
| 588 |
|
| 589 |
message = (
|