LittleFrog commited on
Commit
2ca6203
·
1 Parent(s): 24e6910

Avoid GPU allocation during application startup

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -90,8 +90,8 @@ description = \
90
  - You can optionally generate a high-resolution sample if the input image is of high resolution. We split the original image into `Vertical Splits` by `Horizontal Splits` patches with some `Overlaps` in between. Due to computation constraints for the online demo, we recommend `Vertical Splits` x `Horizontal Splits` to be no more than 6 and to set 2 for `Overlaps`. The denoising steps should at least be set to 80 for high resolution samples.
91
 
92
  """
93
- @spaces.GPU()
94
  def get_devices():
 
95
  device = "cuda" if torch.cuda.is_available() else "cpu"
96
  return device
97
 
 
90
  - You can optionally generate a high-resolution sample if the input image is of high resolution. We split the original image into `Vertical Splits` by `Horizontal Splits` patches with some `Overlaps` in between. Due to computation constraints for the online demo, we recommend `Vertical Splits` x `Horizontal Splits` to be no more than 6 and to set 2 for `Overlaps`. The denoising steps should at least be set to 80 for high resolution samples.
91
 
92
  """
 
93
  def get_devices():
94
+ # ZeroGPU emulates CUDA during startup; only generation requests a real GPU.
95
  device = "cuda" if torch.cuda.is_available() else "cpu"
96
  return device
97