fix bug in model_manager that prevented import of inpainting models

This commit is contained in:
Lincoln Stein 2023-06-02 22:39:26 -04:00
parent 91918e648b
commit 72d1e4e404
2 changed files with 5 additions and 3 deletions

View File

@ -865,7 +865,7 @@ class ModelManager(object):
model_config_file = self.globals.legacy_conf_path / "v1-inference.yaml" model_config_file = self.globals.legacy_conf_path / "v1-inference.yaml"
elif model_type == SDLegacyType.V1_INPAINT: elif model_type == SDLegacyType.V1_INPAINT:
self.logger.debug("SD-v1 inpainting model detected") self.logger.debug("SD-v1 inpainting model detected")
model_config_file = self.globals.legacy_conf_path / "v1-inpainting-inference.yaml", model_config_file = self.globals.legacy_conf_path / "v1-inpainting-inference.yaml"
elif model_type == SDLegacyType.V2_v: elif model_type == SDLegacyType.V2_v:
self.logger.debug("SD-v2-v model detected") self.logger.debug("SD-v2-v model detected")
model_config_file = self.globals.legacy_conf_path / "v2-inference-v.yaml" model_config_file = self.globals.legacy_conf_path / "v2-inference-v.yaml"

View File

@ -569,11 +569,13 @@ class addModelsForm(npyscreen.FormMultiPage):
self.subprocess_connection = None self.subprocess_connection = None
self.monitor.entry_widget.buffer(['** Action Complete **']) self.monitor.entry_widget.buffer(['** Action Complete **'])
self.display() self.display()
# this is crazy # rebuild the form, saving log messages
saved_messages = self.monitor.entry_widget.values
self.parentApp.main_form = self.parentApp.addForm( self.parentApp.main_form = self.parentApp.addForm(
"MAIN", addModelsForm, name="Install Stable Diffusion Models" "MAIN", addModelsForm, name="Install Stable Diffusion Models"
) )
self.parentApp.switchForm('NEW') self.parentApp.switchForm('MAIN')
self.parentApp.main_form.monitor.entry_widget.values = saved_messages
return return
self.monitor.entry_widget.buffer([data]) self.monitor.entry_widget.buffer([data])
self.display() self.display()