Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

Add input connectors to the FLUX model loader (#8785)

Jonathanfd7a3aebd245
diff --git a/invokeai/app/invocations/flux_model_loader.py b/invokeai/app/invocations/flux_model_loader.py
index eaac82bafc..c175ae7fed 100644
--- a/invokeai/app/invocations/flux_model_loader.py
+++ b/invokeai/app/invocations/flux_model_loader.py
@@ -6,7 +6,7 @@ from invokeai.app.invocations.baseinvocation import (
invocation,
invocation_output,
)
-from invokeai.app.invocations.fields import FieldDescriptions, Input, InputField, OutputField
+from invokeai.app.invocations.fields import FieldDescriptions, InputField, OutputField
from invokeai.app.invocations.model import CLIPField, ModelIdentifierField, T5EncoderField, TransformerField, VAEField
from invokeai.app.services.shared.invocation_context import InvocationContext
from invokeai.app.util.t5_model_identifier import (
@@ -37,28 +37,25 @@ class FluxModelLoaderOutput(BaseInvocationOutput):
title="Main Model - FLUX",
tags=["model", "flux"],
category="model",
- version="1.0.6",
+ version="1.0.7",
)
class FluxModelLoaderInvocation(BaseInvocation):
"""Loads a flux base model, outputting its submodels."""
model: ModelIdentifierField = InputField(
description=FieldDescriptions.flux_model,
- input=Input.Direct,
ui_model_base=BaseModelType.Flux,
ui_model_type=ModelType.Main,
)
t5_encoder_model: ModelIdentifierField = InputField(
description=FieldDescriptions.t5_encoder,
- input=Input.Direct,
title="T5 Encoder",
ui_model_type=ModelType.T5Encoder,
)
clip_embed_model: ModelIdentifierField = InputField(
description=FieldDescriptions.clip_embed_model,
- input=Input.Direct,
title="CLIP Embed",
ui_model_type=ModelType.CLIPEmbed,
)
diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts
index a99021bc9d..5df3146489 100644
--- a/invokeai/frontend/web/src/services/api/schema.ts
+++ b/invokeai/frontend/web/src/services/api/schema.ts
@@ -9316,18 +9316,23 @@ export type components = {
* @default true
*/
use_cache?: boolean;
- /** @description Flux model (Transformer) to load */
- model: components["schemas"]["ModelIdentifierField"];
+ /**
+ * @description Flux model (Transformer) to load
+ * @default null
+ */
+ model?: components["schemas"]["ModelIdentifierField"] | null;
/**
* T5 Encoder
* @description T5 tokenizer and text encoder
+ * @default null
*/
- t5_encoder_model: components["schemas"]["ModelIdentifierField"];
+ t5_encoder_model?: components["schemas"]["ModelIdentifierField"] | null;
/**
* CLIP Embed
* @description CLIP Embed loader
+ * @default null
*/
- clip_embed_model: components["schemas"]["ModelIdentifierField"];
+ clip_embed_model?: components["schemas"]["ModelIdentifierField"] | null;
/**
* VAE
* @description VAE model to load