Spaces:
Running on Zero
Running on Zero
boot: cpu-only warmup; decorated gpu_warmup pass
Browse files
app.py
CHANGED
|
@@ -75,10 +75,10 @@ def gpu_call(fn, *args):
|
|
| 75 |
return out
|
| 76 |
|
| 77 |
|
| 78 |
-
D.warmup() # CPU: weights built
|
| 79 |
if ZERO:
|
| 80 |
try:
|
| 81 |
-
gpu_call(D.warmup) #
|
| 82 |
except Exception as e:
|
| 83 |
print("ZeroGPU warm-up skipped:", type(e).__name__, e, flush=True)
|
| 84 |
MODEL_KEYS = list(D.MODEL_REPOS)
|
|
|
|
| 75 |
return out
|
| 76 |
|
| 77 |
|
| 78 |
+
D.warmup() # CPU at boot: weights built; NO cuda touch outside a decorated call
|
| 79 |
if ZERO:
|
| 80 |
try:
|
| 81 |
+
gpu_call(D.warmup, True) # decorated attach: real-GPU warm move while the UI is still closed
|
| 82 |
except Exception as e:
|
| 83 |
print("ZeroGPU warm-up skipped:", type(e).__name__, e, flush=True)
|
| 84 |
MODEL_KEYS = list(D.MODEL_REPOS)
|