diff --git a/invokeai/backend/install/model_install_backend.py b/invokeai/backend/install/model_install_backend.py index 26d37a7cbf..5aed8cc034 100644 --- a/invokeai/backend/install/model_install_backend.py +++ b/invokeai/backend/install/model_install_backend.py @@ -154,7 +154,7 @@ class ModelInstall(object): models = set() for key, value in self.datasets.items(): name,base,model_type = ModelManager.parse_key(key) - if all_models or model_type==ModelType.Main: + if all_models or model_type in [ModelType.Main, ModelType.Vae]: models.add(key) return models diff --git a/invokeai/backend/model_management/model_probe.py b/invokeai/backend/model_management/model_probe.py index f768417506..ff5464ee99 100644 --- a/invokeai/backend/model_management/model_probe.py +++ b/invokeai/backend/model_management/model_probe.py @@ -416,7 +416,14 @@ class PipelineFolderProbe(FolderProbeBase): class VaeFolderProbe(FolderProbeBase): def get_base_type(self)->BaseModelType: - return BaseModelType.StableDiffusion1 + config_file = self.folder_path / 'config.json' + if not config_file.exists(): + raise InvalidModelException(f"Cannot determine base type for {self.folder_path}") + with open(config_file,'r') as file: + config = json.load(file) + return BaseModelType.StableDiffusionXL \ + if config.get('scaling_factor',0)==0.13025 and config.get('sample_size') in [512, 1024] \ + else BaseModelType.StableDiffusion1 class TextualInversionFolderProbe(FolderProbeBase): def get_format(self)->str: diff --git a/invokeai/configs/INITIAL_MODELS.yaml b/invokeai/configs/INITIAL_MODELS.yaml index e148ee9b55..71db9b55e7 100644 --- a/invokeai/configs/INITIAL_MODELS.yaml +++ b/invokeai/configs/INITIAL_MODELS.yaml @@ -16,14 +16,18 @@ sd-2/main/stable-diffusion-2-inpainting: description: Stable Diffusion version 2.0 inpainting model (5.21 GB) repo_id: stabilityai/stable-diffusion-2-inpainting recommended: False -sdxl/main/stable-diffusion-xl-base-0-9: - description: Stable Diffusion XL base model (12 GB; access token required) - repo_id: stabilityai/stable-diffusion-xl-base-0.9 - recommended: False -sdxl-refiner/main/stable-diffusion-xl-refiner-0-9: - description: Stable Diffusion XL refiner model (12 GB; access token required) - repo_id: stabilityai/stable-diffusion-xl-refiner-0.9 +sdxl/main/stable-diffusion-xl-base-1-0: + description: Stable Diffusion XL base model (12 GB) + repo_id: stabilityai/stable-diffusion-xl-base-1.0 recommended: False +sdxl-refiner/main/stable-diffusion-xl-refiner-1-0: + description: Stable Diffusion XL refiner model (12 GB) + repo_id: stabilityai/stable-diffusion-xl-refiner-1.0 + recommended: false +sdxl/vae/sdxl-1-0-vae-fix: + description: Fine tuned version of the SDXL-1.0 VAE + repo_id: madebyollin/sdxl-vae-fp16-fix + recommended: true sd-1/main/Analog-Diffusion: description: An SD-1.5 model trained on diverse analog photographs (2.13 GB) repo_id: wavymulder/Analog-Diffusion diff --git a/scripts/probe-model.py b/scripts/probe-model.py new file mode 100755 index 0000000000..46fd86984c --- /dev/null +++ b/scripts/probe-model.py @@ -0,0 +1,11 @@ +#!/bin/env python + +import sys +from pathlib import Path +from invokeai.backend.model_management.model_probe import ModelProbe + +info = ModelProbe().probe(Path(sys.argv[1])) +print(info) + + +