1inkusFace commited on
Commit
4cb7a22
·
verified ·
1 Parent(s): d4c0dd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -2,6 +2,17 @@ import subprocess
2
  subprocess.run(['sh', './spaces.sh'])
3
  import spaces
4
 
 
 
 
 
 
 
 
 
 
 
 
5
  import os
6
 
7
  os.environ['PYTORCH_NVML_BASED_CUDA_CHECK'] = '1'
@@ -44,16 +55,6 @@ from google.cloud import storage
44
 
45
  import torch
46
 
47
- @spaces.GPU(required=True)
48
- def install_dependencies():
49
- subprocess.run(['sh', './flashattn.sh'])
50
- # Install the UltraHDR library
51
- print("Installing pillow-ultrahdr...")
52
- subprocess.run(['pip', 'install', 'pillow-ultrahdr'])
53
- print("✅ pillow-ultrahdr installed.")
54
-
55
- # Install all dependencies
56
- # install_dependencies()
57
 
58
  torch.backends.cuda.matmul.allow_tf32 = False
59
  torch.backends.cuda.matmul.allow_bf16_reduced_precision_reduction = False
 
2
  subprocess.run(['sh', './spaces.sh'])
3
  import spaces
4
 
5
+ @spaces.GPU(required=True)
6
+ def install_dependencies():
7
+ subprocess.run(['sh', './flashattn.sh'])
8
+ # Install the UltraHDR library
9
+ print("Installing pillow-ultrahdr...")
10
+ subprocess.run(['pip', 'install', 'pillow-ultrahdr'])
11
+ print("✅ pillow-ultrahdr installed.")
12
+
13
+ # Install all dependencies
14
+ install_dependencies()
15
+
16
  import os
17
 
18
  os.environ['PYTORCH_NVML_BASED_CUDA_CHECK'] = '1'
 
55
 
56
  import torch
57
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  torch.backends.cuda.matmul.allow_tf32 = False
60
  torch.backends.cuda.matmul.allow_bf16_reduced_precision_reduction = False