mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Add BaseModelType.Any to be used by CLIPVisionModel.
This commit is contained in:
parent
c34b359c36
commit
2c1100509f
@ -420,7 +420,7 @@ class DenoiseLatentsInvocation(BaseInvocation):
|
|||||||
# TODO(ryand): Get this model_name from the IPAdapterField.
|
# TODO(ryand): Get this model_name from the IPAdapterField.
|
||||||
model_name="ip_adapter_clip_vision",
|
model_name="ip_adapter_clip_vision",
|
||||||
model_type=ModelType.CLIPVision,
|
model_type=ModelType.CLIPVision,
|
||||||
base_model=ip_adapter.ip_adapter_model.base_model,
|
base_model=BaseModelType.Any,
|
||||||
context=context,
|
context=context,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ class IPAdapterFolderProbe(FolderProbeBase):
|
|||||||
|
|
||||||
class CLIPVisionFolderProbe(FolderProbeBase):
|
class CLIPVisionFolderProbe(FolderProbeBase):
|
||||||
def get_base_type(self) -> BaseModelType:
|
def get_base_type(self) -> BaseModelType:
|
||||||
raise NotImplementedError()
|
return BaseModelType.Any
|
||||||
|
|
||||||
|
|
||||||
############## register probe classes ######
|
############## register probe classes ######
|
||||||
|
@ -71,6 +71,17 @@ MODEL_CLASSES = {
|
|||||||
ModelType.IPAdapter: IPAdapterModel,
|
ModelType.IPAdapter: IPAdapterModel,
|
||||||
ModelType.CLIPVision: CLIPVisionModel,
|
ModelType.CLIPVision: CLIPVisionModel,
|
||||||
},
|
},
|
||||||
|
BaseModelType.Any: {
|
||||||
|
ModelType.CLIPVision: CLIPVisionModel,
|
||||||
|
# The following model types are not expected to be used with BaseModelType.Any.
|
||||||
|
ModelType.ONNX: ONNXStableDiffusion2Model,
|
||||||
|
ModelType.Main: StableDiffusion2Model,
|
||||||
|
ModelType.Vae: VaeModel,
|
||||||
|
ModelType.Lora: LoRAModel,
|
||||||
|
ModelType.ControlNet: ControlNetModel,
|
||||||
|
ModelType.TextualInversion: TextualInversionModel,
|
||||||
|
ModelType.IPAdapter: IPAdapterModel,
|
||||||
|
},
|
||||||
# BaseModelType.Kandinsky2_1: {
|
# BaseModelType.Kandinsky2_1: {
|
||||||
# ModelType.Main: Kandinsky2_1Model,
|
# ModelType.Main: Kandinsky2_1Model,
|
||||||
# ModelType.MoVQ: MoVQModel,
|
# ModelType.MoVQ: MoVQModel,
|
||||||
|
@ -47,6 +47,7 @@ class ModelNotFoundException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class BaseModelType(str, Enum):
|
class BaseModelType(str, Enum):
|
||||||
|
Any = "any" # For models that are not associated with any particular base model.
|
||||||
StableDiffusion1 = "sd-1"
|
StableDiffusion1 = "sd-1"
|
||||||
StableDiffusion2 = "sd-2"
|
StableDiffusion2 = "sd-2"
|
||||||
StableDiffusionXL = "sdxl"
|
StableDiffusionXL = "sdxl"
|
||||||
|
Loading…
Reference in New Issue
Block a user