ZeroGPU: lazy-load models in-fork (module-level preload overran startup -> RUNTIME_ERROR)
Browse files
app.py
CHANGED
|
@@ -23,10 +23,11 @@ from qvs.ui import theme
|
|
| 23 |
REG = ModelRegistry()
|
| 24 |
MGR = AdapterManager()
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
-
|
|
|
|
| 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())
|