From fe0cf2c1602d191d17bf28d748ca067e6afa62bd Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 8 Oct 2023 16:43:20 -0400 Subject: [PATCH 1/2] remove hardcoded subfolder name from model downloader --- invokeai/backend/install/model_install_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/backend/install/model_install_backend.py b/invokeai/backend/install/model_install_backend.py index 073bdf28d2..1481300c77 100644 --- a/invokeai/backend/install/model_install_backend.py +++ b/invokeai/backend/install/model_install_backend.py @@ -335,7 +335,7 @@ class ModelInstall(object): # list all the files in the repo files = [x.rfilename for x in hinfo.siblings] if subfolder: - files = [x for x in files if x.startswith("v2/")] + files = [x for x in files if x.startswith(f"{subfolder}/")] prefix = f"{subfolder}/" if subfolder else "" location = None From fa9ea93477ab4bb5cd082ac8b12d7b7f5e8be91c Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 8 Oct 2023 18:53:21 -0400 Subject: [PATCH 2/2] add a lists of t2i adapters to startup set --- invokeai/configs/INITIAL_MODELS.yaml | 16 ++++++++++++++++ invokeai/frontend/install/model_install.py | 19 ++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/invokeai/configs/INITIAL_MODELS.yaml b/invokeai/configs/INITIAL_MODELS.yaml index 9d27f37c4d..b6883ea915 100644 --- a/invokeai/configs/INITIAL_MODELS.yaml +++ b/invokeai/configs/INITIAL_MODELS.yaml @@ -96,6 +96,22 @@ sd-1/controlnet/tile: repo_id: lllyasviel/control_v11f1e_sd15_tile sd-1/controlnet/ip2p: repo_id: lllyasviel/control_v11e_sd15_ip2p +sd-1/t2i_adapter/canny-sd15: + repo_id: TencentARC/t2iadapter_canny_sd15v2 +sd-1/t2i_adapter/sketch-sd15: + repo_id: TencentARC/t2iadapter_sketch_sd15v2 +sd-1/t2i_adapter/depth-sd15: + repo_id: TencentARC/t2iadapter_depth_sd15v2 +sd-1/t2i_adapter/zoedepth-sd15: + repo_id: TencentARC/t2iadapter_zoedepth_sd15v1 +sdxl/t2i_adapter/canny-sdxl: + repo_id: TencentARC/t2i-adapter-canny-sdxl-1.0 +sdxl/t2i_adapter/zoedepth-sdxl: + repo_id: TencentARC/t2i-adapter-depth-zoe-sdxl-1.0 +sdxl/t2i_adapter/lineart-sdxl: + repo_id: TencentARC/t2i-adapter-lineart-sdxl-1.0 +sdxl/t2i_adapter/sketch-sdxl: + repo_id: TencentARC/t2i-adapter-sketch-sdxl-1.0 sd-1/embedding/EasyNegative: path: https://huggingface.co/embed/EasyNegative/resolve/main/EasyNegative.safetensors recommended: True diff --git a/invokeai/frontend/install/model_install.py b/invokeai/frontend/install/model_install.py index b8a44ae089..1fb3b61891 100644 --- a/invokeai/frontend/install/model_install.py +++ b/invokeai/frontend/install/model_install.py @@ -98,15 +98,16 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): self.tabs = self.add_widget_intelligent( SingleSelectColumns, values=[ - "STARTER MODELS", - "MAIN MODELS", + "STARTERS", + "MAINS", "CONTROLNETS", + "T2I-ADAPTERS", "IP-ADAPTERS", - "LORA/LYCORIS", - "TEXTUAL INVERSION", + "LORAS", + "TI EMBEDDINGS", ], value=[self.current_tab], - columns=6, + columns=7, max_height=2, relx=8, scroll_exit=True, @@ -131,6 +132,12 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): ) bottom_of_table = max(bottom_of_table, self.nextrely) + self.nextrely = top_of_table + self.t2i_models = self.add_model_widgets( + model_type=ModelType.T2IAdapter, + window_width=window_width, + ) + bottom_of_table = max(bottom_of_table, self.nextrely) self.nextrely = top_of_table self.ipadapter_models = self.add_model_widgets( model_type=ModelType.IPAdapter, @@ -351,6 +358,7 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): self.starter_pipelines, self.pipeline_models, self.controlnet_models, + self.t2i_models, self.ipadapter_models, self.lora_models, self.ti_models, @@ -541,6 +549,7 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): self.starter_pipelines, self.pipeline_models, self.controlnet_models, + self.t2i_models, self.ipadapter_models, self.lora_models, self.ti_models,