test and fix edge cases

This commit is contained in:
Lincoln Stein
2023-06-20 09:42:10 -04:00
parent ddb3f4b02b
commit 294b1e83e6
4 changed files with 70 additions and 61 deletions

View File

@ -131,6 +131,7 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage):
window_width=window_width,
exclude = self.starter_models
)
self.pipeline_models['autoload_pending'] = True
bottom_of_table = max(bottom_of_table,self.nextrely)
self.nextrely = top_of_table
@ -545,7 +546,9 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage):
selections.install_models.extend(downloads.value.split())
# load directory and whether to scan on startup
selections.scan_directory = self.pipeline_models['autoload_directory'].value
if self.parentApp.autoload_pending:
selections.scan_directory = self.pipeline_models['autoload_directory'].value
self.parentApp.autoload_pending = False
selections.autoscan_on_startup = self.pipeline_models['autoscan_on_startup'].value
class AddModelApplication(npyscreen.NPSAppManaged):
@ -553,6 +556,7 @@ class AddModelApplication(npyscreen.NPSAppManaged):
super().__init__()
self.program_opts = opt
self.user_cancelled = False
self.autoload_pending = True
self.install_selections = InstallSelections()
def onStart(self):

View File

@ -378,7 +378,7 @@ def select_stable_diffusion_config_file(
wrap:bool =True,
model_name:str='Unknown',
):
message = "Please select the correct base model for the V2 checkpoint named {model_name}. Press <CANCEL> to skip installation."
message = f"Please select the correct base model for the V2 checkpoint named '{model_name}'. Press <CANCEL> to skip installation."
title = "CONFIG FILE SELECTION"
options=[
"An SD v2.x base model (512 pixels; no 'parameterization:' line in its yaml file)",