Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -40,25 +40,23 @@ def apply_sage_attention_patch():
|
|
| 40 |
@spaces.GPU
|
| 41 |
def dummy_gpu_for_startup():
|
| 42 |
print("--- [GPU Startup] Dummy function for startup check initiated. ---")
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
# print(f"--- [GPU Startup] {patch_result} ---")
|
| 46 |
print("--- [GPU Startup] Startup check passed. ---")
|
| 47 |
return "Startup check passed."
|
| 48 |
|
| 49 |
def main():
|
| 50 |
from utils.app_utils import print_welcome_message
|
| 51 |
-
|
| 52 |
|
| 53 |
print_welcome_message()
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
# print(f"--- [Setup] ❌ SageAttention installation failed: {e}. Continuing with default attention. ---")
|
| 62 |
|
| 63 |
|
| 64 |
print("--- [Setup] Reloading site-packages to detect newly installed packages... ---")
|
|
|
|
| 40 |
@spaces.GPU
|
| 41 |
def dummy_gpu_for_startup():
|
| 42 |
print("--- [GPU Startup] Dummy function for startup check initiated. ---")
|
| 43 |
+
patch_result = apply_sage_attention_patch()
|
| 44 |
+
print(f"--- [GPU Startup] {patch_result} ---")
|
|
|
|
| 45 |
print("--- [GPU Startup] Startup check passed. ---")
|
| 46 |
return "Startup check passed."
|
| 47 |
|
| 48 |
def main():
|
| 49 |
from utils.app_utils import print_welcome_message
|
| 50 |
+
from scripts import build_sage_attention
|
| 51 |
|
| 52 |
print_welcome_message()
|
| 53 |
|
| 54 |
+
print("--- [Setup] Attempting to build and install SageAttention... ---")
|
| 55 |
+
try:
|
| 56 |
+
build_sage_attention.install_sage_attention()
|
| 57 |
+
print("--- [Setup] ✅ SageAttention installation process finished. ---")
|
| 58 |
+
except Exception as e:
|
| 59 |
+
print(f"--- [Setup] ❌ SageAttention installation failed: {e}. Continuing with default attention. ---")
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
print("--- [Setup] Reloading site-packages to detect newly installed packages... ---")
|