Skip to content

Commit da94786

Browse files
fix(nodes): ensure SD2 models are pickable in loader/cnet nodes
1 parent 84a2cc6 commit da94786

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

invokeai/app/invocations/controlnet.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,16 @@ class ControlOutput(BaseInvocationOutput):
6363
control: ControlField = OutputField(description=FieldDescriptions.control)
6464

6565

66-
@invocation("controlnet", title="ControlNet - SD1.5, SDXL", tags=["controlnet"], category="controlnet", version="1.1.3")
66+
@invocation(
67+
"controlnet", title="ControlNet - SD1.5, SD2, SDXL", tags=["controlnet"], category="controlnet", version="1.1.3"
68+
)
6769
class ControlNetInvocation(BaseInvocation):
6870
"""Collects ControlNet info to pass to other nodes"""
6971

7072
image: ImageField = InputField(description="The control image")
7173
control_model: ModelIdentifierField = InputField(
7274
description=FieldDescriptions.controlnet_model,
73-
ui_model_base=[BaseModelType.StableDiffusion1, BaseModelType.StableDiffusionXL],
75+
ui_model_base=[BaseModelType.StableDiffusion1, BaseModelType.StableDiffusion2, BaseModelType.StableDiffusionXL],
7476
ui_model_type=ModelType.ControlNet,
7577
)
7678
control_weight: Union[float, List[float]] = InputField(

invokeai/app/invocations/model.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def invoke(self, context: InvocationContext) -> ModelIdentifierOutput:
145145

146146
@invocation(
147147
"main_model_loader",
148-
title="Main Model - SD1.5",
148+
title="Main Model - SD1.5, SD2",
149149
tags=["model"],
150150
category="model",
151151
version="1.0.4",
@@ -155,7 +155,7 @@ class MainModelLoaderInvocation(BaseInvocation):
155155

156156
model: ModelIdentifierField = InputField(
157157
description=FieldDescriptions.main_model,
158-
ui_model_base=BaseModelType.StableDiffusion1,
158+
ui_model_base=[BaseModelType.StableDiffusion1, BaseModelType.StableDiffusion2],
159159
ui_model_type=ModelType.Main,
160160
)
161161
# TODO: precision?
@@ -485,7 +485,11 @@ def invoke(self, context: InvocationContext) -> SDXLLoRALoaderOutput:
485485

486486

487487
@invocation(
488-
"vae_loader", title="VAE Model - SD1.5, SDXL, SD3, FLUX", tags=["vae", "model"], category="model", version="1.0.4"
488+
"vae_loader",
489+
title="VAE Model - SD1.5, SD2, SDXL, SD3, FLUX",
490+
tags=["vae", "model"],
491+
category="model",
492+
version="1.0.4",
489493
)
490494
class VAELoaderInvocation(BaseInvocation):
491495
"""Loads a VAE model, outputting a VaeLoaderOutput"""
@@ -495,6 +499,7 @@ class VAELoaderInvocation(BaseInvocation):
495499
title="VAE",
496500
ui_model_base=[
497501
BaseModelType.StableDiffusion1,
502+
BaseModelType.StableDiffusion2,
498503
BaseModelType.StableDiffusionXL,
499504
BaseModelType.StableDiffusion3,
500505
BaseModelType.Flux,

0 commit comments

Comments
 (0)