From 0b6ef7eb7d5eaed2604740a72929a203a7d8caf9 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Wed, 19 Jul 2023 09:05:24 -0400 Subject: [PATCH] make the convert VAE available to model manager for use in UI --- invokeai/backend/model_management/model_manager.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index c6dad3295f..7d99193579 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -938,20 +938,29 @@ class ModelManager(object): def models_found(self): return self.new_models_found + config = self.app_config + + # LS: hacky + # Patch in the SD VAE from core so that it is available for use by the UI + try: + self.heuristic_import({config.root_path / 'models/core/convert/sd-vae-ft-mse'}) + except: + pass installer = ModelInstall(config = self.app_config, model_manager = self, prediction_type_helper = ask_user_for_prediction_type, ) - config = self.app_config known_paths = {config.root_path / x['path'] for x in self.list_models()} directories = {config.root_path / x for x in [config.autoimport_dir, config.lora_dir, config.embedding_dir, - config.controlnet_dir] + config.controlnet_dir, + ] } scanner = ScanAndImport(directories, self.logger, ignore=known_paths, installer=installer) scanner.search() + return scanner.models_found() def heuristic_import(self,