show title of add models screen

This commit is contained in:
Lincoln Stein 2023-02-19 16:55:09 -05:00
parent e1a85d8184
commit ca10d0652f
2 changed files with 5 additions and 5 deletions

View File

@ -571,7 +571,7 @@ class EditOptApplication(npyscreen.NPSAppManaged):
self.model_select = self.addForm( self.model_select = self.addForm(
"MODELS", "MODELS",
addModelsForm, addModelsForm,
name="Add/Remove Models", name="Install Stable Diffusion Models",
multipage=True, multipage=True,
) )

View File

@ -33,7 +33,8 @@ from .model_install_backend import (Dataset_path, default_config_file,
) )
class addModelsForm(npyscreen.FormMultiPage): class addModelsForm(npyscreen.FormMultiPage):
def __init__(self, parentApp, name, multipage=False): def __init__(self, parentApp, name, multipage=False, *args, **keywords):
self.multipage=multipage
self.initial_models = OmegaConf.load(Dataset_path) self.initial_models = OmegaConf.load(Dataset_path)
try: try:
self.existing_models = OmegaConf.load(default_config_file()) self.existing_models = OmegaConf.load(default_config_file())
@ -42,9 +43,8 @@ class addModelsForm(npyscreen.FormMultiPage):
self.starter_model_list = [ self.starter_model_list = [
x for x in list(self.initial_models.keys()) if x not in self.existing_models x for x in list(self.initial_models.keys()) if x not in self.existing_models
] ]
self.multipage = multipage
self.installed_models=dict() self.installed_models=dict()
super().__init__(parentApp, name) super().__init__(parentApp=parentApp, name=name, *args, **keywords)
def create(self): def create(self):
window_height, window_width = curses.initscr().getmaxyx() window_height, window_width = curses.initscr().getmaxyx()
@ -307,7 +307,7 @@ class AddModelApplication(npyscreen.NPSAppManaged):
self.main_form = self.addForm( self.main_form = self.addForm(
"MAIN", "MAIN",
addModelsForm, addModelsForm,
name="Add/Remove Models" name="Install Stable Diffusion Models"
) )
# -------------------------------------------------------- # --------------------------------------------------------