1
0
Fork 0

feat(api): collect labels from textual inversions (#144)

This commit is contained in:
Sean Sube 2023-03-05 08:00:25 -06:00
parent b198b3baff
commit 00fa9c5807
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 11 additions and 0 deletions

View File

@ -153,6 +153,17 @@ def load_extras(context: ServerContext):
)
labels[model_name] = model["label"]
if "inversions" in model:
for inversion in model["inversions"]:
if "label" in inversion:
inversion_name = inversion["name"]
logger.debug(
"collecting label for inversion %s from %s",
inversion_name,
model_name,
)
labels[f"inversion-{inversion_name}"] = inversion["label"]
except Exception as err:
logger.error("error loading extras file: %s", err)