techfreakworm commited on
Commit
c77559f
·
unverified ·
1 Parent(s): e0700ef

ZeroGPU: lazy-load models in-fork (module-level preload overran startup -> RUNTIME_ERROR)

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -23,10 +23,11 @@ from qvs.ui import theme
23
  REG = ModelRegistry()
24
  MGR = AdapterManager()
25
 
26
- # ZeroGPU: place all three checkpoints on CUDA at module level (emulation mode),
27
- # per the ZeroGPU guidance never lazy-move inside @spaces.GPU.
28
- if on_zerogpu():
29
- REG.preload_all()
 
30
 
31
  NONE_VOICE = "— none —"
32
  LANG_CHOICES = list(config.LANGUAGES.keys())
 
23
  REG = ModelRegistry()
24
  MGR = AdapterManager()
25
 
26
+ # NOTE: on ZeroGPU we deliberately do NOT preload at module level. A 14 GB
27
+ # download + all-3 load + tensor-packing at import overran the Space startup
28
+ # window (RUNTIME_ERROR before the server ever answered a health check). Instead
29
+ # the Gradio server starts instantly and each checkpoint loads lazily on the
30
+ # first @spaces.GPU request for its mode (one at a time — bounds container RAM).
31
 
32
  NONE_VOICE = "— none —"
33
  LANG_CHOICES = list(config.LANGUAGES.keys())