Clean up upscale model options
Browse files
app.py
CHANGED
|
@@ -577,9 +577,8 @@ def model_choices(models):
|
|
| 577 |
|
| 578 |
def upscale_model_choices(models):
|
| 579 |
return [
|
| 580 |
-
("Default", DEFAULT_UPSCALE_MODEL),
|
| 581 |
("None", ""),
|
| 582 |
-
*[(name, name) for name in models
|
| 583 |
]
|
| 584 |
|
| 585 |
|
|
@@ -1834,7 +1833,12 @@ def generate_matrix_cell(body):
|
|
| 1834 |
|
| 1835 |
|
| 1836 |
def model_options(kind, local):
|
| 1837 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1838 |
|
| 1839 |
|
| 1840 |
def generate_images(request, from_api=True):
|
|
|
|
| 577 |
|
| 578 |
def upscale_model_choices(models):
|
| 579 |
return [
|
|
|
|
| 580 |
("None", ""),
|
| 581 |
+
*[(name, name) for name in models],
|
| 582 |
]
|
| 583 |
|
| 584 |
|
|
|
|
| 1833 |
|
| 1834 |
|
| 1835 |
def model_options(kind, local):
|
| 1836 |
+
local = [local] if isinstance(local, str) else local
|
| 1837 |
+
names = set(local) | remote_models[kind].keys()
|
| 1838 |
+
return sorted(
|
| 1839 |
+
(name for name in names if Path(name).suffix.casefold() in MODEL_SUFFIXES),
|
| 1840 |
+
key=str.casefold,
|
| 1841 |
+
)
|
| 1842 |
|
| 1843 |
|
| 1844 |
def generate_images(request, from_api=True):
|