RioShiina commited on
Commit
f7034bf
·
verified ·
1 Parent(s): 48f68fc

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +9 -11
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
- # SageAttention patch temporarily disabled for faster iteration.
44
- # patch_result = apply_sage_attention_patch()
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
- # from scripts import build_sage_attention # SageAttention disabled
52
 
53
  print_welcome_message()
54
 
55
- # SageAttention build is temporarily disabled for faster iteration.
56
- # print("--- [Setup] Attempting to build and install SageAttention... ---")
57
- # try:
58
- # build_sage_attention.install_sage_attention()
59
- # print("--- [Setup] SageAttention installation process finished. ---")
60
- # except Exception as e:
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... ---")