Spaces:
Sleeping
Sleeping
Commit
·
c7e8984
1
Parent(s):
ace6052
Make metrics import optional to drop pytorch_fid requirement for UI
Browse files- runners/base_runner.py +5 -1
runners/base_runner.py
CHANGED
|
@@ -10,7 +10,11 @@ from pathlib import Path
|
|
| 10 |
from editings.latent_editor import LatentEditor
|
| 11 |
|
| 12 |
from models.methods import methods_registry
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
from utils.model_utils import get_stylespace_from_w
|
| 15 |
|
| 16 |
|
|
|
|
| 10 |
from editings.latent_editor import LatentEditor
|
| 11 |
|
| 12 |
from models.methods import methods_registry
|
| 13 |
+
# Metrics are not needed for inference UI; make optional to avoid import errors
|
| 14 |
+
try:
|
| 15 |
+
from metrics.metrics import metrics_registry
|
| 16 |
+
except Exception:
|
| 17 |
+
metrics_registry = {}
|
| 18 |
from utils.model_utils import get_stylespace_from_w
|
| 19 |
|
| 20 |
|