From 4c6a18684af7ab4a2499224f003b692219a03566 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:11:25 +1100 Subject: [PATCH 1/3] feat(mm): revised list of starter models - Enriched dependencies to not just be a string - allows reuse of a dependency as a starter model _and_ dependency of another model. For example, all the SDXL models have the fp16 VAE as a dependency, but you can also download it on its own. - Looked at popular models on the major model sites to select the list. No SD2 models. All hosted on HF. --- invokeai/app/api/routers/model_manager.py | 6 +- .../backend/model_manager/starter_models.py | 186 +++++++++--------- 2 files changed, 99 insertions(+), 93 deletions(-) diff --git a/invokeai/app/api/routers/model_manager.py b/invokeai/app/api/routers/model_manager.py index 17a37ffc949..67ef7330e83 100644 --- a/invokeai/app/api/routers/model_manager.py +++ b/invokeai/app/api/routers/model_manager.py @@ -38,7 +38,7 @@ from invokeai.backend.model_manager.metadata.fetch.huggingface import HuggingFaceMetadataFetch from invokeai.backend.model_manager.metadata.metadata_base import ModelMetadataWithFiles, UnknownMetadataException from invokeai.backend.model_manager.search import ModelSearch -from invokeai.backend.model_manager.starter_models import STARTER_MODELS, StarterModel +from invokeai.backend.model_manager.starter_models import STARTER_MODELS, StarterModel, StarterModelWithoutDependencies from ..dependencies import ApiDependencies @@ -800,9 +800,9 @@ async def get_starter_models() -> list[StarterModel]: if model.source in installed_model_sources: model.is_installed = True # Remove already-installed dependencies - missing_deps: list[str] = [] + missing_deps: list[StarterModelWithoutDependencies] = [] for dep in model.dependencies or []: - if dep not in installed_model_sources: + if dep.source not in installed_model_sources: missing_deps.append(dep) model.dependencies = missing_deps diff --git a/invokeai/backend/model_manager/starter_models.py b/invokeai/backend/model_manager/starter_models.py index 325216d7a8b..f3ed657a9fb 100644 --- a/invokeai/backend/model_manager/starter_models.py +++ b/invokeai/backend/model_manager/starter_models.py @@ -1,147 +1,162 @@ -from dataclasses import dataclass from typing import Optional +from pydantic import BaseModel + from invokeai.backend.model_manager.config import BaseModelType, ModelType -@dataclass -class StarterModel: +class StarterModelWithoutDependencies(BaseModel): description: str source: str name: str base: BaseModelType type: ModelType - # Optional list of model source dependencies that need to be installed before this model can be used - dependencies: Optional[list[str]] = None is_installed: bool = False +class StarterModel(StarterModelWithoutDependencies): + # Optional list of model source dependencies that need to be installed before this model can be used + dependencies: Optional[list[StarterModelWithoutDependencies]] = None + + +sdxl_fp16_vae_fix = StarterModel( + name="sdxl-vae-fp16-fix", + base=BaseModelType.StableDiffusionXL, + source="madebyollin/sdxl-vae-fp16-fix", + description="SDXL VAE that works with FP16.", + type=ModelType.VAE, +) + +ip_adapter_sd_image_encoder = StarterModel( + name="IP Adapter SD1.5 Image Encoder", + base=BaseModelType.StableDiffusion1, + source="InvokeAI/ip_adapter_sd_image_encoder", + description="IP Adapter SD Image Encoder", + type=ModelType.CLIPVision, +) + +ip_adapter_sdxl_image_encoder = StarterModel( + name="IP Adapter SDXL Image Encoder", + base=BaseModelType.StableDiffusionXL, + source="InvokeAI/ip_adapter_sdxl_image_encoder", + description="IP Adapter SDXL Image Encoder", + type=ModelType.CLIPVision, +) + +cyberrealistic_negative = StarterModel( + name="CyberRealistic Negative v3", + base=BaseModelType.StableDiffusion1, + source="https://huggingface.co/cyberdelia/CyberRealistic_Negative/resolve/main/CyberRealistic_Negative_v3.pt", + description="Negative embedding specifically for use with CyberRealistic.", + type=ModelType.TextualInversion, +) + # List of starter models, displayed on the frontend. # The order/sort of this list is not changed by the frontend - set it how you want it here. STARTER_MODELS: list[StarterModel] = [ # region: Main StarterModel( - name="SD 1.5 (base)", - base=BaseModelType.StableDiffusion1, - source="runwayml/stable-diffusion-v1-5", - description="Stable Diffusion version 1.5 diffusers model (4.27 GB)", - type=ModelType.Main, - ), - StarterModel( - name="SD 1.5 (inpainting)", - base=BaseModelType.StableDiffusion1, - source="runwayml/stable-diffusion-inpainting", - description="RunwayML SD 1.5 model optimized for inpainting, diffusers version (4.27 GB)", - type=ModelType.Main, - ), - StarterModel( - name="Analog Diffusion", - base=BaseModelType.StableDiffusion1, - source="wavymulder/Analog-Diffusion", - description="An SD-1.5 model trained on diverse analog photographs (2.13 GB)", - type=ModelType.Main, - ), - StarterModel( - name="Deliberate v5", - base=BaseModelType.StableDiffusion1, - source="https://huggingface.co/XpucT/Deliberate/resolve/main/Deliberate_v5.safetensors", - description="Versatile model that produces detailed images up to 768px (4.27 GB)", - type=ModelType.Main, - ), - StarterModel( - name="Dungeons and Diffusion", + name="CyberRealistic v4.1", base=BaseModelType.StableDiffusion1, - source="0xJustin/Dungeons-and-Diffusion", - description="Dungeons & Dragons characters (2.13 GB)", + source="https://huggingface.co/cyberdelia/CyberRealistic/resolve/main/CyberRealistic_V4.1_FP16.safetensors", + description="Photorealistic model. See other variants in HF repo 'cyberdelia/CyberRealistic'.", type=ModelType.Main, + dependencies=[cyberrealistic_negative], ), StarterModel( - name="dreamlike photoreal v2", + name="ReV Animated", base=BaseModelType.StableDiffusion1, - source="dreamlike-art/dreamlike-photoreal-2.0", - description="A photorealistic model trained on 768 pixel images based on SD 1.5 (2.13 GB)", + source="stablediffusionapi/rev-animated", + description="Fantasy and anime style images.", type=ModelType.Main, ), StarterModel( - name="Inkpunk Diffusion", + name="Dreamshaper 8", base=BaseModelType.StableDiffusion1, - source="Envvi/Inkpunk-Diffusion", - description='Stylized illustrations inspired by Gorillaz, FLCL and Shinkawa; prompt with "nvinkpunk" (4.27 GB)', + source="Lykon/dreamshaper-8", + description="Popular versatile model.", type=ModelType.Main, ), StarterModel( - name="OpenJourney", + name="Dreamshaper 8 (inpainting)", base=BaseModelType.StableDiffusion1, - source="prompthero/openjourney", - description='An SD 1.5 model fine tuned on Midjourney; prompt with "mdjrny-v4 style" (2.13 GB)', + source="Lykon/dreamshaper-8-inpainting", + description="Inpainting version of Dreamshaper 8.", type=ModelType.Main, ), StarterModel( - name="seek.art MEGA", + name="Deliberate v5", base=BaseModelType.StableDiffusion1, - source="coreco/seek.art_MEGA", - description='A general use SD-1.5 "anything" model that supports multiple styles (2.1 GB)', + source="https://huggingface.co/XpucT/Deliberate/resolve/main/Deliberate_v5.safetensors", + description="Popular versatile model", type=ModelType.Main, ), StarterModel( - name="TrinArt v2", + name="Deliberate v5 (inpainting)", base=BaseModelType.StableDiffusion1, - source="naclbit/trinart_stable_diffusion_v2", - description="An SD-1.5 model finetuned with ~40K assorted high resolution manga/anime-style images (2.13 GB)", + source="https://huggingface.co/XpucT/Deliberate/resolve/main/Deliberate_v5-inpainting.safetensors", + description="Inpainting version of Deliberate v5.", type=ModelType.Main, ), StarterModel( - name="SD 2.1 (base)", - base=BaseModelType.StableDiffusion2, - source="stabilityai/stable-diffusion-2-1", - description="Stable Diffusion version 2.1 diffusers model, trained on 768 pixel images (5.21 GB)", + name="Juggernaut XL v9", + base=BaseModelType.StableDiffusionXL, + source="RunDiffusion/Juggernaut-XL-v9", + description="Photograph-focused model.", type=ModelType.Main, + dependencies=[sdxl_fp16_vae_fix], ), StarterModel( - name="SD 2.0 (inpainting)", - base=BaseModelType.StableDiffusion2, - source="stabilityai/stable-diffusion-2-inpainting", - description="Stable Diffusion version 2.0 inpainting model (5.21 GB)", + name="Proteus", + base=BaseModelType.StableDiffusionXL, + source="dataautogpt3/Proteus-RunDiffusion", + description="Diverse model with a unique prompting system. Use CLIP Skip 2.", type=ModelType.Main, + dependencies=[sdxl_fp16_vae_fix], ), StarterModel( - name="SDXL (base)", + name="Dreamshaper XL v2 Turbo", base=BaseModelType.StableDiffusionXL, - source="stabilityai/stable-diffusion-xl-base-1.0", - description="Stable Diffusion XL base model (12 GB)", + source="Lykon/dreamshaper-xl-v2-turbo", + description="For turbo, use CFG Scale 2, 4-8 steps, DPM++ SDE Karras. For non-turbo, use CFG Scale 6, 20-40 steps, DPM++ 2M SDE Karras.", type=ModelType.Main, + dependencies=[sdxl_fp16_vae_fix], ), StarterModel( name="SDXL Refiner", base=BaseModelType.StableDiffusionXLRefiner, source="stabilityai/stable-diffusion-xl-refiner-1.0", - description="Stable Diffusion XL refiner model (12 GB)", + description="The OG Stable Diffusion XL refiner model.", type=ModelType.Main, + dependencies=[sdxl_fp16_vae_fix], ), # endregion # region VAE + sdxl_fp16_vae_fix, + # endregion + # region LoRA StarterModel( - name="sdxl-vae-fp16-fix", + name="Alien Style", base=BaseModelType.StableDiffusionXL, - source="madebyollin/sdxl-vae-fp16-fix", - description="Version of the SDXL-1.0 VAE that works in half precision mode", - type=ModelType.VAE, + source="https://huggingface.co/RalFinger/alien-style-lora-sdxl/resolve/main/alienzkin-sdxl.safetensors", + description="Futuristic, intricate alien styles. Trigger with 'alienzkin'.", + type=ModelType.LoRA, ), - # endregion - # region LoRA StarterModel( - name="FlatColor", - base=BaseModelType.StableDiffusion1, - source="https://civitai.com/models/6433/loraflatcolor", - description="A LoRA that generates scenery using solid blocks of color", + name="Noodles Style", + base=BaseModelType.StableDiffusionXL, + source="https://huggingface.co/RalFinger/noodles-lora-sdxl/resolve/main/noodlez-sdxl.safetensors", + description="Never-ending, no-holds-barred, noodle nightmare. Trigger with 'noodlez'.", type=ModelType.LoRA, ), + # endregion + # region TI StarterModel( - name="Ink scenery", + name="EasyNegative", base=BaseModelType.StableDiffusion1, - source="https://civitai.com/api/download/models/83390", - description="Generate india ink-like landscapes", - type=ModelType.LoRA, + source="https://huggingface.co/embed/EasyNegative/resolve/main/EasyNegative.safetensors", + description="A textual inversion to use in the negative prompt to reduce bad anatomy", + type=ModelType.TextualInversion, ), # endregion # region IP Adapter @@ -151,7 +166,7 @@ class StarterModel: source="InvokeAI/ip_adapter_sd15", description="IP-Adapter for SD 1.5 models", type=ModelType.IPAdapter, - dependencies=["InvokeAI/ip_adapter_sd_image_encoder"], + dependencies=[ip_adapter_sd_image_encoder], ), StarterModel( name="IP Adapter Plus", @@ -159,7 +174,7 @@ class StarterModel: source="InvokeAI/ip_adapter_plus_sd15", description="Refined IP-Adapter for SD 1.5 models", type=ModelType.IPAdapter, - dependencies=["InvokeAI/ip_adapter_sd_image_encoder"], + dependencies=[ip_adapter_sd_image_encoder], ), StarterModel( name="IP Adapter Plus Face", @@ -167,7 +182,7 @@ class StarterModel: source="InvokeAI/ip_adapter_plus_face_sd15", description="Refined IP-Adapter for SD 1.5 models, adapted for faces", type=ModelType.IPAdapter, - dependencies=["InvokeAI/ip_adapter_sd_image_encoder"], + dependencies=[ip_adapter_sd_image_encoder], ), StarterModel( name="IP Adapter SDXL", @@ -175,7 +190,7 @@ class StarterModel: source="InvokeAI/ip_adapter_sdxl", description="IP-Adapter for SDXL models", type=ModelType.IPAdapter, - dependencies=["InvokeAI/ip_adapter_sdxl_image_encoder"], + dependencies=[ip_adapter_sdxl_image_encoder], ), # endregion # region ControlNet @@ -378,15 +393,6 @@ class StarterModel: type=ModelType.T2IAdapter, ), # endregion - # region TI - StarterModel( - name="EasyNegative", - base=BaseModelType.StableDiffusion1, - source="https://huggingface.co/embed/EasyNegative/resolve/main/EasyNegative.safetensors", - description="A textual inversion to use in the negative prompt to reduce bad anatomy", - type=ModelType.TextualInversion, - ), - # endregion ] assert len(STARTER_MODELS) == len({m.source for m in STARTER_MODELS}), "Duplicate starter models" From 99c65d590f0b31b4bd07b86cfc9a2e571a0fb196 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:11:36 +1100 Subject: [PATCH 2/3] chore(ui): typegen --- .../frontend/web/src/services/api/schema.ts | 71 ++++++++++++++++++- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index 0649dfd1695..323d682c978 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -4136,7 +4136,7 @@ export type components = { * @description The nodes in this graph */ nodes: { - [key: string]: components["schemas"]["RoundInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["ImagePasteInvocation"]; + [key: string]: components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["LineartImageProcessorInvocation"]; }; /** * Edges @@ -4173,7 +4173,7 @@ export type components = { * @description The results of node executions */ results: { - [key: string]: components["schemas"]["IntegerOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["String2Output"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["IterateInvocationOutput"]; + [key: string]: components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["String2Output"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["ImageCollectionOutput"]; }; /** * Errors @@ -7010,6 +7010,55 @@ export type components = { */ type: "tomask"; }; + /** + * Mask from ID + * @description Generate a mask for a particular color in an ID Map + */ + MaskFromIDInvocation: { + /** @description The board to save the image to */ + board?: components["schemas"]["BoardField"] | null; + /** @description Optional metadata to be saved with the image */ + metadata?: components["schemas"]["MetadataField"] | null; + /** + * Id + * @description The id of this instance of an invocation. Must be unique among all instances of invocations. + */ + id: string; + /** + * Is Intermediate + * @description Whether or not this is an intermediate invocation. + * @default false + */ + is_intermediate?: boolean; + /** + * Use Cache + * @description Whether or not to use the cache + * @default true + */ + use_cache?: boolean; + /** @description The image to create the mask from */ + image?: components["schemas"]["ImageField"]; + /** @description ID color to mask */ + color?: components["schemas"]["ColorField"]; + /** + * Threshold + * @description Threshold for color detection + * @default 100 + */ + threshold?: number; + /** + * Invert + * @description Whether or not to invert the mask + * @default false + */ + invert?: boolean; + /** + * type + * @default mask_from_id + * @constant + */ + type: "mask_from_id"; + }; /** * Mediapipe Face Processor * @description Applies mediapipe face processing to image @@ -9280,8 +9329,24 @@ export type components = { name: string; base: components["schemas"]["BaseModelType"]; type: components["schemas"]["ModelType"]; + /** + * Is Installed + * @default false + */ + is_installed?: boolean; /** Dependencies */ - dependencies?: string[] | null; + dependencies?: components["schemas"]["StarterModelWithoutDependencies"][] | null; + }; + /** StarterModelWithoutDependencies */ + StarterModelWithoutDependencies: { + /** Description */ + description: string; + /** Source */ + source: string; + /** Name */ + name: string; + base: components["schemas"]["BaseModelType"]; + type: components["schemas"]["ModelType"]; /** * Is Installed * @default false From aae2e22fc92a1328a729a568902191d68d800e17 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:11:51 +1100 Subject: [PATCH 3/3] fix(ui): model dependency parsing --- .../AddModelPanel/StarterModels/StartModelsResultItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/StarterModels/StartModelsResultItem.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/StarterModels/StartModelsResultItem.tsx index 00bcbafc0b0..a32fad810f6 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/StarterModels/StartModelsResultItem.tsx +++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/StarterModels/StartModelsResultItem.tsx @@ -18,7 +18,7 @@ export const StarterModelsResultItem = ({ result }: Props) => { const allSources = useMemo(() => { const _allSources = [result.source]; if (result.dependencies) { - _allSources.push(...result.dependencies); + _allSources.push(...result.dependencies.map((d) => d.source)); } return _allSources; }, [result]);