convert add_model(), del_model(), list_models() etc to use bifurcated names

This commit is contained in:
Lincoln Stein
2023-05-13 14:44:44 -04:00
parent bc96727cbe
commit 72967bf118
6 changed files with 217 additions and 128 deletions

View File

@ -345,13 +345,14 @@ class Completer(object):
partial = text
matches = list()
for s in self.models:
name = self.models[s]["model_name"]
format = self.models[s]["format"]
if format == "vae":
continue
if ckpt_only and format != "ckpt":
continue
if s.startswith(partial):
matches.append(switch + s)
if name.startswith(partial):
matches.append(switch + name)
matches.sort()
return matches