From 5ecfc2f8b95fb28c81d6fe0f8f4df6dcc5613ab5 Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Mon, 25 May 2026 06:11:40 +0200 Subject: [PATCH 1/8] feat(flux2): add FLUX.2 [dev] support Adds end-to-end support for FLUX.2 [dev] alongside the existing Klein implementation. Dev uses Mistral Small 3.1 (24B) as its sole text encoder instead of Klein's Qwen3, with joint_attention_dim=15360 and the guidance-distilled 32B transformer. Backend - taxonomy: Flux2VariantType.Dev, ModelType.MistralEncoder, ModelFormat.MistralEncoder, MistralVariantType - configs: probe dev via context_in_dim=15360 (main + LoRA); new mistral_encoder.py with Diffusers / Checkpoint / GGUF configs; Main_Diffusers_Flux2_Config accepts Flux2Pipeline class name - loaders: new mistral_encoder.py (AutoModel for Diffusers folder, MistralModel for single-file + GGUF with llama.cpp key conversion). Existing Klein transformer loaders are generic enough for dev - ModelRecordChanges.variant union extended with MistralVariantType Invocations - flux2_dev_model_loader, flux2_dev_text_encoder (Mistral chat-template with FLUX2_DEV_SYSTEM_MESSAGE and layer-stacking 10/20/30), flux2_dev_lora_loader (+ collection variant) - MistralEncoderField on model.py; flux2_denoise / flux2_vae_decode / flux2_vae_encode reused unchanged (already model-agnostic) Frontend - types/hooks/selectors for MistralEncoder, isFlux2DevMainModelConfig, selectFlux2DevDiffusersModels, useMistralEncoderModels - params slice fields flux2DevVaeModel / flux2DevMistralEncoderModel / flux2DevSourceModel + reducers, selectIsFlux2Dev / selectIsFlux2Klein - ParamFlux2DevModelSelect component, wired into AdvancedSettingsAccordion - buildFLUXGraph dev branch with full txt2img / img2img / inpaint / outpaint + multi-reference image editing (same flux_kontext + collect chain as Klein, since Flux2RefImageExtension is model-agnostic) - addFlux2DevLoRAs helper for dev LoRA wiring - zModelType / zModelFormat / zFlux2VariantType extended for mistral_encoder / mistral_small_3_1 / dev - OpenAPI schema regenerated, TS types updated Starter models - FLUX.2 [dev] Diffusers (bf16 + NF4), three GGUFs (Q4/Q6/Q8), Mistral encoder (bf16 + NF4) --- invokeai/app/invocations/fields.py | 2 + .../app/invocations/flux2_dev_lora_loader.py | 176 +++++ .../app/invocations/flux2_dev_model_loader.py | 179 +++++ .../app/invocations/flux2_dev_text_encoder.py | 230 +++++++ invokeai/app/invocations/model.py | 12 + .../model_records/model_records_base.py | 2 + .../backend/model_manager/configs/factory.py | 9 + .../backend/model_manager/configs/lora.py | 193 ++---- .../backend/model_manager/configs/main.py | 43 +- .../model_manager/configs/mistral_encoder.py | 219 ++++++ .../load/model_loaders/mistral_encoder.py | 448 +++++++++++++ .../backend/model_manager/starter_models.py | 77 +++ invokeai/backend/model_manager/taxonomy.py | 17 +- .../listeners/modelSelected.test.ts | 3 + .../controlLayers/store/paramsSlice.ts | 49 ++ .../src/features/controlLayers/store/types.ts | 7 + .../web/src/features/modelManagerV2/models.ts | 9 + .../ModelManagerPanel/ModelFormatBadge.tsx | 2 + .../web/src/features/nodes/types/common.ts | 6 +- .../util/graph/generation/addFlux2DevLoRAs.ts | 62 ++ .../nodes/util/graph/generation/addRegions.ts | 2 + .../graph/generation/buildFLUXGraph.test.ts | 3 + .../util/graph/generation/buildFLUXGraph.ts | 196 +++++- .../nodes/util/graph/graphBuilderUtils.ts | 1 + .../src/features/nodes/util/graph/types.ts | 1 + .../Advanced/ParamFlux2DevModelSelect.tsx | 146 ++++ .../AdvancedSettingsAccordion.tsx | 10 +- .../src/services/api/hooks/modelsByType.ts | 6 + .../frontend/web/src/services/api/schema.ts | 632 +++++++++++++++++- .../frontend/web/src/services/api/types.ts | 15 +- 30 files changed, 2578 insertions(+), 179 deletions(-) create mode 100644 invokeai/app/invocations/flux2_dev_lora_loader.py create mode 100644 invokeai/app/invocations/flux2_dev_model_loader.py create mode 100644 invokeai/app/invocations/flux2_dev_text_encoder.py create mode 100644 invokeai/backend/model_manager/configs/mistral_encoder.py create mode 100644 invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py create mode 100644 invokeai/frontend/web/src/features/nodes/util/graph/generation/addFlux2DevLoRAs.ts create mode 100644 invokeai/frontend/web/src/features/parameters/components/Advanced/ParamFlux2DevModelSelect.tsx diff --git a/invokeai/app/invocations/fields.py b/invokeai/app/invocations/fields.py index e53aeb417b2..cc80af8f966 100644 --- a/invokeai/app/invocations/fields.py +++ b/invokeai/app/invocations/fields.py @@ -155,6 +155,7 @@ class FieldDescriptions: t5_encoder = "T5 tokenizer and text encoder" glm_encoder = "GLM (THUDM) tokenizer and text encoder" qwen3_encoder = "Qwen3 tokenizer and text encoder" + mistral_encoder = "Mistral tokenizer/processor and text encoder" clip_embed_model = "CLIP Embed loader" clip_g_model = "CLIP-G Embed loader" unet = "UNet (scheduler, LoRAs)" @@ -171,6 +172,7 @@ class FieldDescriptions: sd3_model = "SD3 model (MMDiTX) to load" cogview4_model = "CogView4 model (Transformer) to load" z_image_model = "Z-Image model (Transformer) to load" + flux2_dev_model = "FLUX.2 [dev] model (Transformer) to load" qwen_image_model = "Qwen Image Edit model (Transformer) to load" qwen_vl_encoder = "Qwen2.5-VL tokenizer, processor and text/vision encoder" sdxl_main_model = "SDXL Main model (UNet, VAE, CLIP1, CLIP2) to load" diff --git a/invokeai/app/invocations/flux2_dev_lora_loader.py b/invokeai/app/invocations/flux2_dev_lora_loader.py new file mode 100644 index 00000000000..a87d3b9a054 --- /dev/null +++ b/invokeai/app/invocations/flux2_dev_lora_loader.py @@ -0,0 +1,176 @@ +"""FLUX.2 [dev] LoRA loader invocations. + +Mirror of the Klein LoRA loader, but routes encoder LoRAs to the Mistral text +encoder rather than the Qwen3 encoder. +""" + +from typing import Optional + +from invokeai.app.invocations.baseinvocation import ( + BaseInvocation, + BaseInvocationOutput, + Classification, + invocation, + invocation_output, +) +from invokeai.app.invocations.fields import FieldDescriptions, Input, InputField, OutputField +from invokeai.app.invocations.model import ( + LoRAField, + MistralEncoderField, + ModelIdentifierField, + TransformerField, +) +from invokeai.app.services.shared.invocation_context import InvocationContext +from invokeai.backend.model_manager.taxonomy import BaseModelType, Flux2VariantType, ModelType + + +@invocation_output("flux2_dev_lora_loader_output") +class Flux2DevLoRALoaderOutput(BaseInvocationOutput): + """FLUX.2 [dev] LoRA loader output.""" + + transformer: Optional[TransformerField] = OutputField( + default=None, description=FieldDescriptions.transformer, title="Transformer" + ) + mistral_encoder: Optional[MistralEncoderField] = OutputField( + default=None, description=FieldDescriptions.mistral_encoder, title="Mistral Encoder" + ) + + +@invocation( + "flux2_dev_lora_loader", + title="Apply LoRA - FLUX.2 [dev]", + tags=["lora", "model", "flux", "flux2", "dev"], + category="model", + version="1.0.0", + classification=Classification.Prototype, +) +class Flux2DevLoRALoaderInvocation(BaseInvocation): + """Apply a LoRA to a FLUX.2 [dev] transformer and/or its Mistral text encoder.""" + + lora: ModelIdentifierField = InputField( + description=FieldDescriptions.lora_model, + title="LoRA", + ui_model_base=BaseModelType.Flux2, + ui_model_type=ModelType.LoRA, + ) + weight: float = InputField(default=0.75, description=FieldDescriptions.lora_weight) + transformer: TransformerField | None = InputField( + default=None, + description=FieldDescriptions.transformer, + input=Input.Connection, + title="Transformer", + ) + mistral_encoder: MistralEncoderField | None = InputField( + default=None, + title="Mistral Encoder", + description=FieldDescriptions.mistral_encoder, + input=Input.Connection, + ) + + def invoke(self, context: InvocationContext) -> Flux2DevLoRALoaderOutput: + lora_key = self.lora.key + if not context.models.exists(lora_key): + raise ValueError(f"Unknown lora: {lora_key}!") + + lora_config = context.models.get_config(lora_key) + lora_variant = getattr(lora_config, "variant", None) + + # Warn if LoRA variant doesn't match transformer variant. A Klein LoRA on a + # dev transformer is virtually guaranteed to produce shape errors. + if lora_variant and self.transformer is not None: + transformer_config = context.models.get_config(self.transformer.transformer.key) + transformer_variant = getattr(transformer_config, "variant", None) + if transformer_variant and lora_variant != transformer_variant: + context.logger.warning( + f"LoRA variant mismatch: LoRA '{lora_config.name}' is for {lora_variant.value} " + f"but transformer is {transformer_variant.value}. This may cause shape errors." + ) + if lora_variant != Flux2VariantType.Dev: + context.logger.warning( + f"LoRA '{lora_config.name}' is a {lora_variant.value} LoRA but is being applied " + "via the FLUX.2 [dev] loader. Use the Klein loader for Klein LoRAs." + ) + + # Check for duplicate keys. + if self.transformer and any(existing.lora.key == lora_key for existing in self.transformer.loras): + raise ValueError(f'LoRA "{lora_key}" already applied to transformer.') + if self.mistral_encoder and any(existing.lora.key == lora_key for existing in self.mistral_encoder.loras): + raise ValueError(f'LoRA "{lora_key}" already applied to Mistral encoder.') + + output = Flux2DevLoRALoaderOutput() + if self.transformer is not None: + output.transformer = self.transformer.model_copy(deep=True) + output.transformer.loras.append(LoRAField(lora=self.lora, weight=self.weight)) + if self.mistral_encoder is not None: + output.mistral_encoder = self.mistral_encoder.model_copy(deep=True) + output.mistral_encoder.loras.append(LoRAField(lora=self.lora, weight=self.weight)) + return output + + +@invocation( + "flux2_dev_lora_collection_loader", + title="Apply LoRA Collection - FLUX.2 [dev]", + tags=["lora", "model", "flux", "flux2", "dev"], + category="model", + version="1.0.0", + classification=Classification.Prototype, +) +class Flux2DevLoRACollectionLoader(BaseInvocation): + """Apply a collection of LoRAs to a FLUX.2 [dev] transformer and/or Mistral encoder.""" + + loras: Optional[LoRAField | list[LoRAField]] = InputField( + default=None, + description="LoRA models and weights. May be a single LoRA or collection.", + title="LoRAs", + ) + transformer: Optional[TransformerField] = InputField( + default=None, + description=FieldDescriptions.transformer, + input=Input.Connection, + title="Transformer", + ) + mistral_encoder: MistralEncoderField | None = InputField( + default=None, + title="Mistral Encoder", + description=FieldDescriptions.mistral_encoder, + input=Input.Connection, + ) + + def invoke(self, context: InvocationContext) -> Flux2DevLoRALoaderOutput: + output = Flux2DevLoRALoaderOutput() + loras = self.loras if isinstance(self.loras, list) else [self.loras] + added_loras: list[str] = [] + + if self.transformer is not None: + output.transformer = self.transformer.model_copy(deep=True) + if self.mistral_encoder is not None: + output.mistral_encoder = self.mistral_encoder.model_copy(deep=True) + + for lora in loras: + if lora is None: + continue + if lora.lora.key in added_loras: + continue + if not context.models.exists(lora.lora.key): + raise Exception(f"Unknown lora: {lora.lora.key}!") + assert lora.lora.base in (BaseModelType.Flux, BaseModelType.Flux2) + + lora_config = context.models.get_config(lora.lora.key) + lora_variant = getattr(lora_config, "variant", None) + if lora_variant and self.transformer is not None: + transformer_config = context.models.get_config(self.transformer.transformer.key) + transformer_variant = getattr(transformer_config, "variant", None) + if transformer_variant and lora_variant != transformer_variant: + context.logger.warning( + f"LoRA variant mismatch: LoRA '{lora_config.name}' is for {lora_variant.value} " + f"but transformer is {transformer_variant.value}. This may cause shape errors." + ) + + added_loras.append(lora.lora.key) + + if self.transformer is not None and output.transformer is not None: + output.transformer.loras.append(lora) + if self.mistral_encoder is not None and output.mistral_encoder is not None: + output.mistral_encoder.loras.append(lora) + + return output diff --git a/invokeai/app/invocations/flux2_dev_model_loader.py b/invokeai/app/invocations/flux2_dev_model_loader.py new file mode 100644 index 00000000000..1ed3cd8b34b --- /dev/null +++ b/invokeai/app/invocations/flux2_dev_model_loader.py @@ -0,0 +1,179 @@ +"""FLUX.2 [dev] model loader invocation. + +Loads a FLUX.2 [dev] transformer with its Mistral Small 3.1 text encoder and the +shared FLUX.2 32-channel VAE. +""" + +from typing import Literal, Optional + +from invokeai.app.invocations.baseinvocation import ( + BaseInvocation, + BaseInvocationOutput, + Classification, + invocation, + invocation_output, +) +from invokeai.app.invocations.fields import FieldDescriptions, Input, InputField, OutputField +from invokeai.app.invocations.model import ( + MistralEncoderField, + ModelIdentifierField, + TransformerField, + VAEField, +) +from invokeai.app.services.shared.invocation_context import InvocationContext +from invokeai.backend.model_manager.taxonomy import ( + BaseModelType, + Flux2VariantType, + ModelFormat, + ModelType, + SubModelType, +) + + +@invocation_output("flux2_dev_model_loader_output") +class Flux2DevModelLoaderOutput(BaseInvocationOutput): + """FLUX.2 [dev] model loader output.""" + + transformer: TransformerField = OutputField(description=FieldDescriptions.transformer, title="Transformer") + mistral_encoder: MistralEncoderField = OutputField( + description=FieldDescriptions.mistral_encoder, title="Mistral Encoder" + ) + vae: VAEField = OutputField(description=FieldDescriptions.vae, title="VAE") + max_seq_len: Literal[256, 512] = OutputField( + description="Max sequence length for the Mistral encoder.", + title="Max Seq Length", + ) + + +@invocation( + "flux2_dev_model_loader", + title="Main Model - FLUX.2 [dev]", + tags=["model", "flux", "flux2", "dev", "mistral"], + category="model", + version="1.0.0", + classification=Classification.Prototype, +) +class Flux2DevModelLoaderInvocation(BaseInvocation): + """Load a FLUX.2 [dev] transformer plus its Mistral text encoder and VAE. + + FLUX.2 [dev] is a 32B guidance-distilled rectified flow transformer that uses + Mistral Small 3.1 (24B) as its sole text encoder, sharing the 32-channel + AutoencoderKLFlux2 VAE with FLUX.2 Klein. + + When the transformer is a Diffusers-format checkpoint, both VAE and Mistral + encoder can be extracted directly from the main model. For single-file + safetensors or GGUF transformers, you must supply standalone VAE and + Mistral encoder models, or point at a Diffusers FLUX.2 [dev] checkout for + sub-model extraction. + """ + + model: ModelIdentifierField = InputField( + description=FieldDescriptions.flux2_dev_model, + input=Input.Direct, + ui_model_base=BaseModelType.Flux2, + ui_model_type=ModelType.Main, + title="Transformer", + ) + + vae_model: Optional[ModelIdentifierField] = InputField( + default=None, + description="Standalone FLUX.2 VAE (AutoencoderKLFlux2). " + "If not provided, the VAE is extracted from the Diffusers source model.", + input=Input.Direct, + ui_model_base=BaseModelType.Flux2, + ui_model_type=ModelType.VAE, + title="VAE", + ) + + mistral_encoder_model: Optional[ModelIdentifierField] = InputField( + default=None, + description="Standalone Mistral text encoder. Required when the transformer is " + "a single-file safetensors or GGUF without a sibling Diffusers source.", + input=Input.Direct, + ui_model_type=ModelType.MistralEncoder, + title="Mistral Encoder", + ) + + mistral_source_model: Optional[ModelIdentifierField] = InputField( + default=None, + description="Diffusers FLUX.2 [dev] model to extract VAE and/or Mistral encoder from. " + "Use this if you don't have separate VAE / Mistral encoder models. " + "Ignored if both are provided separately.", + input=Input.Direct, + ui_model_base=BaseModelType.Flux2, + ui_model_type=ModelType.Main, + ui_model_format=ModelFormat.Diffusers, + title="Mistral Source (Diffusers)", + ) + + max_seq_len: Literal[256, 512] = InputField( + default=512, + description="Max sequence length for the Mistral encoder. FLUX.2 [dev] uses 512 by default.", + title="Max Seq Length", + ) + + def invoke(self, context: InvocationContext) -> Flux2DevModelLoaderOutput: + # Validate the selected main model is FLUX.2 [dev], not Klein. + main_config = context.models.get_config(self.model) + variant = getattr(main_config, "variant", None) + if variant is not None and variant != Flux2VariantType.Dev: + raise ValueError( + f"FLUX.2 [dev] loader requires a FLUX.2 [dev] transformer, " + f"but the selected model is variant '{variant.value}'. " + "Use the FLUX.2 Klein loader for Klein variants." + ) + + transformer = self.model.model_copy(update={"submodel_type": SubModelType.Transformer}) + main_is_diffusers = main_config.format == ModelFormat.Diffusers + + # Resolve VAE. + if self.vae_model is not None: + vae = self.vae_model.model_copy(update={"submodel_type": SubModelType.VAE}) + elif main_is_diffusers: + vae = self.model.model_copy(update={"submodel_type": SubModelType.VAE}) + elif self.mistral_source_model is not None: + self._validate_diffusers_format(context, self.mistral_source_model, "Mistral Source") + vae = self.mistral_source_model.model_copy(update={"submodel_type": SubModelType.VAE}) + else: + raise ValueError( + "No VAE source provided. Single-file / GGUF transformers require a separate VAE. " + "Options:\n" + " 1. Set 'VAE' to a standalone FLUX.2 VAE model\n" + " 2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the VAE from" + ) + + # Resolve Mistral encoder. + if self.mistral_encoder_model is not None: + tokenizer = self.mistral_encoder_model.model_copy(update={"submodel_type": SubModelType.Tokenizer}) + text_encoder = self.mistral_encoder_model.model_copy(update={"submodel_type": SubModelType.TextEncoder}) + elif main_is_diffusers: + tokenizer = self.model.model_copy(update={"submodel_type": SubModelType.Tokenizer}) + text_encoder = self.model.model_copy(update={"submodel_type": SubModelType.TextEncoder}) + elif self.mistral_source_model is not None: + self._validate_diffusers_format(context, self.mistral_source_model, "Mistral Source") + tokenizer = self.mistral_source_model.model_copy(update={"submodel_type": SubModelType.Tokenizer}) + text_encoder = self.mistral_source_model.model_copy(update={"submodel_type": SubModelType.TextEncoder}) + else: + raise ValueError( + "No Mistral encoder source provided. Single-file / GGUF transformers require a separate " + "text encoder. Options:\n" + " 1. Set 'Mistral Encoder' to a standalone Mistral Small 3.1 text encoder model\n" + " 2. Set 'Mistral Source' to a Diffusers FLUX.2 [dev] model to extract the encoder from" + ) + + return Flux2DevModelLoaderOutput( + transformer=TransformerField(transformer=transformer, loras=[]), + mistral_encoder=MistralEncoderField(tokenizer=tokenizer, text_encoder=text_encoder), + vae=VAEField(vae=vae), + max_seq_len=self.max_seq_len, + ) + + def _validate_diffusers_format( + self, context: InvocationContext, model: ModelIdentifierField, model_name: str + ) -> None: + config = context.models.get_config(model) + if config.format != ModelFormat.Diffusers: + raise ValueError( + f"The {model_name} model must be a Diffusers format model. " + f"The selected model '{config.name}' is in {config.format.value} format." + ) diff --git a/invokeai/app/invocations/flux2_dev_text_encoder.py b/invokeai/app/invocations/flux2_dev_text_encoder.py new file mode 100644 index 00000000000..046601545d6 --- /dev/null +++ b/invokeai/app/invocations/flux2_dev_text_encoder.py @@ -0,0 +1,230 @@ +"""FLUX.2 [dev] text encoder invocation. + +FLUX.2 [dev] uses Mistral Small 3.1 as its sole text encoder, following the +diffusers Flux2Pipeline reference implementation: + +- A fixed system message biases the model toward structured image descriptions. +- The user prompt is wrapped in Mistral's chat template via the multimodal + AutoProcessor. +- Three intermediate hidden states (layers 10, 20, 30 in the 30-layer model) are + stacked and flattened to produce a (B, seq, 3 * hidden_size) tensor — for + Mistral Small 3.1 that is 3 * 5120 = 15360, matching the transformer's + joint_attention_dim. +""" + +from contextlib import ExitStack +from typing import Iterator, Literal, Optional, Tuple + +import torch +from transformers import PreTrainedModel + +from invokeai.app.invocations.baseinvocation import BaseInvocation, Classification, invocation +from invokeai.app.invocations.fields import ( + FieldDescriptions, + FluxConditioningField, + Input, + InputField, + TensorField, + UIComponent, +) +from invokeai.app.invocations.model import MistralEncoderField +from invokeai.app.invocations.primitives import FluxConditioningOutput +from invokeai.app.services.shared.invocation_context import InvocationContext +from invokeai.backend.model_manager.load.model_cache.utils import get_effective_device +from invokeai.backend.patches.layer_patcher import LayerPatcher +from invokeai.backend.patches.lora_conversions.flux_lora_constants import FLUX_LORA_T5_PREFIX +from invokeai.backend.patches.model_patch_raw import ModelPatchRaw +from invokeai.backend.stable_diffusion.diffusion.conditioning_data import ConditioningFieldData, FLUXConditioningInfo +from invokeai.backend.util.devices import TorchDevice + +# System prompt used by the FLUX.2 [dev] reference pipeline. Biasing the model +# toward structured image descriptions produces the embedding distribution the +# transformer was trained to consume. +FLUX2_DEV_SYSTEM_MESSAGE = ( + "You are an AI that reasons about image descriptions. You give structured " + "responses focusing on object relationships, object attribution and actions " + "without speculation." +) + +# Diffusers / BFL extract hidden states from these layers and stack them. +# Indices are 1-based into hidden_states[] (hidden_states[0] is the embedding layer). +# Mistral Small 3.1 has 40 transformer layers (so up to hidden_states[40]); the +# reference pipeline uses (10, 20, 30) and we scale proportionally if the model +# has fewer layers. +DEV_EXTRACTION_LAYERS = (10, 20, 30) + +# Default max sequence length for FLUX.2 [dev]. The reference pipeline caps at 512. +DEV_MAX_SEQ_LEN = 512 + + +@invocation( + "flux2_dev_text_encoder", + title="Prompt - FLUX.2 [dev]", + tags=["prompt", "conditioning", "flux", "flux2", "dev", "mistral"], + category="prompt", + version="1.0.0", + classification=Classification.Prototype, +) +class Flux2DevTextEncoderInvocation(BaseInvocation): + """Encode a prompt for FLUX.2 [dev] using its Mistral Small 3.1 text encoder.""" + + prompt: str = InputField(description="Text prompt to encode.", ui_component=UIComponent.Textarea) + mistral_encoder: MistralEncoderField = InputField( + title="Mistral Encoder", + description=FieldDescriptions.mistral_encoder, + input=Input.Connection, + ) + max_seq_len: Literal[256, 512] = InputField( + default=DEV_MAX_SEQ_LEN, + description="Max sequence length for the Mistral encoder.", + ) + mask: Optional[TensorField] = InputField( + default=None, + description="A mask defining the region that this conditioning prompt applies to.", + ) + + @torch.no_grad() + def invoke(self, context: InvocationContext) -> FluxConditioningOutput: + with ExitStack() as exit_stack: + mistral_embeds = self._encode_prompt(context, exit_stack) + + # FLUX.2 [dev] does not consume a pooled / CLIP-style embedding; we + # reuse the FLUX conditioning structure (Klein does the same) and put + # the Mistral hidden states in the `t5_embeds` slot, which the + # FLUX.2 denoise loop already wires into `encoder_hidden_states`. + conditioning_data = ConditioningFieldData( + conditionings=[ + FLUXConditioningInfo( + clip_embeds=torch.zeros(1, device=mistral_embeds.device, dtype=mistral_embeds.dtype), + t5_embeds=mistral_embeds, + ) + ] + ) + conditioning_name = context.conditioning.save(conditioning_data) + return FluxConditioningOutput( + conditioning=FluxConditioningField(conditioning_name=conditioning_name, mask=self.mask) + ) + + def _encode_prompt(self, context: InvocationContext, exit_stack: ExitStack) -> torch.Tensor: + text_encoder_info = context.models.load(self.mistral_encoder.text_encoder) + (cached_weights, text_encoder) = exit_stack.enter_context(text_encoder_info.model_on_device()) + + processor_info = context.models.load(self.mistral_encoder.tokenizer) + (_, processor) = exit_stack.enter_context(processor_info.model_on_device()) + + repaired_tensors = text_encoder_info.repair_required_tensors_on_device() + device = get_effective_device(text_encoder) + if repaired_tensors > 0: + context.logger.warning( + f"Recovered {repaired_tensors} required Mistral tensor(s) on {device} after a partial device mismatch." + ) + + # Apply any LoRAs attached to the text encoder. + lora_dtype = TorchDevice.choose_bfloat16_safe_dtype(device) + exit_stack.enter_context( + LayerPatcher.apply_smart_model_patches( + model=text_encoder, + patches=self._lora_iterator(context), + prefix=FLUX_LORA_T5_PREFIX, + dtype=lora_dtype, + cached_weights=cached_weights, + ) + ) + + context.util.signal_progress("Running Mistral text encoder (FLUX.2 [dev])") + + if not isinstance(text_encoder, PreTrainedModel): + raise TypeError( + f"Expected PreTrainedModel for text encoder, got {type(text_encoder).__name__}. " + "The Mistral encoder model may be corrupted or incompatible." + ) + + # Build the chat-template messages. The processor may be either a full + # AutoProcessor (for Mistral3ForConditionalGeneration) or a bare tokenizer + # (for text-only single-file/GGUF loaders); both expose `apply_chat_template`. + messages = [ + { + "role": "system", + "content": [{"type": "text", "text": FLUX2_DEV_SYSTEM_MESSAGE}], + }, + { + "role": "user", + "content": [{"type": "text", "text": self.prompt}], + }, + ] + + tokenize_kwargs = { + "tokenize": True, + "return_dict": True, + "return_tensors": "pt", + "add_generation_prompt": False, + "padding": "max_length", + "truncation": True, + "max_length": self.max_seq_len, + } + + try: + inputs = processor.apply_chat_template(messages, **tokenize_kwargs) + except (AttributeError, ValueError): + # Fallback path: processor has no chat template (single-file + # tokenizer download). Format the prompt manually using Mistral's + # [INST]...[/INST] convention. + text = f"[INST] {FLUX2_DEV_SYSTEM_MESSAGE}\n\n{self.prompt} [/INST]" + inputs = processor( + text, + return_tensors="pt", + padding="max_length", + truncation=True, + max_length=self.max_seq_len, + ) + + input_ids = inputs["input_ids"].to(device) + attention_mask = inputs["attention_mask"].to(device) + + # Mistral3ForConditionalGeneration wraps the LM under `.language_model`. + # For pure text encoding, run that sub-module to skip the (unused) vision + # tower and to avoid emitting a generation; for plain MistralModel / + # MistralForCausalLM, run the model directly. + forward_target = getattr(text_encoder, "language_model", None) or text_encoder + + outputs = forward_target( + input_ids=input_ids, + attention_mask=attention_mask, + output_hidden_states=True, + use_cache=False, + ) + if not hasattr(outputs, "hidden_states") or outputs.hidden_states is None: + raise RuntimeError( + "Mistral encoder did not return hidden_states. " + "Ensure output_hidden_states=True is supported by this model." + ) + num_hidden_states = len(outputs.hidden_states) # = num_hidden_layers + 1 (embedding output) + + # Scale extraction layer indices if the model is smaller than the reference. + # hidden_states[0] is the embedding output, hidden_states[i] is the output of layer i. + if num_hidden_states - 1 < max(DEV_EXTRACTION_LAYERS): + n = num_hidden_states - 1 # number of transformer layers + scaled = (max(1, n // 3), max(1, (2 * n) // 3), n) + extraction_layers = scaled + else: + extraction_layers = DEV_EXTRACTION_LAYERS + + stacked = torch.stack([outputs.hidden_states[i] for i in extraction_layers], dim=1) + # stacked: (B, 3, seq, hidden_size) -> (B, seq, 3 * hidden_size) + batch_size, num_layers, seq_len, hidden_dim = stacked.shape + prompt_embeds = stacked.permute(0, 2, 1, 3).reshape(batch_size, seq_len, num_layers * hidden_dim) + prompt_embeds = prompt_embeds.to(dtype=text_encoder.dtype, device=device) + + return prompt_embeds + + def _lora_iterator(self, context: InvocationContext) -> Iterator[Tuple[ModelPatchRaw, float]]: + """Iterate over LoRAs to apply to the Mistral encoder.""" + for lora in self.mistral_encoder.loras: + lora_info = context.models.load(lora.lora) + if not isinstance(lora_info.model, ModelPatchRaw): + raise TypeError( + f"Expected ModelPatchRaw for LoRA '{lora.lora.key}', got {type(lora_info.model).__name__}. " + "The LoRA model may be corrupted or incompatible." + ) + yield (lora_info.model, lora.weight) + del lora_info diff --git a/invokeai/app/invocations/model.py b/invokeai/app/invocations/model.py index 0c96cdb1d9d..2c7bac04140 100644 --- a/invokeai/app/invocations/model.py +++ b/invokeai/app/invocations/model.py @@ -87,6 +87,18 @@ class Qwen3EncoderField(BaseModel): loras: List[LoRAField] = Field(default_factory=list, description="LoRAs to apply on model loading") +class MistralEncoderField(BaseModel): + """Field for the Mistral text encoder used by FLUX.2 [dev]. + + The "tokenizer" submodel actually points to the multimodal processor (AutoProcessor / + Mistral3Processor), which wraps the tokenizer plus the chat template needed by FLUX.2. + """ + + tokenizer: ModelIdentifierField = Field(description="Info to load tokenizer / processor submodel") + text_encoder: ModelIdentifierField = Field(description="Info to load text_encoder submodel") + loras: List[LoRAField] = Field(default_factory=list, description="LoRAs to apply on model loading") + + class VAEField(BaseModel): vae: ModelIdentifierField = Field(description="Info to load vae submodel") seamless_axes: List[str] = Field(default_factory=list, description='Axes("x" and "y") to which apply seamless') diff --git a/invokeai/app/services/model_records/model_records_base.py b/invokeai/app/services/model_records/model_records_base.py index e06f8f2df91..0699de9a606 100644 --- a/invokeai/app/services/model_records/model_records_base.py +++ b/invokeai/app/services/model_records/model_records_base.py @@ -26,6 +26,7 @@ ClipVariantType, Flux2VariantType, FluxVariantType, + MistralVariantType, ModelFormat, ModelSourceType, ModelType, @@ -135,6 +136,7 @@ def validate_source_url(cls, v: Any) -> Optional[str]: | ZImageVariantType | QwenImageVariantType | Qwen3VariantType + | MistralVariantType ] = Field(description="The variant of the model.", default=None) prediction_type: Optional[SchedulerPredictionType] = Field( description="The prediction type of the model.", default=None diff --git a/invokeai/backend/model_manager/configs/factory.py b/invokeai/backend/model_manager/configs/factory.py index 985cb982d30..5cfdd3da8fb 100644 --- a/invokeai/backend/model_manager/configs/factory.py +++ b/invokeai/backend/model_manager/configs/factory.py @@ -85,6 +85,11 @@ Main_GGUF_ZImage_Config, MainModelDefaultSettings, ) +from invokeai.backend.model_manager.configs.mistral_encoder import ( + MistralEncoder_Checkpoint_Config, + MistralEncoder_Diffusers_Config, + MistralEncoder_GGUF_Config, +) from invokeai.backend.model_manager.configs.qwen3_encoder import ( Qwen3Encoder_Checkpoint_Config, Qwen3Encoder_GGUF_Config, @@ -248,6 +253,10 @@ Annotated[Qwen3Encoder_Qwen3Encoder_Config, Qwen3Encoder_Qwen3Encoder_Config.get_tag()], Annotated[Qwen3Encoder_Checkpoint_Config, Qwen3Encoder_Checkpoint_Config.get_tag()], Annotated[Qwen3Encoder_GGUF_Config, Qwen3Encoder_GGUF_Config.get_tag()], + # Mistral Encoder (used by FLUX.2 [dev]) + Annotated[MistralEncoder_Diffusers_Config, MistralEncoder_Diffusers_Config.get_tag()], + Annotated[MistralEncoder_Checkpoint_Config, MistralEncoder_Checkpoint_Config.get_tag()], + Annotated[MistralEncoder_GGUF_Config, MistralEncoder_GGUF_Config.get_tag()], # Qwen VL Encoder (Qwen2.5-VL multimodal encoder for Qwen Image) Annotated[QwenVLEncoder_Diffusers_Config, QwenVLEncoder_Diffusers_Config.get_tag()], Annotated[QwenVLEncoder_Checkpoint_Config, QwenVLEncoder_Checkpoint_Config.get_tag()], diff --git a/invokeai/backend/model_manager/configs/lora.py b/invokeai/backend/model_manager/configs/lora.py index 46606a3c0d5..7a3b8d2d668 100644 --- a/invokeai/backend/model_manager/configs/lora.py +++ b/invokeai/backend/model_manager/configs/lora.py @@ -66,15 +66,15 @@ def _get_flux_lora_format(mod: ModelOnDisk) -> FluxLoRAFormat | None: return value -# FLUX.2 Klein context_in_dim values: 3 * Qwen3 hidden_size -# Klein 4B: 3 * 2560 = 7680, Klein 9B: 3 * 4096 = 12288 -_FLUX2_CONTEXT_IN_DIMS = {7680, 12288} +# FLUX.2 context_in_dim values: 3 * text encoder hidden_size +# Klein 4B: 3 * 2560 = 7680, Klein 9B: 3 * 4096 = 12288, Dev: 3 * 5120 = 15360 (Mistral) +_FLUX2_CONTEXT_IN_DIMS = {7680, 12288, 15360} -# FLUX.2 Klein vec_in_dim values: Qwen3 hidden_size -# Klein 4B: 2560 (Qwen3-4B), Klein 9B: 4096 (Qwen3-8B) -_FLUX2_VEC_IN_DIMS = {2560, 4096} +# FLUX.2 vec_in_dim values: text encoder hidden_size +# Klein 4B: 2560 (Qwen3-4B), Klein 9B: 4096 (Qwen3-8B), Dev: 5120 (Mistral Small 3.1) +_FLUX2_VEC_IN_DIMS = {2560, 4096, 5120} -# FLUX.1 hidden_size is 3072. Klein 9B uses hidden_size=4096. +# FLUX.1 hidden_size is 3072. Klein 9B uses 4096, FLUX.2 [dev] uses 6144 (48 heads × 128 head_dim). # Klein 4B also uses 3072, so hidden_size alone can't distinguish Klein 4B from FLUX.1. _FLUX1_HIDDEN_SIZE = 3072 @@ -293,74 +293,79 @@ def _is_flux2_lora_state_dict(state_dict: dict[str | int, Any]) -> bool: def _get_flux2_lora_variant(state_dict: dict[str | int, Any]) -> Flux2VariantType | None: - """Determine FLUX.2 Klein variant (4B vs 9B) from a LoRA state dict. + """Determine FLUX.2 variant (Klein 4B/9B or Dev) from a LoRA state dict. - Detection is based on tensor dimensions that differ between Klein 4B and Klein 9B: - - hidden_size from attention projection: 3072 = Klein 4B, 4096 = Klein 9B - - context_in_dim from context embedder: 7680 = Klein 4B, 12288 = Klein 9B - - vec_in_dim from vector embedder: 2560 = Klein 4B, 4096 = Klein 9B + Detection is based on tensor dimensions that differ between variants: + - hidden_size from attention projection: 3072 = Klein 4B, 4096 = Klein 9B, 6144 = Dev + - context_in_dim from context embedder: 7680 = Klein 4B, 12288 = Klein 9B, 15360 = Dev + - vec_in_dim from vector embedder: 2560 = Klein 4B, 4096 = Klein 9B, 5120 = Dev Returns None if the variant cannot be determined (e.g. LoRA only targets layers with identical dimensions across variants). """ KLEIN_4B_CONTEXT_DIM = 7680 # 3 * 2560 KLEIN_9B_CONTEXT_DIM = 12288 # 3 * 4096 + DEV_CONTEXT_DIM = 15360 # 3 * 5120 KLEIN_4B_VEC_DIM = 2560 KLEIN_9B_VEC_DIM = 4096 + DEV_VEC_DIM = 5120 KLEIN_4B_HIDDEN_SIZE = 3072 KLEIN_9B_HIDDEN_SIZE = 4096 + DEV_HIDDEN_SIZE = 6144 # 48 heads × 128 head_dim + + def _variant_from_context_dim(dim: int) -> Flux2VariantType | None: + if dim == DEV_CONTEXT_DIM: + return Flux2VariantType.Dev + if dim == KLEIN_9B_CONTEXT_DIM: + return Flux2VariantType.Klein9B + if dim == KLEIN_4B_CONTEXT_DIM: + return Flux2VariantType.Klein4B + return None + + def _variant_from_vec_dim(dim: int) -> Flux2VariantType | None: + if dim == DEV_VEC_DIM: + return Flux2VariantType.Dev + if dim == KLEIN_9B_VEC_DIM: + return Flux2VariantType.Klein9B + if dim == KLEIN_4B_VEC_DIM: + return Flux2VariantType.Klein4B + return None + + def _variant_from_hidden_size(dim: int) -> Flux2VariantType | None: + if dim == DEV_HIDDEN_SIZE: + return Flux2VariantType.Dev + if dim == KLEIN_9B_HIDDEN_SIZE: + return Flux2VariantType.Klein9B + if dim == KLEIN_4B_HIDDEN_SIZE: + return Flux2VariantType.Klein4B + return None # Check diffusers/PEFT format keys for prefix in ["transformer.", "base_model.model.", ""]: # Context embedder (txt_in) dimensions ctx_key_a = f"{prefix}context_embedder.lora_A.weight" if ctx_key_a in state_dict: - dim = state_dict[ctx_key_a].shape[1] - if dim == KLEIN_4B_CONTEXT_DIM: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_CONTEXT_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_context_dim(state_dict[ctx_key_a].shape[1]) # Vector embedder dimensions vec_key_a = f"{prefix}time_text_embed.text_embedder.linear_1.lora_A.weight" if vec_key_a in state_dict: - dim = state_dict[vec_key_a].shape[1] - if dim == KLEIN_4B_VEC_DIM: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_VEC_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_vec_dim(state_dict[vec_key_a].shape[1]) # Attention projection hidden_size (Flux.1 diffusers naming) attn_key_a = f"{prefix}transformer_blocks.0.attn.to_out.0.lora_A.weight" if attn_key_a in state_dict: - dim = state_dict[attn_key_a].shape[1] - if dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None - - # Attention projection hidden_size (Flux2 Klein diffusers naming) + return _variant_from_hidden_size(state_dict[attn_key_a].shape[1]) + + # Attention projection hidden_size (Flux2 diffusers naming) attn_key_a2 = f"{prefix}transformer_blocks.0.attn.to_add_out.lora_A.weight" if attn_key_a2 in state_dict: - dim = state_dict[attn_key_a2].shape[1] - if dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None - - # Fused QKV+MLP hidden_size (Flux2 Klein diffusers naming) + return _variant_from_hidden_size(state_dict[attn_key_a2].shape[1]) + + # Fused QKV+MLP hidden_size (Flux2 diffusers naming) fused_key_a = f"{prefix}single_transformer_blocks.0.attn.to_qkv_mlp_proj.lora_A.weight" if fused_key_a in state_dict: - dim = state_dict[fused_key_a].shape[1] - if dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None + return _variant_from_hidden_size(state_dict[fused_key_a].shape[1]) # Check BFL PEFT/LyCORIS format (diffusion_model.* or base_model.model.* prefix with BFL names) _bfl_prefixes = ("diffusion_model.", "base_model.model.") @@ -372,63 +377,33 @@ def _get_flux2_lora_variant(state_dict: dict[str | int, Any]) -> Flux2VariantTyp # BFL PEFT: context embedder (txt_in) if "txt_in" in key and key.endswith("lora_A.weight"): - dim = state_dict[key].shape[1] - if dim == KLEIN_4B_CONTEXT_DIM: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_CONTEXT_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_context_dim(state_dict[key].shape[1]) # BFL PEFT: vector embedder (vector_in) if "vector_in" in key and key.endswith("lora_A.weight"): - dim = state_dict[key].shape[1] - if dim == KLEIN_4B_VEC_DIM: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_VEC_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_vec_dim(state_dict[key].shape[1]) # BFL PEFT: attention projection if key.endswith(".img_attn.proj.lora_A.weight"): - dim = state_dict[key].shape[1] - if dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None + return _variant_from_hidden_size(state_dict[key].shape[1]) # BFL LyCORIS (LoKR): context embedder (txt_in) if "txt_in" in key and key.endswith((".lokr_w1", ".lokr_w1_b")): - layer_prefix = key.rsplit(".", 1)[0] - in_dim = _lokr_in_dim(state_dict, layer_prefix) + in_dim = _lokr_in_dim(state_dict, key.rsplit(".", 1)[0]) if in_dim is not None: - if in_dim == KLEIN_4B_CONTEXT_DIM: - return Flux2VariantType.Klein4B - if in_dim == KLEIN_9B_CONTEXT_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_context_dim(in_dim) # BFL LyCORIS (LoKR): vector embedder (vector_in) if "vector_in" in key and key.endswith((".lokr_w1", ".lokr_w1_b")): - layer_prefix = key.rsplit(".", 1)[0] - in_dim = _lokr_in_dim(state_dict, layer_prefix) + in_dim = _lokr_in_dim(state_dict, key.rsplit(".", 1)[0]) if in_dim is not None: - if in_dim == KLEIN_4B_VEC_DIM: - return Flux2VariantType.Klein4B - if in_dim == KLEIN_9B_VEC_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_vec_dim(in_dim) # BFL LyCORIS (LoKR): attention projection if key.endswith((".img_attn.proj.lokr_w1", ".img_attn.proj.lokr_w1_b")): - layer_prefix = key.rsplit(".", 1)[0] - in_dim = _lokr_in_dim(state_dict, layer_prefix) + in_dim = _lokr_in_dim(state_dict, key.rsplit(".", 1)[0]) if in_dim is not None: - if in_dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if in_dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None + return _variant_from_hidden_size(in_dim) # Check kohya format for key in state_dict: @@ -436,40 +411,20 @@ def _get_flux2_lora_variant(state_dict: dict[str | int, Any]) -> Flux2VariantTyp continue if key.startswith("lora_unet_txt_in.") or key.startswith("lora_unet_context_embedder."): if key.endswith("lora_down.weight"): - dim = state_dict[key].shape[1] - if dim == KLEIN_4B_CONTEXT_DIM: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_CONTEXT_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_context_dim(state_dict[key].shape[1]) # Kohya LyCORIS (LoKR) elif key.endswith((".lokr_w1", ".lokr_w1_b")): - layer_prefix = key.rsplit(".", 1)[0] - in_dim = _lokr_in_dim(state_dict, layer_prefix) + in_dim = _lokr_in_dim(state_dict, key.rsplit(".", 1)[0]) if in_dim is not None: - if in_dim == KLEIN_4B_CONTEXT_DIM: - return Flux2VariantType.Klein4B - if in_dim == KLEIN_9B_CONTEXT_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_context_dim(in_dim) if key.startswith("lora_unet_vector_in.") or key.startswith("lora_unet_time_text_embed_text_embedder_"): if key.endswith("lora_down.weight"): - dim = state_dict[key].shape[1] - if dim == KLEIN_4B_VEC_DIM: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_VEC_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_vec_dim(state_dict[key].shape[1]) # Kohya LyCORIS (LoKR) elif key.endswith((".lokr_w1", ".lokr_w1_b")): - layer_prefix = key.rsplit(".", 1)[0] - in_dim = _lokr_in_dim(state_dict, layer_prefix) + in_dim = _lokr_in_dim(state_dict, key.rsplit(".", 1)[0]) if in_dim is not None: - if in_dim == KLEIN_4B_VEC_DIM: - return Flux2VariantType.Klein4B - if in_dim == KLEIN_9B_VEC_DIM: - return Flux2VariantType.Klein9B - return None + return _variant_from_vec_dim(in_dim) # Kohya format: check transformer block dimensions (hidden_size from img_attn_proj). # This handles LoRAs that only target transformer blocks (no txt_in/vector_in/context_embedder). @@ -481,22 +436,12 @@ def _get_flux2_lora_variant(state_dict: dict[str | int, Any]) -> Flux2VariantTyp # Check img_attn_proj hidden_size if "_img_attn_proj." in key and key.endswith("lora_down.weight"): - dim = state_dict[key].shape[1] - if dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None + return _variant_from_hidden_size(state_dict[key].shape[1]) # LoKR variant elif "_img_attn_proj." in key and key.endswith((".lokr_w1", ".lokr_w1_b")): - layer_prefix = key.rsplit(".", 1)[0] - in_dim = _lokr_in_dim(state_dict, layer_prefix) + in_dim = _lokr_in_dim(state_dict, key.rsplit(".", 1)[0]) if in_dim is not None: - if in_dim == KLEIN_4B_HIDDEN_SIZE: - return Flux2VariantType.Klein4B - if in_dim == KLEIN_9B_HIDDEN_SIZE: - return Flux2VariantType.Klein9B - return None + return _variant_from_hidden_size(in_dim) return None diff --git a/invokeai/backend/model_manager/configs/main.py b/invokeai/backend/model_manager/configs/main.py index e1e408a3483..104156fcb91 100644 --- a/invokeai/backend/model_manager/configs/main.py +++ b/invokeai/backend/model_manager/configs/main.py @@ -85,7 +85,10 @@ def from_base( return cls(steps=35, cfg_scale=4.5, width=1024, height=1024) case BaseModelType.Flux2: # Different defaults based on variant - if variant in (Flux2VariantType.Klein4BBase, Flux2VariantType.Klein9BBase): + if variant == Flux2VariantType.Dev: + # FLUX.2 [dev] is guidance-distilled (recommended guidance=3.5, 28 steps, CFG disabled) + return cls(steps=28, cfg_scale=1.0, guidance=3.5, width=1024, height=1024) + elif variant in (Flux2VariantType.Klein4BBase, Flux2VariantType.Klein9BBase): # Undistilled base models need more steps return cls(steps=28, cfg_scale=1.0, width=1024, height=1024) else: @@ -350,9 +353,10 @@ def _filename_suggests_base(name: str) -> bool: def _get_flux2_variant(state_dict: dict[str | int, Any]) -> Flux2VariantType | None: """Determine FLUX.2 variant from state dict. - Distinguishes between Klein 4B and Klein 9B based on context embedding dimension: + Distinguishes between variants based on context embedding dimension: - Klein 4B: context_in_dim = 7680 (3 × Qwen3-4B hidden_size 2560) - Klein 9B: context_in_dim = 12288 (3 × Qwen3-8B hidden_size 4096) + - Dev: context_in_dim = 15360 (3 × Mistral Small 3.1 hidden_size 5120) Note: Klein 9B (distilled) and Klein 9B Base (undistilled) have identical architectures and cannot be distinguished from the state dict alone. This function defaults to Klein9B @@ -365,6 +369,7 @@ def _get_flux2_variant(state_dict: dict[str | int, Any]) -> Flux2VariantType | N # Context dimensions for each variant KLEIN_4B_CONTEXT_DIM = 7680 # 3 × 2560 KLEIN_9B_CONTEXT_DIM = 12288 # 3 × 4096 + DEV_CONTEXT_DIM = 15360 # 3 × 5120 (Mistral Small 3.1) # Check context_embedder to determine variant # Support both BFL format (txt_in.weight) and diffusers format (context_embedder.weight) @@ -389,7 +394,9 @@ def _get_flux2_variant(state_dict: dict[str | int, Any]) -> Flux2VariantType | N if len(shape) >= 2: context_in_dim = shape[1] # Determine variant based on context dimension - if context_in_dim == KLEIN_9B_CONTEXT_DIM: + if context_in_dim == DEV_CONTEXT_DIM: + return Flux2VariantType.Dev + elif context_in_dim == KLEIN_9B_CONTEXT_DIM: # Default to Klein9B - callers use filename heuristics to detect Klein9BBase return Flux2VariantType.Klein9B elif context_in_dim == KLEIN_4B_CONTEXT_DIM: @@ -831,7 +838,7 @@ def _get_variant_or_raise(cls, mod: ModelOnDisk) -> FluxVariantType: class Main_Diffusers_Flux2_Config(Diffusers_Config_Base, Main_Config_Base, Config_Base): - """Model config for FLUX.2 models in diffusers format (e.g. FLUX.2 Klein).""" + """Model config for FLUX.2 models in diffusers format (FLUX.2 Klein and FLUX.2 [dev]).""" base: Literal[BaseModelType.Flux2] = Field(BaseModelType.Flux2) variant: Flux2VariantType = Field() @@ -847,6 +854,8 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - common_config_paths(mod.path), { "Flux2KleinPipeline", + "Flux2Pipeline", + "Flux2Transformer2DModel", }, ) @@ -864,21 +873,33 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - def _get_variant_or_raise(cls, mod: ModelOnDisk) -> Flux2VariantType: """Determine the FLUX.2 variant from the transformer config. - FLUX.2 Klein uses Qwen3 text encoder with larger joint_attention_dim: - - Klein 4B/4B Base: joint_attention_dim = 7680 (3×Qwen3-4B hidden size) - - Klein 9B/9B Base: joint_attention_dim = 12288 (3×Qwen3-8B hidden size) + FLUX.2 variants are distinguished by joint_attention_dim (= 3 × text encoder hidden_size): + - Klein 4B/4B Base: 7680 (3 × Qwen3-4B 2560) + - Klein 9B/9B Base: 12288 (3 × Qwen3-8B 4096) + - Dev: 15360 (3 × Mistral Small 3.1 5120) - Distilled and Base variants share identical architectures. We use a filename heuristic to detect Base models. + Klein distilled and Base variants share identical architectures; the Base variant + is detected by a filename heuristic. """ KLEIN_4B_CONTEXT_DIM = 7680 # 3 × 2560 KLEIN_9B_CONTEXT_DIM = 12288 # 3 × 4096 - - transformer_config = get_config_dict_or_raise(mod.path / "transformer" / "config.json") + DEV_CONTEXT_DIM = 15360 # 3 × 5120 + + # Try transformer/config.json first (full pipeline), fall back to root config.json + # (loose transformer-only checkouts). + transformer_config_path = mod.path / "transformer" / "config.json" + root_config_path = mod.path / "config.json" + if transformer_config_path.exists(): + transformer_config = get_config_dict_or_raise(transformer_config_path) + else: + transformer_config = get_config_dict_or_raise(root_config_path) joint_attention_dim = transformer_config.get("joint_attention_dim", 4096) # Determine variant based on joint_attention_dim - if joint_attention_dim == KLEIN_9B_CONTEXT_DIM: + if joint_attention_dim == DEV_CONTEXT_DIM: + return Flux2VariantType.Dev + elif joint_attention_dim == KLEIN_9B_CONTEXT_DIM: if _filename_suggests_base(mod.name): return Flux2VariantType.Klein9BBase return Flux2VariantType.Klein9B diff --git a/invokeai/backend/model_manager/configs/mistral_encoder.py b/invokeai/backend/model_manager/configs/mistral_encoder.py new file mode 100644 index 00000000000..19d01729468 --- /dev/null +++ b/invokeai/backend/model_manager/configs/mistral_encoder.py @@ -0,0 +1,219 @@ +import json +from typing import Any, Literal, Optional, Self + +from pydantic import Field + +from invokeai.backend.model_manager.configs.base import Checkpoint_Config_Base, Config_Base +from invokeai.backend.model_manager.configs.identification_utils import ( + NotAMatchError, + raise_for_class_name, + raise_for_override_fields, + raise_if_not_dir, + raise_if_not_file, +) +from invokeai.backend.model_manager.model_on_disk import ModelOnDisk +from invokeai.backend.model_manager.taxonomy import BaseModelType, MistralVariantType, ModelFormat, ModelType +from invokeai.backend.quantization.gguf.ggml_tensor import GGMLTensor + +# Mistral Small 3.1 hidden_size. Used by FLUX.2 [dev]. +_MISTRAL_SMALL_3_1_HIDDEN_SIZE = 5120 + + +def _has_mistral_keys(state_dict: dict[str | int, Any]) -> bool: + """Check if a state dict looks like a Mistral causal-LM / multimodal model. + + Supports both: + - PyTorch/diffusers/transformers format: model.layers.0., model.embed_tokens.weight + (with optional language_model. prefix for multimodal Mistral3ForConditionalGeneration) + - GGUF/llama.cpp format: blk.0., token_embd.weight + """ + pytorch_indicators = ( + "model.layers.", + "model.embed_tokens.weight", + "language_model.model.layers.", + "language_model.model.embed_tokens.weight", + ) + gguf_indicators = ("blk.", "token_embd.weight") + + for key in state_dict.keys(): + if not isinstance(key, str): + continue + if key.startswith(pytorch_indicators): + return True + if key.startswith(gguf_indicators): + return True + return False + + +def _has_ggml_tensors(state_dict: dict[str | int, Any]) -> bool: + """Check if state dict contains GGML tensors (GGUF quantized).""" + return any(isinstance(v, GGMLTensor) for v in state_dict.values()) + + +def _embed_hidden_size(state_dict: dict[str | int, Any]) -> int | None: + """Read the embedding hidden size from a Mistral-like state dict. + + Returns None if no recognized embedding tensor is present. + """ + candidate_keys = ( + "model.embed_tokens.weight", + "language_model.model.embed_tokens.weight", + "token_embd.weight", + ) + for key in candidate_keys: + if key not in state_dict: + continue + tensor = state_dict[key] + if isinstance(tensor, GGMLTensor): + shape = getattr(tensor, "tensor_shape", None) or getattr(tensor, "shape", None) + else: + shape = getattr(tensor, "shape", None) + if shape is not None and len(shape) >= 2: + return int(shape[1]) + return None + + +def _get_mistral_variant_from_state_dict(state_dict: dict[str | int, Any]) -> Optional[MistralVariantType]: + """Determine the Mistral variant from a state dict based on hidden_size. + + Only Mistral Small 3.1 (hidden_size=5120) is currently recognized. + """ + hidden_size = _embed_hidden_size(state_dict) + if hidden_size == _MISTRAL_SMALL_3_1_HIDDEN_SIZE: + return MistralVariantType.Small3_1 + return None + + +def _get_mistral_variant_from_config(config_path) -> MistralVariantType: + """Determine Mistral variant from a config.json (hidden_size or text_config.hidden_size).""" + try: + with open(config_path, "r", encoding="utf-8") as f: + config = json.load(f) + except (json.JSONDecodeError, OSError): + return MistralVariantType.Small3_1 + + # Mistral3ForConditionalGeneration nests the LM config under text_config. + hidden_size = config.get("hidden_size") + if hidden_size is None: + text_config = config.get("text_config") or {} + hidden_size = text_config.get("hidden_size") + + if hidden_size == _MISTRAL_SMALL_3_1_HIDDEN_SIZE: + return MistralVariantType.Small3_1 + return MistralVariantType.Small3_1 + + +class MistralEncoder_Diffusers_Config(Config_Base): + """Configuration for a Mistral text encoder in HuggingFace transformers/diffusers folder layout. + + Matches: + - Full pipelines downloaded as just the `text_encoder/` subfolder + (e.g. `black-forest-labs/FLUX.2-dev/text_encoder/`) + - Quantized variants such as `diffusers/FLUX.2-dev-bnb-4bit/text_encoder/` + + Does NOT match a full FLUX.2 pipeline directory — those are picked up by the + `Main_Diffusers_Flux2_Config` instead. + """ + + base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) + type: Literal[ModelType.MistralEncoder] = Field(default=ModelType.MistralEncoder) + format: Literal[ModelFormat.MistralEncoder] = Field(default=ModelFormat.MistralEncoder) + cpu_only: bool | None = Field(default=None, description="Whether this model should run on CPU only") + variant: MistralVariantType = Field(description="Mistral text encoder variant") + + @classmethod + def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) -> Self: + raise_if_not_dir(mod) + + raise_for_override_fields(cls, override_fields) + + # Exclude full pipeline models; those should match Main_Diffusers_Flux2_Config. + if (mod.path / "model_index.json").exists() or (mod.path / "transformer").exists(): + raise NotAMatchError( + "directory looks like a full diffusers pipeline (has model_index.json or transformer/), " + "not a standalone Mistral encoder" + ) + + # Find config.json: either nested under text_encoder/ or at the directory root. + config_path_nested = mod.path / "text_encoder" / "config.json" + config_path_direct = mod.path / "config.json" + if config_path_nested.exists(): + expected_config_path = config_path_nested + elif config_path_direct.exists(): + expected_config_path = config_path_direct + else: + raise NotAMatchError(f"no config.json found at {config_path_nested} or {config_path_direct}") + + raise_for_class_name( + expected_config_path, + { + "Mistral3ForConditionalGeneration", + "MistralModel", + "MistralForCausalLM", + }, + ) + + variant = _get_mistral_variant_from_config(expected_config_path) + + return cls(variant=variant, **override_fields) + + +class MistralEncoder_Checkpoint_Config(Checkpoint_Config_Base, Config_Base): + """Configuration for a single-file Mistral text encoder (safetensors).""" + + base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) + type: Literal[ModelType.MistralEncoder] = Field(default=ModelType.MistralEncoder) + format: Literal[ModelFormat.Checkpoint] = Field(default=ModelFormat.Checkpoint) + cpu_only: bool | None = Field(default=None, description="Whether this model should run on CPU only") + variant: MistralVariantType = Field(description="Mistral text encoder variant") + + @classmethod + def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) -> Self: + raise_if_not_file(mod) + + raise_for_override_fields(cls, override_fields) + + state_dict = mod.load_state_dict() + + if not _has_mistral_keys(state_dict): + raise NotAMatchError("state dict does not look like a Mistral encoder") + + if _has_ggml_tensors(state_dict): + raise NotAMatchError("state dict looks like GGUF quantized") + + variant = _get_mistral_variant_from_state_dict(state_dict) + if variant is None: + raise NotAMatchError("hidden size does not match a known Mistral variant") + + return cls(variant=variant, **override_fields) + + +class MistralEncoder_GGUF_Config(Checkpoint_Config_Base, Config_Base): + """Configuration for a GGUF-quantized Mistral text encoder.""" + + base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) + type: Literal[ModelType.MistralEncoder] = Field(default=ModelType.MistralEncoder) + format: Literal[ModelFormat.GGUFQuantized] = Field(default=ModelFormat.GGUFQuantized) + cpu_only: bool | None = Field(default=None, description="Whether this model should run on CPU only") + variant: MistralVariantType = Field(description="Mistral text encoder variant") + + @classmethod + def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) -> Self: + raise_if_not_file(mod) + + raise_for_override_fields(cls, override_fields) + + state_dict = mod.load_state_dict() + + if not _has_mistral_keys(state_dict): + raise NotAMatchError("state dict does not look like a Mistral encoder") + + if not _has_ggml_tensors(state_dict): + raise NotAMatchError("state dict does not look like GGUF quantized") + + variant = _get_mistral_variant_from_state_dict(state_dict) + if variant is None: + # Fall back to Small 3.1 — this is the only Mistral encoder used by FLUX.2 today. + variant = MistralVariantType.Small3_1 + + return cls(variant=variant, **override_fields) diff --git a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py new file mode 100644 index 00000000000..ad4f38753dc --- /dev/null +++ b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py @@ -0,0 +1,448 @@ +# Copyright (c) 2026, The InvokeAI Development Team +"""Model loaders for the Mistral text encoder used by FLUX.2 [dev]. + +FLUX.2 [dev] uses Mistral Small 3.1 (24B) as its sole text encoder. The diffusers +release ships it as the multimodal `Mistral3ForConditionalGeneration`; standalone +single-file safetensors and GGUF redistributions typically contain only the text +tower, which we load as an encoder-only `MistralModel`. +""" + +from pathlib import Path +from typing import Any, Optional + +import accelerate +import torch +from transformers import AutoProcessor, MistralConfig, MistralModel + +from invokeai.backend.model_manager.configs.factory import AnyModelConfig +from invokeai.backend.model_manager.configs.mistral_encoder import ( + MistralEncoder_Checkpoint_Config, + MistralEncoder_Diffusers_Config, + MistralEncoder_GGUF_Config, +) +from invokeai.backend.model_manager.load.load_default import ModelLoader +from invokeai.backend.model_manager.load.model_loader_registry import ModelLoaderRegistry +from invokeai.backend.model_manager.taxonomy import ( + AnyModel, + BaseModelType, + ModelFormat, + ModelType, + SubModelType, +) +from invokeai.backend.quantization.gguf.ggml_tensor import GGMLTensor +from invokeai.backend.quantization.gguf.loaders import gguf_sd_loader +from invokeai.backend.util.devices import TorchDevice +from invokeai.backend.util.logging import InvokeAILogger + +# Architecture constants for Mistral Small 3.1 (used by FLUX.2 [dev]). +# Sourced from the FLUX.2-dev `text_encoder/config.json` (text-model side of the +# Mistral3 multimodal stack). Layers/heads/head_dim are needed when reconstructing +# the model from a state dict (single-file or GGUF) because the architecture is +# not embedded in those files. +_MISTRAL_SMALL_3_1_HIDDEN_SIZE = 5120 +_MISTRAL_SMALL_3_1_INTERMEDIATE_SIZE = 32768 +_MISTRAL_SMALL_3_1_NUM_HIDDEN_LAYERS = 40 +_MISTRAL_SMALL_3_1_NUM_ATTENTION_HEADS = 32 +_MISTRAL_SMALL_3_1_NUM_KV_HEADS = 8 # grouped-query attention +_MISTRAL_SMALL_3_1_HEAD_DIM = 128 +_MISTRAL_SMALL_3_1_VOCAB_SIZE = 131072 +_MISTRAL_SMALL_3_1_MAX_POSITION_EMBEDDINGS = 131072 +_MISTRAL_SMALL_3_1_ROPE_THETA = 1000000.0 +_MISTRAL_SMALL_3_1_RMS_NORM_EPS = 1e-5 + +# Default tokenizer / processor source. The official Mistral repo requires +# accepting a license; FLUX.2-dev embeds the same processor under `tokenizer/` +# and is the canonical companion for image-generation use. +_DEFAULT_PROCESSOR_SOURCE = "black-forest-labs/FLUX.2-dev" +_DEFAULT_PROCESSOR_SUBFOLDER = "tokenizer" + + +def _build_mistral_config( + state_dict: dict[str, Any], + torch_dtype: torch.dtype, +) -> MistralConfig: + """Build a transformers ``MistralConfig`` from a Mistral Small 3.1 state dict. + + Reads the bulk shapes from the state dict (vocab, hidden, heads, kv_heads, + intermediate, layer count) so we can also handle non-Small-3.1 Mistrals that + happen to be wired through this loader. + """ + # Vocab and hidden_size come from embed_tokens. + embed_key = "model.embed_tokens.weight" if "model.embed_tokens.weight" in state_dict else None + if embed_key is None: + raise ValueError("State dict does not contain model.embed_tokens.weight") + embed = state_dict[embed_key] + embed_shape = embed.tensor_shape if isinstance(embed, GGMLTensor) else embed.shape + vocab_size, hidden_size = int(embed_shape[0]), int(embed_shape[1]) + + # Count layers by scanning self_attn.q_proj keys. + layer_indices: set[int] = set() + for key in state_dict.keys(): + if not isinstance(key, str): + continue + if key.startswith("model.layers.") and ".self_attn.q_proj.weight" in key: + try: + layer_indices.add(int(key.split(".")[2])) + except (ValueError, IndexError): + pass + num_hidden_layers = (max(layer_indices) + 1) if layer_indices else _MISTRAL_SMALL_3_1_NUM_HIDDEN_LAYERS + + # Derive head counts from the first layer's attention projections. + q_proj = state_dict.get("model.layers.0.self_attn.q_proj.weight") + k_proj = state_dict.get("model.layers.0.self_attn.k_proj.weight") + gate_proj = state_dict.get("model.layers.0.mlp.gate_proj.weight") + head_dim = _MISTRAL_SMALL_3_1_HEAD_DIM + if q_proj is not None and k_proj is not None and gate_proj is not None: + q_shape = q_proj.tensor_shape if isinstance(q_proj, GGMLTensor) else q_proj.shape + k_shape = k_proj.tensor_shape if isinstance(k_proj, GGMLTensor) else k_proj.shape + gate_shape = gate_proj.tensor_shape if isinstance(gate_proj, GGMLTensor) else gate_proj.shape + num_attention_heads = int(q_shape[0]) // head_dim + num_key_value_heads = int(k_shape[0]) // head_dim + intermediate_size = int(gate_shape[0]) + else: + num_attention_heads = _MISTRAL_SMALL_3_1_NUM_ATTENTION_HEADS + num_key_value_heads = _MISTRAL_SMALL_3_1_NUM_KV_HEADS + intermediate_size = _MISTRAL_SMALL_3_1_INTERMEDIATE_SIZE + + return MistralConfig( + vocab_size=vocab_size, + hidden_size=hidden_size, + intermediate_size=intermediate_size, + num_hidden_layers=num_hidden_layers, + num_attention_heads=num_attention_heads, + num_key_value_heads=num_key_value_heads, + head_dim=head_dim, + max_position_embeddings=_MISTRAL_SMALL_3_1_MAX_POSITION_EMBEDDINGS, + rms_norm_eps=_MISTRAL_SMALL_3_1_RMS_NORM_EPS, + tie_word_embeddings=False, + rope_theta=_MISTRAL_SMALL_3_1_ROPE_THETA, + attention_bias=False, + attention_dropout=0.0, + torch_dtype=torch_dtype, + ) + + +def _strip_known_prefixes(sd: dict[str, Any]) -> dict[str, Any]: + """Strip wrapper prefixes used by some FLUX.2 single-file redistributions. + + Comfy-Org and similar packagers sometimes prefix Mistral keys with + ``text_encoder.`` or ``language_model.`` (the latter coming from the + multimodal Mistral3 stack). We normalize everything to plain ``model.*``. + """ + out: dict[str, Any] = {} + for key, value in sd.items(): + if not isinstance(key, str): + out[key] = value + continue + new_key = key + for prefix in ("text_encoder.", "language_model."): + if new_key.startswith(prefix): + new_key = new_key[len(prefix) :] + break + out[new_key] = value + return out + + +def _drop_quantization_metadata(sd: dict[str, Any], logger) -> dict[str, Any]: + """Dequantize Comfy-Org-style FP8/FP4 weights and drop their metadata keys. + + Comfy-Org's Mistral FLUX.2 redistributions store quantized weights alongside + ``*.weight_scale`` (and occasionally ``*.input_scale``) tensors. We apply the + scale in-place and remove the metadata so transformers can load the result. + """ + weight_scale_keys = [k for k in sd.keys() if isinstance(k, str) and k.endswith(".weight_scale")] + dequantized = 0 + for scale_key in weight_scale_keys: + weight_key = scale_key[: -len(".weight_scale")] + ".weight" + if weight_key not in sd: + continue + weight = sd[weight_key].float() + scale = sd[scale_key].float() + if scale.shape != weight.shape and scale.numel() > 1: + for dim in range(len(weight.shape)): + if dim < len(scale.shape) and scale.shape[dim] != weight.shape[dim]: + block = weight.shape[dim] // scale.shape[dim] + if block > 1: + scale = scale.repeat_interleave(block, dim=dim) + sd[weight_key] = weight * scale + dequantized += 1 + if dequantized: + logger.info(f"Dequantized {dequantized} Comfy-Org-style quantized weights") + + drop_suffixes = (".weight_scale", ".input_scale", ".scale") + drop_keys = [ + k + for k in sd.keys() + if isinstance(k, str) and (k.endswith(drop_suffixes) or "comfy_quant" in k or k.startswith("scaled_fp8")) + ] + for k in drop_keys: + del sd[k] + return sd + + +def _load_processor_with_offline_fallback() -> AnyModel: + """Load the FLUX.2 Mistral processor (tokenizer + chat template) from cache, else HF.""" + try: + return AutoProcessor.from_pretrained( + _DEFAULT_PROCESSOR_SOURCE, + subfolder=_DEFAULT_PROCESSOR_SUBFOLDER, + local_files_only=True, + ) + except (OSError, EnvironmentError): + return AutoProcessor.from_pretrained( + _DEFAULT_PROCESSOR_SOURCE, + subfolder=_DEFAULT_PROCESSOR_SUBFOLDER, + ) + + +@ModelLoaderRegistry.register( + base=BaseModelType.Any, + type=ModelType.MistralEncoder, + format=ModelFormat.MistralEncoder, +) +class MistralEncoderDiffusersLoader(ModelLoader): + """Load a Mistral text encoder from a HuggingFace folder layout. + + Handles both the full FLUX.2-dev pipeline layout (with sibling ``tokenizer/``) + and a standalone download where ``text_encoder/`` files live at the root. + """ + + def _load_model( + self, + config: AnyModelConfig, + submodel_type: Optional[SubModelType] = None, + ) -> AnyModel: + if not isinstance(config, MistralEncoder_Diffusers_Config): + raise ValueError("Only MistralEncoder_Diffusers_Config models are supported here.") + + model_path = Path(config.path) + text_encoder_path = model_path / "text_encoder" + tokenizer_path = model_path / "tokenizer" + + # Standalone download: text_encoder files at the root. + if not text_encoder_path.exists() and (model_path / "config.json").exists(): + text_encoder_path = model_path + if not tokenizer_path.exists(): + # If tokenizer was not co-downloaded, fall back to root (some standalone + # downloads include processor files alongside the encoder weights). + tokenizer_path = model_path + + target_device = TorchDevice.choose_torch_device() + model_dtype = TorchDevice.choose_bfloat16_safe_dtype(target_device) + + match submodel_type: + case SubModelType.Tokenizer: + try: + return AutoProcessor.from_pretrained(tokenizer_path, local_files_only=True) + except (OSError, EnvironmentError): + # Fall back to the canonical FLUX.2-dev tokenizer subfolder on HF. + return _load_processor_with_offline_fallback() + case SubModelType.TextEncoder: + # Lazy import: transformers may load `Mistral3ForConditionalGeneration` + # only when the diffusers/transformers version supports it. + from transformers import AutoModel + + return AutoModel.from_pretrained( + text_encoder_path, + torch_dtype=model_dtype, + low_cpu_mem_usage=True, + local_files_only=True, + ) + + raise ValueError( + "Only Tokenizer and TextEncoder submodels are supported. " + f"Received: {submodel_type.value if submodel_type else 'None'}" + ) + + +@ModelLoaderRegistry.register( + base=BaseModelType.Any, + type=ModelType.MistralEncoder, + format=ModelFormat.Checkpoint, +) +class MistralEncoderCheckpointLoader(ModelLoader): + """Load a Mistral encoder from a single safetensors file (text-only).""" + + def _load_model( + self, + config: AnyModelConfig, + submodel_type: Optional[SubModelType] = None, + ) -> AnyModel: + if not isinstance(config, MistralEncoder_Checkpoint_Config): + raise ValueError("Only MistralEncoder_Checkpoint_Config models are supported here.") + + match submodel_type: + case SubModelType.TextEncoder: + return self._load_text_encoder(config) + case SubModelType.Tokenizer: + return _load_processor_with_offline_fallback() + + raise ValueError( + "Only Tokenizer and TextEncoder submodels are supported. " + f"Received: {submodel_type.value if submodel_type else 'None'}" + ) + + def _load_text_encoder(self, config: MistralEncoder_Checkpoint_Config) -> AnyModel: + from safetensors.torch import load_file + + logger = InvokeAILogger.get_logger(self.__class__.__name__) + target_device = TorchDevice.choose_torch_device() + model_dtype = TorchDevice.choose_bfloat16_safe_dtype(target_device) + + sd = load_file(Path(config.path)) + sd = _strip_known_prefixes(sd) + sd = _drop_quantization_metadata(sd, logger) + + mistral_config = _build_mistral_config(sd, torch_dtype=model_dtype) + logger.info( + f"Mistral encoder config (checkpoint): layers={mistral_config.num_hidden_layers}, " + f"hidden={mistral_config.hidden_size}, heads={mistral_config.num_attention_heads}, " + f"kv_heads={mistral_config.num_key_value_heads}, intermediate={mistral_config.intermediate_size}" + ) + + # Cast tensors to compute dtype before loading. + for k in list(sd.keys()): + sd[k] = sd[k].to(model_dtype) + + with accelerate.init_empty_weights(): + model = MistralModel(mistral_config) + + missing, unexpected = model.load_state_dict(sd, strict=False, assign=True) + if unexpected: + logger.debug(f"Mistral encoder: ignored {len(unexpected)} unexpected keys") + if missing: + # Re-initialize any RMSNorm weights that may have been pruned during repackaging. + for name in missing: + if name.endswith(".weight") and "norm" in name: + try: + parent_name, attr = name.rsplit(".", 1) + parent = model.get_submodule(parent_name) + param = getattr(parent, attr) + if param.is_meta: + setattr( + parent, + attr, + torch.nn.Parameter(torch.ones(param.shape, dtype=model_dtype), requires_grad=False), + ) + except (AttributeError, ValueError): + continue + + # Re-init any remaining meta buffers (e.g. RoPE inv_freq is computed from config). + for name, buffer in list(model.named_buffers()): + if buffer.is_meta and name.endswith("inv_freq"): + parts = name.rsplit(".", 1) + parent = model.get_submodule(parts[0]) if len(parts) == 2 else model + inv_freq = 1.0 / ( + mistral_config.rope_theta + ** (torch.arange(0, mistral_config.head_dim, 2, dtype=torch.float32) / mistral_config.head_dim) + ) + parent.register_buffer(parts[-1], inv_freq.to(model_dtype), persistent=False) + + return model + + +@ModelLoaderRegistry.register( + base=BaseModelType.Any, + type=ModelType.MistralEncoder, + format=ModelFormat.GGUFQuantized, +) +class MistralEncoderGGUFLoader(ModelLoader): + """Load a GGUF-quantized Mistral encoder (text-only).""" + + def _load_model( + self, + config: AnyModelConfig, + submodel_type: Optional[SubModelType] = None, + ) -> AnyModel: + if not isinstance(config, MistralEncoder_GGUF_Config): + raise ValueError("Only MistralEncoder_GGUF_Config models are supported here.") + + match submodel_type: + case SubModelType.TextEncoder: + return self._load_from_gguf(config) + case SubModelType.Tokenizer: + return _load_processor_with_offline_fallback() + + raise ValueError( + "Only Tokenizer and TextEncoder submodels are supported. " + f"Received: {submodel_type.value if submodel_type else 'None'}" + ) + + def _load_from_gguf(self, config: MistralEncoder_GGUF_Config) -> AnyModel: + logger = InvokeAILogger.get_logger(self.__class__.__name__) + target_device = TorchDevice.choose_torch_device() + compute_dtype = TorchDevice.choose_bfloat16_safe_dtype(target_device) + + sd = gguf_sd_loader(Path(config.path), compute_dtype=compute_dtype) + + # llama.cpp stores layers as `blk.N.*`. Normalize to transformers' `model.layers.N.*` if needed. + is_llamacpp = any(isinstance(k, str) and k.startswith("blk.") for k in sd.keys()) + if is_llamacpp: + logger.info("Detected llama.cpp GGUF format, converting keys to transformers format") + sd = _convert_llamacpp_mistral_to_pytorch(sd) + + sd = _strip_known_prefixes(sd) + + mistral_config = _build_mistral_config(sd, torch_dtype=compute_dtype) + logger.info( + f"Mistral encoder config (GGUF): layers={mistral_config.num_hidden_layers}, " + f"hidden={mistral_config.hidden_size}, heads={mistral_config.num_attention_heads}, " + f"kv_heads={mistral_config.num_key_value_heads}, intermediate={mistral_config.intermediate_size}" + ) + + with accelerate.init_empty_weights(): + model = MistralModel(mistral_config) + + model.load_state_dict(sd, strict=False, assign=True) + + # Embedding lookups require an indexable tensor — dequantize the GGMLTensor for embed_tokens. + embed_weight = model.embed_tokens.weight + if isinstance(embed_weight, GGMLTensor): + model.embed_tokens.weight = torch.nn.Parameter(embed_weight.get_dequantized_tensor(), requires_grad=False) + + for name, buffer in list(model.named_buffers()): + if buffer.is_meta and name.endswith("inv_freq"): + parts = name.rsplit(".", 1) + parent = model.get_submodule(parts[0]) if len(parts) == 2 else model + inv_freq = 1.0 / ( + mistral_config.rope_theta + ** (torch.arange(0, mistral_config.head_dim, 2, dtype=torch.float32) / mistral_config.head_dim) + ) + parent.register_buffer(parts[-1], inv_freq.to(compute_dtype), persistent=False) + + return model + + +def _convert_llamacpp_mistral_to_pytorch(sd: dict[str, Any]) -> dict[str, Any]: + """Rename llama.cpp Mistral keys to the transformers layout.""" + key_map = { + "token_embd.weight": "model.embed_tokens.weight", + "output_norm.weight": "model.norm.weight", + "output.weight": "lm_head.weight", + } + out: dict[str, Any] = {} + for key, value in sd.items(): + if not isinstance(key, str): + out[key] = value + continue + if key in key_map: + out[key_map[key]] = value + continue + # Per-layer keys: `blk.N.` -> `model.layers.N.` + if key.startswith("blk."): + parts = key.split(".", 2) # ["blk", "", ""] + if len(parts) == 3: + rest = parts[2] + rest = rest.replace("attn_q.", "self_attn.q_proj.") + rest = rest.replace("attn_k.", "self_attn.k_proj.") + rest = rest.replace("attn_v.", "self_attn.v_proj.") + rest = rest.replace("attn_output.", "self_attn.o_proj.") + rest = rest.replace("attn_norm.", "input_layernorm.") + rest = rest.replace("ffn_norm.", "post_attention_layernorm.") + rest = rest.replace("ffn_gate.", "mlp.gate_proj.") + rest = rest.replace("ffn_up.", "mlp.up_proj.") + rest = rest.replace("ffn_down.", "mlp.down_proj.") + out[f"model.layers.{parts[1]}.{rest}"] = value + continue + out[key] = value + return out diff --git a/invokeai/backend/model_manager/starter_models.py b/invokeai/backend/model_manager/starter_models.py index 2ab3b2767ee..82c213f7689 100644 --- a/invokeai/backend/model_manager/starter_models.py +++ b/invokeai/backend/model_manager/starter_models.py @@ -1022,6 +1022,76 @@ class StarterModelBundle(BaseModel): ) # endregion +# region FLUX.2 [dev] +# +# FLUX.2 [dev] is BFL's 32B guidance-distilled rectified-flow model and uses Mistral +# Small 3.1 (24B) as its sole text encoder. The transformer alone is ~64 GB at full +# bf16, so we surface several quantized variants. All FLUX.2 [dev] releases are +# governed by the FLUX.2 Non-Commercial License. + +flux2_dev_mistral_encoder = StarterModel( + name="FLUX.2 [dev] Mistral Encoder", + base=BaseModelType.Any, + source="black-forest-labs/FLUX.2-dev::text_encoder+tokenizer", + description="Mistral Small 3.1 (24B) text encoder + tokenizer for FLUX.2 [dev]. ~48GB bf16", + type=ModelType.MistralEncoder, +) + +flux2_dev_mistral_encoder_nf4 = StarterModel( + name="FLUX.2 [dev] Mistral Encoder (NF4)", + base=BaseModelType.Any, + source="diffusers/FLUX.2-dev-bnb-4bit::text_encoder+tokenizer", + description="NF4-quantized Mistral Small 3.1 text encoder for FLUX.2 [dev]. ~12GB", + type=ModelType.MistralEncoder, +) + +flux2_dev_diffusers = StarterModel( + name="FLUX.2 [dev] (Diffusers)", + base=BaseModelType.Flux2, + source="black-forest-labs/FLUX.2-dev", + description="FLUX.2 [dev] full Diffusers pipeline - includes transformer, VAE, and Mistral text encoder. ~80GB. Non-Commercial License.", + type=ModelType.Main, +) + +flux2_dev_diffusers_nf4 = StarterModel( + name="FLUX.2 [dev] (Diffusers, NF4)", + base=BaseModelType.Flux2, + source="diffusers/FLUX.2-dev-bnb-4bit", + description="FLUX.2 [dev] with NF4-quantized DiT and text encoder - runs on ~18GB VRAM with offload. Non-Commercial License.", + type=ModelType.Main, +) + +flux2_dev_gguf_q4 = StarterModel( + name="FLUX.2 [dev] (GGUF Q4)", + base=BaseModelType.Flux2, + source="https://huggingface.co/city96/FLUX.2-dev-gguf/resolve/main/flux2_dev_Q4_K_M.gguf", + description="FLUX.2 [dev] transformer, GGUF Q4_K_M - ~18.7GB. Requires a separate FLUX.2 VAE and a Mistral encoder.", + type=ModelType.Main, + format=ModelFormat.GGUFQuantized, + dependencies=[flux2_vae, flux2_dev_mistral_encoder_nf4], +) + +flux2_dev_gguf_q6 = StarterModel( + name="FLUX.2 [dev] (GGUF Q6)", + base=BaseModelType.Flux2, + source="https://huggingface.co/city96/FLUX.2-dev-gguf/resolve/main/flux2_dev_Q6_K.gguf", + description="FLUX.2 [dev] transformer, GGUF Q6_K - ~26.7GB. Requires a separate FLUX.2 VAE and a Mistral encoder.", + type=ModelType.Main, + format=ModelFormat.GGUFQuantized, + dependencies=[flux2_vae, flux2_dev_mistral_encoder_nf4], +) + +flux2_dev_gguf_q8 = StarterModel( + name="FLUX.2 [dev] (GGUF Q8)", + base=BaseModelType.Flux2, + source="https://huggingface.co/city96/FLUX.2-dev-gguf/resolve/main/flux2_dev_Q8_0.gguf", + description="FLUX.2 [dev] transformer, GGUF Q8_0 - ~34.5GB. Requires a separate FLUX.2 VAE and a Mistral encoder.", + type=ModelType.Main, + format=ModelFormat.GGUFQuantized, + dependencies=[flux2_vae, flux2_dev_mistral_encoder_nf4], +) +# endregion + # region Z-Image z_image_qwen3_encoder = StarterModel( name="Z-Image Qwen3 Text Encoder", @@ -1663,6 +1733,13 @@ def _gemini_3_resolution_presets( flux2_klein_9b_gguf_q8, flux2_klein_qwen3_4b_encoder, flux2_klein_qwen3_8b_encoder, + flux2_dev_mistral_encoder, + flux2_dev_mistral_encoder_nf4, + flux2_dev_diffusers, + flux2_dev_diffusers_nf4, + flux2_dev_gguf_q4, + flux2_dev_gguf_q6, + flux2_dev_gguf_q8, cogview4, qwen_image_vae, qwen_vl_encoder_fp8, diff --git a/invokeai/backend/model_manager/taxonomy.py b/invokeai/backend/model_manager/taxonomy.py index a2e4e58bdc4..a7bcfff286f 100644 --- a/invokeai/backend/model_manager/taxonomy.py +++ b/invokeai/backend/model_manager/taxonomy.py @@ -47,7 +47,7 @@ class BaseModelType(str, Enum): Flux = "flux" """Indicates the model is associated with FLUX.1 model architecture, including FLUX Dev, Schnell and Fill.""" Flux2 = "flux2" - """Indicates the model is associated with FLUX.2 model architecture, including FLUX2 Klein.""" + """Indicates the model is associated with FLUX.2 model architecture, including FLUX.2 Klein and FLUX.2 [dev].""" CogView4 = "cogview4" """Indicates the model is associated with CogView 4 model architecture.""" ZImage = "z-image" @@ -79,6 +79,7 @@ class ModelType(str, Enum): T5Encoder = "t5_encoder" Qwen3Encoder = "qwen3_encoder" QwenVLEncoder = "qwen_vl_encoder" + MistralEncoder = "mistral_encoder" SpandrelImageToImage = "spandrel_image_to_image" SigLIP = "siglip" FluxRedux = "flux_redux" @@ -144,6 +145,9 @@ class Flux2VariantType(str, Enum): Klein9BBase = "klein_9b_base" """Flux2 Klein 9B Base variant - undistilled foundation model using Qwen3 8B text encoder.""" + Dev = "dev" + """FLUX.2 [dev] - 32B rectified flow transformer using Mistral Small 3.1 text encoder (guidance-distilled).""" + class ZImageVariantType(str, Enum): """Z-Image model variants.""" @@ -178,6 +182,13 @@ class Qwen3VariantType(str, Enum): """Qwen3 0.6B text encoder (hidden_size=1024). Used by Anima.""" +class MistralVariantType(str, Enum): + """Mistral text encoder variants used by FLUX.2 [dev].""" + + Small3_1 = "mistral_small_3_1" + """Mistral Small 3.1 (24B, hidden_size=5120). Used by FLUX.2 [dev].""" + + class ModelFormat(str, Enum): """Storage format of model.""" @@ -193,6 +204,7 @@ class ModelFormat(str, Enum): T5Encoder = "t5_encoder" Qwen3Encoder = "qwen3_encoder" QwenVLEncoder = "qwen_vl_encoder" + MistralEncoder = "mistral_encoder" BnbQuantizedLlmInt8b = "bnb_quantized_int8b" BnbQuantizednf4b = "bnb_quantized_nf4b" GGUFQuantized = "gguf_quantized" @@ -249,6 +261,7 @@ class FluxLoRAFormat(str, Enum): ZImageVariantType, QwenImageVariantType, Qwen3VariantType, + MistralVariantType, ] variant_type_adapter = TypeAdapter[ ModelVariantType @@ -258,6 +271,7 @@ class FluxLoRAFormat(str, Enum): | ZImageVariantType | QwenImageVariantType | Qwen3VariantType + | MistralVariantType ]( ModelVariantType | ClipVariantType @@ -266,4 +280,5 @@ class FluxLoRAFormat(str, Enum): | ZImageVariantType | QwenImageVariantType | Qwen3VariantType + | MistralVariantType ) diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts index 9443001c2d7..64f284c5703 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts @@ -184,6 +184,9 @@ function buildMockState(overrides: Record = {}) { animaScheduler: 'euler', kleinVaeModel: null, kleinQwen3EncoderModel: null, + flux2DevVaeModel: null, + flux2DevMistralEncoderModel: null, + flux2DevSourceModel: null, zImageScheduler: 'euler', ...overrides, }, diff --git a/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts index a5200ef1ff8..312b857c3a7 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts @@ -261,6 +261,30 @@ const slice = createSlice({ } state.kleinQwen3EncoderModel = result.data; }, + flux2DevVaeModelSelected: (state, action: PayloadAction) => { + const result = zParamsState.shape.flux2DevVaeModel.safeParse(action.payload); + if (!result.success) { + return; + } + state.flux2DevVaeModel = result.data; + }, + flux2DevMistralEncoderModelSelected: ( + state, + action: PayloadAction<{ key: string; name: string; base: string } | null> + ) => { + const result = zParamsState.shape.flux2DevMistralEncoderModel.safeParse(action.payload); + if (!result.success) { + return; + } + state.flux2DevMistralEncoderModel = result.data; + }, + flux2DevSourceModelSelected: (state, action: PayloadAction) => { + const result = zParamsState.shape.flux2DevSourceModel.safeParse(action.payload); + if (!result.success) { + return; + } + state.flux2DevSourceModel = result.data; + }, qwenImageComponentSourceSelected: (state, action: PayloadAction) => { const result = zParamsState.shape.qwenImageComponentSource.safeParse(action.payload); if (!result.success) { @@ -605,6 +629,9 @@ const resetState = (state: ParamsState): ParamsState => { newState.animaT5EncoderModel = oldState.animaT5EncoderModel; newState.kleinVaeModel = oldState.kleinVaeModel; newState.kleinQwen3EncoderModel = oldState.kleinQwen3EncoderModel; + newState.flux2DevVaeModel = oldState.flux2DevVaeModel; + newState.flux2DevMistralEncoderModel = oldState.flux2DevMistralEncoderModel; + newState.flux2DevSourceModel = oldState.flux2DevSourceModel; newState.qwenImageComponentSource = oldState.qwenImageComponentSource; newState.qwenImageVaeModel = oldState.qwenImageVaeModel; newState.qwenImageQwenVLEncoderModel = oldState.qwenImageQwenVLEncoderModel; @@ -657,6 +684,9 @@ export const { zImageQwen3SourceModelSelected, kleinVaeModelSelected, kleinQwen3EncoderModelSelected, + flux2DevVaeModelSelected, + flux2DevMistralEncoderModelSelected, + flux2DevSourceModelSelected, qwenImageComponentSourceSelected, qwenImageVaeModelSelected, qwenImageQwenVLEncoderModelSelected, @@ -778,6 +808,11 @@ export const selectAnimaT5EncoderModel = createParamsSelector((params) => params export const selectAnimaScheduler = createParamsSelector((params) => params.animaScheduler); export const selectKleinVaeModel = createParamsSelector((params) => params.kleinVaeModel); export const selectKleinQwen3EncoderModel = createParamsSelector((params) => params.kleinQwen3EncoderModel); +export const selectFlux2DevVaeModel = createParamsSelector((params) => params.flux2DevVaeModel); +export const selectFlux2DevMistralEncoderModel = createParamsSelector( + (params) => params.flux2DevMistralEncoderModel +); +export const selectFlux2DevSourceModel = createParamsSelector((params) => params.flux2DevSourceModel); export const selectQwenImageComponentSource = createParamsSelector((params) => params.qwenImageComponentSource); export const selectQwenImageVaeModel = createParamsSelector((params) => params.qwenImageVaeModel); export const selectQwenImageQwenVLEncoderModel = createParamsSelector((params) => params.qwenImageQwenVLEncoderModel); @@ -984,3 +1019,17 @@ export const selectMainModelConfig = createSelector(selectModelConfig, (modelCon } return modelConfig; }); + +export const selectIsFlux2Dev = createSelector(selectMainModelConfig, (modelConfig) => { + if (!modelConfig || modelConfig.base !== 'flux2') { + return false; + } + return 'variant' in modelConfig && modelConfig.variant === 'dev'; +}); + +export const selectIsFlux2Klein = createSelector(selectMainModelConfig, (modelConfig) => { + if (!modelConfig || modelConfig.base !== 'flux2') { + return false; + } + return !('variant' in modelConfig) || modelConfig.variant !== 'dev'; +}); diff --git a/invokeai/frontend/web/src/features/controlLayers/store/types.ts b/invokeai/frontend/web/src/features/controlLayers/store/types.ts index cbeccdfa930..9fc90ac5dc4 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/types.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/types.ts @@ -837,6 +837,10 @@ export const zParamsState = z.object({ // Flux2 Klein model components - uses Qwen3 instead of CLIP+T5 kleinVaeModel: zParameterVAEModel.nullable(), // Optional: Separate FLUX.2 VAE for Klein kleinQwen3EncoderModel: zModelIdentifierField.nullable(), // Optional: Separate Qwen3 Encoder for Klein + // Flux2 [dev] model components - uses Mistral Small 3.1 (24B) text encoder + flux2DevVaeModel: zParameterVAEModel.nullable(), // Optional: Separate FLUX.2 VAE for [dev] + flux2DevMistralEncoderModel: zModelIdentifierField.nullable(), // Optional: Standalone Mistral encoder for [dev] + flux2DevSourceModel: zParameterModel.nullable(), // Diffusers FLUX.2 [dev] (fallback for VAE/Encoder) // Qwen Image Edit model components - GGUF transformer needs a Diffusers source for VAE/encoder qwenImageComponentSource: zParameterModel.nullable(), // Diffusers model providing VAE + text encoder qwenImageVaeModel: zParameterVAEModel.nullable(), // Optional: Standalone Qwen Image VAE checkpoint @@ -923,6 +927,9 @@ export const getInitialParamsState = (): ParamsState => ({ animaScheduler: 'euler', kleinVaeModel: null, kleinQwen3EncoderModel: null, + flux2DevVaeModel: null, + flux2DevMistralEncoderModel: null, + flux2DevSourceModel: null, qwenImageComponentSource: null, qwenImageVaeModel: null, qwenImageQwenVLEncoderModel: null, diff --git a/invokeai/frontend/web/src/features/modelManagerV2/models.ts b/invokeai/frontend/web/src/features/modelManagerV2/models.ts index cf295c9af6a..f86a39bb675 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/models.ts +++ b/invokeai/frontend/web/src/features/modelManagerV2/models.ts @@ -11,6 +11,7 @@ import { isIPAdapterModelConfig, isLLaVAModelConfig, isLoRAModelConfig, + isMistralEncoderModelConfig, isNonRefinerMainModelConfig, isQwen3EncoderModelConfig, isQwenVLEncoderModelConfig, @@ -85,6 +86,11 @@ const MODEL_CATEGORIES: Record = { i18nKey: 'modelManager.qwenVLEncoder', filter: isQwenVLEncoderModelConfig, }, + mistral_encoder: { + category: 'mistral_encoder', + i18nKey: 'modelManager.mistralEncoder', + filter: isMistralEncoderModelConfig, + }, control_lora: { category: 'control_lora', i18nKey: 'modelManager.controlLora', @@ -187,6 +193,7 @@ export const MODEL_TYPE_TO_LONG_NAME: Record = { t5_encoder: 'T5 Encoder', qwen3_encoder: 'Qwen3 Encoder', qwen_vl_encoder: 'Qwen2.5-VL Encoder', + mistral_encoder: 'Mistral Encoder', clip_embed: 'CLIP Embed', siglip: 'SigLIP', flux_redux: 'FLUX Redux', @@ -255,6 +262,7 @@ export const MODEL_VARIANT_TO_LONG_NAME: Record = { qwen3_4b: 'Qwen3 4B', qwen3_8b: 'Qwen3 8B', qwen3_06b: 'Qwen3 0.6B', + mistral_small_3_1: 'Mistral Small 3.1', }; export const MODEL_FORMAT_TO_LONG_NAME: Record = { @@ -271,6 +279,7 @@ export const MODEL_FORMAT_TO_LONG_NAME: Record = { t5_encoder: 'T5 Encoder', qwen3_encoder: 'Qwen3 Encoder', qwen_vl_encoder: 'Qwen2.5-VL Encoder', + mistral_encoder: 'Mistral Encoder', bnb_quantized_int8b: 'BNB Quantized (int8b)', bnb_quantized_nf4b: 'BNB Quantized (nf4b)', gguf_quantized: 'GGUF Quantized', diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelFormatBadge.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelFormatBadge.tsx index 71d2efe0e45..d1868a1e221 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelFormatBadge.tsx +++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelFormatBadge.tsx @@ -16,6 +16,7 @@ const FORMAT_NAME_MAP: Record = { t5_encoder: 't5_encoder', qwen3_encoder: 'qwen3_encoder', qwen_vl_encoder: 'qwen_vl_encoder', + mistral_encoder: 'mistral_encoder', bnb_quantized_int8b: 'bnb_quantized_int8b', bnb_quantized_nf4b: 'quantized', gguf_quantized: 'gguf', @@ -37,6 +38,7 @@ const FORMAT_COLOR_MAP: Record = { t5_encoder: 'base', qwen3_encoder: 'base', qwen_vl_encoder: 'base', + mistral_encoder: 'base', bnb_quantized_int8b: 'base', bnb_quantized_nf4b: 'base', gguf_quantized: 'base', diff --git a/invokeai/frontend/web/src/features/nodes/types/common.ts b/invokeai/frontend/web/src/features/nodes/types/common.ts index fb2a1ce946a..b4a46b5af99 100644 --- a/invokeai/frontend/web/src/features/nodes/types/common.ts +++ b/invokeai/frontend/web/src/features/nodes/types/common.ts @@ -134,6 +134,7 @@ export const zModelType = z.enum([ 't5_encoder', 'qwen3_encoder', 'qwen_vl_encoder', + 'mistral_encoder', 'clip_embed', 'siglip', 'flux_redux', @@ -160,10 +161,11 @@ export const zSubModelType = z.enum([ export const zClipVariantType = z.enum(['large', 'gigantic']); export const zModelVariantType = z.enum(['normal', 'inpaint', 'depth']); export const zFluxVariantType = z.enum(['dev', 'dev_fill', 'schnell']); -export const zFlux2VariantType = z.enum(['klein_4b', 'klein_4b_base', 'klein_9b', 'klein_9b_base']); +export const zFlux2VariantType = z.enum(['klein_4b', 'klein_4b_base', 'klein_9b', 'klein_9b_base', 'dev']); export const zZImageVariantType = z.enum(['turbo', 'zbase']); const zQwenImageVariantType = z.enum(['generate', 'edit']); export const zQwen3VariantType = z.enum(['qwen3_4b', 'qwen3_8b', 'qwen3_06b']); +export const zMistralVariantType = z.enum(['mistral_small_3_1']); export const zAnyModelVariant = z.union([ zModelVariantType, zClipVariantType, @@ -172,6 +174,7 @@ export const zAnyModelVariant = z.union([ zZImageVariantType, zQwenImageVariantType, zQwen3VariantType, + zMistralVariantType, ]); export type AnyModelVariant = z.infer; export const zModelFormat = z.enum([ @@ -187,6 +190,7 @@ export const zModelFormat = z.enum([ 't5_encoder', 'qwen3_encoder', 'qwen_vl_encoder', + 'mistral_encoder', 'bnb_quantized_int8b', 'bnb_quantized_nf4b', 'gguf_quantized', diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addFlux2DevLoRAs.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addFlux2DevLoRAs.ts new file mode 100644 index 00000000000..50c307dc49a --- /dev/null +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addFlux2DevLoRAs.ts @@ -0,0 +1,62 @@ +import type { RootState } from 'app/store/store'; +import { getPrefixedId } from 'features/controlLayers/konva/util'; +import { zModelIdentifierField } from 'features/nodes/types/common'; +import type { Graph } from 'features/nodes/util/graph/generation/Graph'; +import type { Invocation, S } from 'services/api/types'; + +/** + * Wire any enabled FLUX.2 LoRAs through a `flux2_dev_lora_collection_loader`, + * patching both the transformer and the Mistral text encoder. + */ +export const addFlux2DevLoRAs = ( + state: RootState, + g: Graph, + denoise: Invocation<'flux2_denoise'>, + modelLoader: Invocation<'flux2_dev_model_loader'>, + textEncoder: Invocation<'flux2_dev_text_encoder'> +): void => { + // Currently all `flux2` LoRAs share a single base value (the variant guard happens + // server-side in the dev LoRA loader, which warns on mismatches). + const enabledLoRAs = state.loras.loras.filter((l) => l.isEnabled && l.model.base === 'flux2'); + if (enabledLoRAs.length === 0) { + return; + } + + const loraMetadata: S['LoRAMetadataField'][] = []; + + const loraCollector = g.addNode({ + id: getPrefixedId('lora_collector'), + type: 'collect', + }); + const loraCollectionLoader = g.addNode({ + type: 'flux2_dev_lora_collection_loader', + id: getPrefixedId('flux2_dev_lora_collection_loader'), + }); + + g.addEdge(loraCollector, 'collection', loraCollectionLoader, 'loras'); + g.addEdge(modelLoader, 'transformer', loraCollectionLoader, 'transformer'); + g.addEdge(modelLoader, 'mistral_encoder', loraCollectionLoader, 'mistral_encoder'); + // Reroute the patched outputs back into the denoise / text encoder. + g.deleteEdgesTo(denoise, ['transformer']); + g.deleteEdgesTo(textEncoder, ['mistral_encoder']); + g.addEdge(loraCollectionLoader, 'transformer', denoise, 'transformer'); + g.addEdge(loraCollectionLoader, 'mistral_encoder', textEncoder, 'mistral_encoder'); + + for (const lora of enabledLoRAs) { + const { weight } = lora; + const parsedModel = zModelIdentifierField.parse(lora.model); + + const loraSelector = g.addNode({ + type: 'lora_selector', + id: getPrefixedId('lora_selector'), + lora: parsedModel, + weight, + }); + + loraMetadata.push({ model: parsedModel, weight }); + + g.addEdge(loraSelector, 'lora', loraCollector, 'item'); + } + + g.upsertMetadata({ loras: loraMetadata }); +}; diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts index bbe4adf7387..c5fe02b7cd4 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/addRegions.ts @@ -37,6 +37,7 @@ type AddRegionsArg = { | 'sdxl_compel_prompt' | 'flux_text_encoder' | 'flux2_klein_text_encoder' + | 'flux2_dev_text_encoder' | 'z_image_text_encoder' | 'anima_text_encoder' >; @@ -45,6 +46,7 @@ type AddRegionsArg = { | 'sdxl_compel_prompt' | 'flux_text_encoder' | 'flux2_klein_text_encoder' + | 'flux2_dev_text_encoder' | 'z_image_text_encoder' | 'anima_text_encoder' > | null; diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.test.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.test.ts index 5b9f3d0a468..86be4eb51ec 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.test.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.test.ts @@ -116,6 +116,8 @@ vi.mock('features/controlLayers/store/paramsSlice', () => ({ selectParamsSlice: vi.fn(() => mockParams), selectKleinVaeModel: vi.fn(() => currentKleinVae), selectKleinQwen3EncoderModel: vi.fn(() => currentKleinQwen3), + selectFlux2DevVaeModel: vi.fn(() => null), + selectFlux2DevMistralEncoderModel: vi.fn(() => null), })); vi.mock('features/controlLayers/store/refImagesSlice', () => ({ @@ -186,6 +188,7 @@ vi.mock('features/nodes/util/graph/generation/addIPAdapters', () => ({ vi.mock('services/api/hooks/modelsByType', () => ({ selectFlux2DiffusersModels: vi.fn(() => diffusersModels), + selectFlux2DevDiffusersModels: vi.fn(() => []), })); vi.mock('services/api/types', async () => { diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts index dafcd9310ec..ed9fefa1e44 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts @@ -1,6 +1,8 @@ import { logger } from 'app/logging/logger'; import { getPrefixedId } from 'features/controlLayers/konva/util'; import { + selectFlux2DevMistralEncoderModel, + selectFlux2DevVaeModel, selectKleinQwen3EncoderModel, selectKleinVaeModel, selectMainModelConfig, @@ -12,6 +14,7 @@ import { isFlux2ReferenceImageConfig, isFluxKontextReferenceImageConfig } from ' import { getGlobalReferenceImageWarnings } from 'features/controlLayers/store/validators'; import type { ModelIdentifierField } from 'features/nodes/types/common'; import { zImageField, zModelIdentifierField } from 'features/nodes/types/common'; +import { addFlux2DevLoRAs } from 'features/nodes/util/graph/generation/addFlux2DevLoRAs'; import { addFlux2KleinLoRAs } from 'features/nodes/util/graph/generation/addFlux2KleinLoRAs'; import { addFLUXFill } from 'features/nodes/util/graph/generation/addFLUXFill'; import { addFLUXLoRAs } from 'features/nodes/util/graph/generation/addFLUXLoRAs'; @@ -30,7 +33,7 @@ import { UnsupportedGenerationModeError } from 'features/nodes/util/graph/types' import { isFlux2KleinQwen3Compatible } from 'features/parameters/util/flux2Klein'; import { selectActiveTab } from 'features/ui/store/uiSelectors'; import { t } from 'i18next'; -import { selectFlux2DiffusersModels } from 'services/api/hooks/modelsByType'; +import { selectFlux2DevDiffusersModels, selectFlux2DiffusersModels } from 'services/api/hooks/modelsByType'; import type { Invocation } from 'services/api/types'; import type { Equals } from 'tsafe'; import { assert } from 'tsafe'; @@ -64,11 +67,15 @@ export const buildFLUXGraph = async (arg: GraphBuilderArg): Promise | Invocation<'flux2_klein_model_loader'>; - let posCond: Invocation<'flux_text_encoder'> | Invocation<'flux2_klein_text_encoder'>; + // Create model loader and text encoder nodes based on variant: + // - Standard FLUX uses CLIP + T5 + // - FLUX.2 Klein uses Qwen3 + // - FLUX.2 [dev] uses Mistral Small 3.1 + let modelLoader: + | Invocation<'flux_model_loader'> + | Invocation<'flux2_klein_model_loader'> + | Invocation<'flux2_dev_model_loader'>; + let posCond: + | Invocation<'flux_text_encoder'> + | Invocation<'flux2_klein_text_encoder'> + | Invocation<'flux2_dev_text_encoder'>; let denoise: Invocation<'flux_denoise'> | Invocation<'flux2_denoise'>; let posCondCollect: Invocation<'collect'> | null = null; @@ -142,7 +157,48 @@ export const buildFLUXGraph = async (arg: GraphBuilderArg): Promise; + const devCond = posCond as Invocation<'flux2_dev_text_encoder'>; + g.addEdge(devLoader, 'mistral_encoder', devCond, 'mistral_encoder'); + g.addEdge(devLoader, 'max_seq_len', devCond, 'max_seq_len'); + g.addEdge(devLoader, 'transformer', denoise, 'transformer'); + g.addEdge(devLoader, 'vae', l2i, 'vae'); + g.addEdge(positivePrompt, 'value', devCond, 'prompt'); + g.addEdge(devCond, 'conditioning', denoise, 'positive_text_conditioning'); + } else if (isFlux2Klein) { // Flux2 Klein: Use Qwen3-based model loader, text encoder, and dedicated denoise node // VAE and Qwen3 encoder can be extracted from the main Diffusers model or selected separately. // For non-diffusers main models, find a diffusers flux2 model to use as the source for VAE/encoder. @@ -244,7 +300,21 @@ export const buildFLUXGraph = async (arg: GraphBuilderArg): Promise = { + model: Graph.getModelMetadataField(model), + steps, + scheduler: fluxScheduler, + guidance, + }; + if (flux2DevVaeModel) { + flux2DevMetadata.vae = flux2DevVaeModel; + } + if (flux2DevMistralEncoderModel) { + flux2DevMetadata.mistral_encoder = flux2DevMistralEncoderModel; + } + g.upsertMetadata(flux2DevMetadata); + } else if (isFlux2) { // VAE and Qwen3 encoder can come from the main model or be selected separately const flux2Metadata: Record = { model: Graph.getModelMetadataField(model), @@ -277,8 +347,112 @@ export const buildFLUXGraph = async (arg: GraphBuilderArg): Promise = l2i; - // Flux2 Klein path - if (isFlux2) { + // FLUX.2 [dev] path. Mirrors the Klein wiring but with the dev model loader / encoder. + if (isFlux2Dev) { + const flux2Denoise = denoise as Invocation<'flux2_denoise'>; + const flux2DevLoader = modelLoader as Invocation<'flux2_dev_model_loader'>; + const flux2L2i = l2i as Invocation<'flux2_vae_decode'>; + const flux2DevCond = posCond as Invocation<'flux2_dev_text_encoder'>; + + addFlux2DevLoRAs(state, g, flux2Denoise, flux2DevLoader, flux2DevCond); + + // FLUX.2 [dev] has the same multi-reference image editing support as Klein + // (32-channel VAE encode + 4D RoPE position IDs are model-agnostic; the + // backend Flux2RefImageExtension handles both). + const validFlux2DevRefImageConfigs = selectRefImagesSlice(state) + .entities.filter((entity) => entity.isEnabled) + .filter((entity) => isFlux2ReferenceImageConfig(entity.config)) + .filter((entity) => getGlobalReferenceImageWarnings(entity, model).length === 0); + + if (validFlux2DevRefImageConfigs.length > 0) { + let prevCollect: Invocation<'collect'> | null = null; + for (const { config } of validFlux2DevRefImageConfigs) { + const kontextConditioning = g.addNode({ + type: 'flux_kontext', + id: getPrefixedId('flux_kontext'), + image: zImageField.parse(config.image?.crop?.image ?? config.image?.original.image), + }); + const collectNode = g.addNode({ + type: 'collect', + id: getPrefixedId('flux2_kontext_collect'), + }); + g.addEdge(kontextConditioning, 'kontext_cond', collectNode, 'item'); + if (prevCollect !== null) { + g.addEdge(prevCollect, 'collection', collectNode, 'collection'); + } + prevCollect = collectNode; + } + assert(prevCollect !== null); + g.addEdge(prevCollect, 'collection', flux2Denoise, 'kontext_conditioning'); + + g.upsertMetadata({ ref_images: validFlux2DevRefImageConfigs }, 'merge'); + } + + if (generationMode === 'txt2img') { + canvasOutput = addTextToImage({ + g, + state, + denoise: flux2Denoise, + l2i: flux2L2i, + }); + g.upsertMetadata({ generation_mode: 'flux2_txt2img' }); + } else if (generationMode === 'img2img') { + assert(manager !== null); + const i2l = g.addNode({ + type: 'flux2_vae_encode', + id: getPrefixedId('flux2_vae_encode'), + }); + canvasOutput = await addImageToImage({ + g, + state, + manager, + l2i: flux2L2i, + i2l, + denoise: flux2Denoise, + vaeSource: flux2DevLoader, + }); + g.upsertMetadata({ generation_mode: 'flux2_img2img' }); + } else if (generationMode === 'inpaint') { + assert(manager !== null); + const i2l = g.addNode({ + type: 'flux2_vae_encode', + id: getPrefixedId('flux2_vae_encode'), + }); + canvasOutput = await addInpaint({ + g, + state, + manager, + l2i: flux2L2i, + i2l, + denoise: flux2Denoise, + vaeSource: flux2DevLoader, + modelLoader: flux2DevLoader, + seed, + }); + g.upsertMetadata({ generation_mode: 'flux2_inpaint' }); + } else if (generationMode === 'outpaint') { + assert(manager !== null); + const i2l = g.addNode({ + type: 'flux2_vae_encode', + id: getPrefixedId('flux2_vae_encode'), + }); + canvasOutput = await addOutpaint({ + g, + state, + manager, + l2i: flux2L2i, + i2l, + denoise: flux2Denoise, + vaeSource: flux2DevLoader, + modelLoader: flux2DevLoader, + seed, + }); + g.upsertMetadata({ generation_mode: 'flux2_outpaint' }); + } else { + assert>(false); + } + } else if (isFlux2) { + // Flux2 Klein path const flux2Denoise = denoise as Invocation<'flux2_denoise'>; const flux2ModelLoader = modelLoader as Invocation<'flux2_klein_model_loader'>; const flux2L2i = l2i as Invocation<'flux2_vae_decode'>; diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/graphBuilderUtils.ts b/invokeai/frontend/web/src/features/nodes/util/graph/graphBuilderUtils.ts index 28aa74db5ec..860ba39f439 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/graphBuilderUtils.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/graphBuilderUtils.ts @@ -213,6 +213,7 @@ export const isMainModelWithoutUnet = (modelLoader: Invocation { + const dispatch = useAppDispatch(); + const { t } = useTranslation(); + const flux2DevVaeModel = useAppSelector(selectFlux2DevVaeModel); + const mainModelConfig = useAppSelector(selectMainModelConfig); + const [modelConfigs, { isLoading }] = useFlux2VAEModels(); + const [diffusersModels] = useFlux2DevDiffusersModels(); + + const _onChange = useCallback( + (model: VAEModelConfig | null) => { + if (model) { + dispatch(flux2DevVaeModelSelected(zModelIdentifierField.parse(model))); + } else { + dispatch(flux2DevVaeModelSelected(null)); + } + }, + [dispatch] + ); + + const { options, value, onChange, noOptionsMessage } = useModelCombobox({ + modelConfigs, + onChange: _onChange, + selectedModel: flux2DevVaeModel, + isLoading, + }); + + const hasDiffusersSource = mainModelConfig?.format === 'diffusers' || diffusersModels.length > 0; + const placeholder = hasDiffusersSource + ? t('modelManager.flux2DevVaePlaceholder', { defaultValue: 'Auto (from Diffusers source)' }) + : t('modelManager.flux2DevVaeNoModelPlaceholder', { defaultValue: 'Select a FLUX.2 VAE model' }); + + return ( + + {t('modelManager.flux2DevVae', { defaultValue: 'FLUX.2 [dev] VAE' })} + + + ); +}); + +ParamFlux2DevVaeModelSelect.displayName = 'ParamFlux2DevVaeModelSelect'; + +/** + * FLUX.2 [dev] Mistral Encoder Model Select. + * + * Selects the Mistral Small 3.1 text encoder used by FLUX.2 [dev]. Only needed + * when the main model is a single-file safetensors or GGUF without a Diffusers + * companion to extract the encoder from. + */ +const ParamFlux2DevMistralEncoderModelSelect = memo(() => { + const dispatch = useAppDispatch(); + const { t } = useTranslation(); + const mistralEncoderModel = useAppSelector(selectFlux2DevMistralEncoderModel); + const mainModelConfig = useAppSelector(selectMainModelConfig); + const [modelConfigs, { isLoading }] = useMistralEncoderModels(); + const [diffusersModels] = useFlux2DevDiffusersModels(); + + const _onChange = useCallback( + (model: MistralEncoderModelConfig | null) => { + if (model) { + dispatch(flux2DevMistralEncoderModelSelected(zModelIdentifierField.parse(model))); + } else { + dispatch(flux2DevMistralEncoderModelSelected(null)); + } + }, + [dispatch] + ); + + const { options, value, onChange, noOptionsMessage } = useModelCombobox({ + modelConfigs, + onChange: _onChange, + selectedModel: mistralEncoderModel, + isLoading, + }); + + const hasDiffusersSource = mainModelConfig?.format === 'diffusers' || diffusersModels.length > 0; + const placeholder = hasDiffusersSource + ? t('modelManager.flux2DevMistralEncoderPlaceholder', { defaultValue: 'Auto (from Diffusers source)' }) + : t('modelManager.flux2DevMistralEncoderNoModelPlaceholder', { + defaultValue: 'Select a Mistral text encoder', + }); + + return ( + + + {t('modelManager.flux2DevMistralEncoder', { defaultValue: 'FLUX.2 [dev] Mistral Encoder' })} + + + + ); +}); + +ParamFlux2DevMistralEncoderModelSelect.displayName = 'ParamFlux2DevMistralEncoderModelSelect'; + +/** + * Combined component for FLUX.2 [dev] companion model selection. + */ +const ParamFlux2DevModelSelects = () => { + return ( + <> + + + + ); +}; + +export default memo(ParamFlux2DevModelSelects); diff --git a/invokeai/frontend/web/src/features/settingsAccordions/components/AdvancedSettingsAccordion/AdvancedSettingsAccordion.tsx b/invokeai/frontend/web/src/features/settingsAccordions/components/AdvancedSettingsAccordion/AdvancedSettingsAccordion.tsx index bfb69b945c8..26bb8c6f59a 100644 --- a/invokeai/frontend/web/src/features/settingsAccordions/components/AdvancedSettingsAccordion/AdvancedSettingsAccordion.tsx +++ b/invokeai/frontend/web/src/features/settingsAccordions/components/AdvancedSettingsAccordion/AdvancedSettingsAccordion.tsx @@ -8,6 +8,7 @@ import { selectIsExternal, selectIsFLUX, selectIsFlux2, + selectIsFlux2Dev, selectIsQwenImage, selectIsSD3, selectIsZImage, @@ -20,6 +21,7 @@ import ParamCLIPEmbedModelSelect from 'features/parameters/components/Advanced/P import ParamCLIPGEmbedModelSelect from 'features/parameters/components/Advanced/ParamCLIPGEmbedModelSelect'; import ParamCLIPLEmbedModelSelect from 'features/parameters/components/Advanced/ParamCLIPLEmbedModelSelect'; import ParamClipSkip from 'features/parameters/components/Advanced/ParamClipSkip'; +import ParamFlux2DevModelSelect from 'features/parameters/components/Advanced/ParamFlux2DevModelSelect'; import ParamFlux2KleinModelSelect from 'features/parameters/components/Advanced/ParamFlux2KleinModelSelect'; import ParamQwenImageComponentSourceSelect from 'features/parameters/components/Advanced/ParamQwenImageComponentSourceSelect'; import ParamQwenImageQuantization from 'features/parameters/components/Advanced/ParamQwenImageQuantization'; @@ -49,6 +51,7 @@ export const AdvancedSettingsAccordion = memo(() => { const { currentData: vaeConfig } = useGetModelConfigQuery(vaeKey ?? skipToken); const isFLUX = useAppSelector(selectIsFLUX); const isFlux2 = useAppSelector(selectIsFlux2); + const isFlux2Dev = useAppSelector(selectIsFlux2Dev); const isSD3 = useAppSelector(selectIsSD3); const isZImage = useAppSelector(selectIsZImage); const isExternal = useAppSelector(selectIsExternal); @@ -138,11 +141,16 @@ export const AdvancedSettingsAccordion = memo(() => { )} - {isFlux2 && ( + {isFlux2 && !isFlux2Dev && ( )} + {isFlux2Dev && ( + + + + )} {isSD3 && ( diff --git a/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts b/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts index bd1ac088138..ca704574e8c 100644 --- a/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts +++ b/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts @@ -18,6 +18,7 @@ import { isControlNetModelConfig, isExternalApiModelConfig, isFlux1VAEModelConfig, + isFlux2DevDiffusersMainModelConfig, isFlux2DiffusersMainModelConfig, isFlux2VAEModelConfig, isFluxKontextModelConfig, @@ -27,6 +28,7 @@ import { isLLaVAModelConfig, isLoRAModelConfig, isMainOrExternalModelConfig, + isMistralEncoderModelConfig, isQwen3EncoderModelConfig, isQwenImageDiffusersMainModelConfig, isQwenImageVAEModelConfig, @@ -107,6 +109,8 @@ export const useAnimaVAEModels = () => buildModelsHook(isAnimaVAEModelConfig)(); export const useAnimaQwen3EncoderModels = () => buildModelsHook(isAnimaQwen3EncoderModelConfig)(); export const useZImageDiffusersModels = () => buildModelsHook(isZImageDiffusersMainModelConfig)(); export const useFlux2DiffusersModels = () => buildModelsHook(isFlux2DiffusersMainModelConfig)(); +export const useFlux2DevDiffusersModels = () => buildModelsHook(isFlux2DevDiffusersMainModelConfig)(); +export const useMistralEncoderModels = () => buildModelsHook(isMistralEncoderModelConfig)(); export const useQwenImageDiffusersModels = () => buildModelsHook(isQwenImageDiffusersMainModelConfig)(); export const useQwenImageVAEModels = () => buildModelsHook(isQwenImageVAEModelConfig)(); export const useQwenVLEncoderModels = () => buildModelsHook(isQwenVLEncoderModelConfig)(); @@ -151,6 +155,8 @@ export const selectQwenImageVAEModels = buildModelsSelector(isQwenImageVAEModelC export const selectQwenVLEncoderModels = buildModelsSelector(isQwenVLEncoderModelConfig); export const selectZImageDiffusersModels = buildModelsSelector(isZImageDiffusersMainModelConfig); export const selectFlux2DiffusersModels = buildModelsSelector(isFlux2DiffusersMainModelConfig); +export const selectFlux2DevDiffusersModels = buildModelsSelector(isFlux2DevDiffusersMainModelConfig); +export const selectMistralEncoderModels = buildModelsSelector(isMistralEncoderModelConfig); export const selectFluxVAEModels = buildModelsSelector(isFluxVAEModelConfig); export const selectAnimaVAEModels = buildModelsSelector(isAnimaVAEModelConfig); export const selectT5EncoderModels = buildModelsSelector(isT5EncoderModelConfigOrSubmodel); diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index 7ca0f26fe9f..1cb1ad27d5c 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -3563,7 +3563,7 @@ export type components = { */ type: "anima_text_encoder"; }; - AnyModelConfig: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + AnyModelConfig: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; /** * AppVersion * @description App Version Response @@ -10291,6 +10291,285 @@ export type components = { */ type: "flux2_denoise"; }; + /** + * Apply LoRA Collection - FLUX.2 [dev] + * @description Apply a collection of LoRAs to a FLUX.2 [dev] transformer and/or Mistral encoder. + */ + Flux2DevLoRACollectionLoader: { + /** + * 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; + /** + * LoRAs + * @description LoRA models and weights. May be a single LoRA or collection. + * @default null + */ + loras?: components["schemas"]["LoRAField"] | components["schemas"]["LoRAField"][] | null; + /** + * Transformer + * @description Transformer + * @default null + */ + transformer?: components["schemas"]["TransformerField"] | null; + /** + * Mistral Encoder + * @description Mistral tokenizer/processor and text encoder + * @default null + */ + mistral_encoder?: components["schemas"]["MistralEncoderField"] | null; + /** + * type + * @default flux2_dev_lora_collection_loader + * @constant + */ + type: "flux2_dev_lora_collection_loader"; + }; + /** + * Apply LoRA - FLUX.2 [dev] + * @description Apply a LoRA to a FLUX.2 [dev] transformer and/or its Mistral text encoder. + */ + Flux2DevLoRALoaderInvocation: { + /** + * 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; + /** + * LoRA + * @description LoRA model to load + * @default null + */ + lora?: components["schemas"]["ModelIdentifierField"] | null; + /** + * Weight + * @description The weight at which the LoRA is applied to each model + * @default 0.75 + */ + weight?: number; + /** + * Transformer + * @description Transformer + * @default null + */ + transformer?: components["schemas"]["TransformerField"] | null; + /** + * Mistral Encoder + * @description Mistral tokenizer/processor and text encoder + * @default null + */ + mistral_encoder?: components["schemas"]["MistralEncoderField"] | null; + /** + * type + * @default flux2_dev_lora_loader + * @constant + */ + type: "flux2_dev_lora_loader"; + }; + /** + * Flux2DevLoRALoaderOutput + * @description FLUX.2 [dev] LoRA loader output. + */ + Flux2DevLoRALoaderOutput: { + /** + * Transformer + * @description Transformer + * @default null + */ + transformer: components["schemas"]["TransformerField"] | null; + /** + * Mistral Encoder + * @description Mistral tokenizer/processor and text encoder + * @default null + */ + mistral_encoder: components["schemas"]["MistralEncoderField"] | null; + /** + * type + * @default flux2_dev_lora_loader_output + * @constant + */ + type: "flux2_dev_lora_loader_output"; + }; + /** + * Main Model - FLUX.2 [dev] + * @description Load a FLUX.2 [dev] transformer plus its Mistral text encoder and VAE. + * + * FLUX.2 [dev] is a 32B guidance-distilled rectified flow transformer that uses + * Mistral Small 3.1 (24B) as its sole text encoder, sharing the 32-channel + * AutoencoderKLFlux2 VAE with FLUX.2 Klein. + * + * When the transformer is a Diffusers-format checkpoint, both VAE and Mistral + * encoder can be extracted directly from the main model. For single-file + * safetensors or GGUF transformers, you must supply standalone VAE and + * Mistral encoder models, or point at a Diffusers FLUX.2 [dev] checkout for + * sub-model extraction. + */ + Flux2DevModelLoaderInvocation: { + /** + * 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; + /** + * Transformer + * @description FLUX.2 [dev] model (Transformer) to load + */ + model: components["schemas"]["ModelIdentifierField"]; + /** + * VAE + * @description Standalone FLUX.2 VAE (AutoencoderKLFlux2). If not provided, the VAE is extracted from the Diffusers source model. + * @default null + */ + vae_model?: components["schemas"]["ModelIdentifierField"] | null; + /** + * Mistral Encoder + * @description Standalone Mistral text encoder. Required when the transformer is a single-file safetensors or GGUF without a sibling Diffusers source. + * @default null + */ + mistral_encoder_model?: components["schemas"]["ModelIdentifierField"] | null; + /** + * Mistral Source (Diffusers) + * @description Diffusers FLUX.2 [dev] model to extract VAE and/or Mistral encoder from. Use this if you don't have separate VAE / Mistral encoder models. Ignored if both are provided separately. + * @default null + */ + mistral_source_model?: components["schemas"]["ModelIdentifierField"] | null; + /** + * Max Seq Length + * @description Max sequence length for the Mistral encoder. FLUX.2 [dev] uses 512 by default. + * @default 512 + * @enum {integer} + */ + max_seq_len?: 256 | 512; + /** + * type + * @default flux2_dev_model_loader + * @constant + */ + type: "flux2_dev_model_loader"; + }; + /** + * Flux2DevModelLoaderOutput + * @description FLUX.2 [dev] model loader output. + */ + Flux2DevModelLoaderOutput: { + /** + * Transformer + * @description Transformer + */ + transformer: components["schemas"]["TransformerField"]; + /** + * Mistral Encoder + * @description Mistral tokenizer/processor and text encoder + */ + mistral_encoder: components["schemas"]["MistralEncoderField"]; + /** + * VAE + * @description VAE + */ + vae: components["schemas"]["VAEField"]; + /** + * Max Seq Length + * @description Max sequence length for the Mistral encoder. + * @enum {integer} + */ + max_seq_len: 256 | 512; + /** + * type + * @default flux2_dev_model_loader_output + * @constant + */ + type: "flux2_dev_model_loader_output"; + }; + /** + * Prompt - FLUX.2 [dev] + * @description Encode a prompt for FLUX.2 [dev] using its Mistral Small 3.1 text encoder. + */ + Flux2DevTextEncoderInvocation: { + /** + * 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; + /** + * Prompt + * @description Text prompt to encode. + * @default null + */ + prompt?: string | null; + /** + * Mistral Encoder + * @description Mistral tokenizer/processor and text encoder + * @default null + */ + mistral_encoder?: components["schemas"]["MistralEncoderField"] | null; + /** + * Max Seq Len + * @description Max sequence length for the Mistral encoder. + * @default 512 + * @enum {integer} + */ + max_seq_len?: 256 | 512; + /** + * @description A mask defining the region that this conditioning prompt applies to. + * @default null + */ + mask?: components["schemas"]["TensorField"] | null; + /** + * type + * @default flux2_dev_text_encoder + * @constant + */ + type: "flux2_dev_text_encoder"; + }; /** * Apply LoRA Collection - Flux2 Klein * @description Applies a collection of LoRAs to a FLUX.2 Klein transformer and/or Qwen3 text encoder. @@ -10666,7 +10945,7 @@ export type components = { * @description FLUX.2 model variants. * @enum {string} */ - Flux2VariantType: "klein_4b" | "klein_4b_base" | "klein_9b" | "klein_9b_base"; + Flux2VariantType: "klein_4b" | "klein_4b_base" | "klein_9b" | "klein_9b_base" | "dev"; /** * FluxConditioningCollectionOutput * @description Base class for nodes that output a collection of conditioning tensors @@ -12278,7 +12557,7 @@ export type components = { * @description The nodes in this graph */ nodes?: { - [key: string]: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; + [key: string]: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2DevLoRACollectionLoader"] | components["schemas"]["Flux2DevLoRALoaderInvocation"] | components["schemas"]["Flux2DevModelLoaderInvocation"] | components["schemas"]["Flux2DevTextEncoderInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; }; /** * Edges @@ -12315,7 +12594,7 @@ export type components = { * @description The results of node executions */ results: { - [key: string]: components["schemas"]["AnimaConditioningOutput"] | components["schemas"]["AnimaLoRALoaderOutput"] | components["schemas"]["AnimaModelLoaderOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["BoundingBoxCollectionOutput"] | components["schemas"]["BoundingBoxOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["CogView4ConditioningOutput"] | components["schemas"]["CogView4ModelLoaderOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["FloatGeneratorOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["Flux2KleinLoRALoaderOutput"] | components["schemas"]["Flux2KleinModelLoaderOutput"] | components["schemas"]["FluxConditioningCollectionOutput"] | components["schemas"]["FluxConditioningOutput"] | components["schemas"]["FluxControlLoRALoaderOutput"] | components["schemas"]["FluxControlNetOutput"] | components["schemas"]["FluxFillOutput"] | components["schemas"]["FluxKontextOutput"] | components["schemas"]["FluxLoRALoaderOutput"] | components["schemas"]["FluxModelLoaderOutput"] | components["schemas"]["FluxReduxOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["IfInvocationOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ImageGeneratorOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImagePanelCoordinateOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["IntegerGeneratorOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsMetaOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["MDControlListOutput"] | components["schemas"]["MDIPAdapterListOutput"] | components["schemas"]["MDT2IAdapterListOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["MetadataToLorasCollectionOutput"] | components["schemas"]["MetadataToModelOutput"] | components["schemas"]["MetadataToSDXLModelOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PBRMapsOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["PromptTemplateOutput"] | components["schemas"]["QwenImageConditioningOutput"] | components["schemas"]["QwenImageLoRALoaderOutput"] | components["schemas"]["QwenImageModelLoaderOutput"] | components["schemas"]["SD3ConditioningOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["Sd3ModelLoaderOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringGeneratorOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["ZImageConditioningOutput"] | components["schemas"]["ZImageControlOutput"] | components["schemas"]["ZImageLoRALoaderOutput"] | components["schemas"]["ZImageModelLoaderOutput"]; + [key: string]: components["schemas"]["AnimaConditioningOutput"] | components["schemas"]["AnimaLoRALoaderOutput"] | components["schemas"]["AnimaModelLoaderOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["BoundingBoxCollectionOutput"] | components["schemas"]["BoundingBoxOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["CogView4ConditioningOutput"] | components["schemas"]["CogView4ModelLoaderOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["FloatGeneratorOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["Flux2DevLoRALoaderOutput"] | components["schemas"]["Flux2DevModelLoaderOutput"] | components["schemas"]["Flux2KleinLoRALoaderOutput"] | components["schemas"]["Flux2KleinModelLoaderOutput"] | components["schemas"]["FluxConditioningCollectionOutput"] | components["schemas"]["FluxConditioningOutput"] | components["schemas"]["FluxControlLoRALoaderOutput"] | components["schemas"]["FluxControlNetOutput"] | components["schemas"]["FluxFillOutput"] | components["schemas"]["FluxKontextOutput"] | components["schemas"]["FluxLoRALoaderOutput"] | components["schemas"]["FluxModelLoaderOutput"] | components["schemas"]["FluxReduxOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["IfInvocationOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ImageGeneratorOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImagePanelCoordinateOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["IntegerGeneratorOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsMetaOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["MDControlListOutput"] | components["schemas"]["MDIPAdapterListOutput"] | components["schemas"]["MDT2IAdapterListOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["MetadataToLorasCollectionOutput"] | components["schemas"]["MetadataToModelOutput"] | components["schemas"]["MetadataToSDXLModelOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PBRMapsOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["PromptTemplateOutput"] | components["schemas"]["QwenImageConditioningOutput"] | components["schemas"]["QwenImageLoRALoaderOutput"] | components["schemas"]["QwenImageModelLoaderOutput"] | components["schemas"]["SD3ConditioningOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["Sd3ModelLoaderOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringGeneratorOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["ZImageConditioningOutput"] | components["schemas"]["ZImageControlOutput"] | components["schemas"]["ZImageLoRALoaderOutput"] | components["schemas"]["ZImageModelLoaderOutput"]; }; /** * Errors @@ -15676,7 +15955,7 @@ export type components = { * Invocation * @description The ID of the invocation */ - invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2DevLoRACollectionLoader"] | components["schemas"]["Flux2DevLoRALoaderInvocation"] | components["schemas"]["Flux2DevModelLoaderInvocation"] | components["schemas"]["Flux2DevTextEncoderInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; /** * Invocation Source Id * @description The ID of the prepared invocation's source node @@ -15686,7 +15965,7 @@ export type components = { * Result * @description The result of the invocation */ - result: components["schemas"]["AnimaConditioningOutput"] | components["schemas"]["AnimaLoRALoaderOutput"] | components["schemas"]["AnimaModelLoaderOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["BoundingBoxCollectionOutput"] | components["schemas"]["BoundingBoxOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["CogView4ConditioningOutput"] | components["schemas"]["CogView4ModelLoaderOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["FloatGeneratorOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["Flux2KleinLoRALoaderOutput"] | components["schemas"]["Flux2KleinModelLoaderOutput"] | components["schemas"]["FluxConditioningCollectionOutput"] | components["schemas"]["FluxConditioningOutput"] | components["schemas"]["FluxControlLoRALoaderOutput"] | components["schemas"]["FluxControlNetOutput"] | components["schemas"]["FluxFillOutput"] | components["schemas"]["FluxKontextOutput"] | components["schemas"]["FluxLoRALoaderOutput"] | components["schemas"]["FluxModelLoaderOutput"] | components["schemas"]["FluxReduxOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["IfInvocationOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ImageGeneratorOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImagePanelCoordinateOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["IntegerGeneratorOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsMetaOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["MDControlListOutput"] | components["schemas"]["MDIPAdapterListOutput"] | components["schemas"]["MDT2IAdapterListOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["MetadataToLorasCollectionOutput"] | components["schemas"]["MetadataToModelOutput"] | components["schemas"]["MetadataToSDXLModelOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PBRMapsOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["PromptTemplateOutput"] | components["schemas"]["QwenImageConditioningOutput"] | components["schemas"]["QwenImageLoRALoaderOutput"] | components["schemas"]["QwenImageModelLoaderOutput"] | components["schemas"]["SD3ConditioningOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["Sd3ModelLoaderOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringGeneratorOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["ZImageConditioningOutput"] | components["schemas"]["ZImageControlOutput"] | components["schemas"]["ZImageLoRALoaderOutput"] | components["schemas"]["ZImageModelLoaderOutput"]; + result: components["schemas"]["AnimaConditioningOutput"] | components["schemas"]["AnimaLoRALoaderOutput"] | components["schemas"]["AnimaModelLoaderOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["BoundingBoxCollectionOutput"] | components["schemas"]["BoundingBoxOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["CogView4ConditioningOutput"] | components["schemas"]["CogView4ModelLoaderOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["FloatGeneratorOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["Flux2DevLoRALoaderOutput"] | components["schemas"]["Flux2DevModelLoaderOutput"] | components["schemas"]["Flux2KleinLoRALoaderOutput"] | components["schemas"]["Flux2KleinModelLoaderOutput"] | components["schemas"]["FluxConditioningCollectionOutput"] | components["schemas"]["FluxConditioningOutput"] | components["schemas"]["FluxControlLoRALoaderOutput"] | components["schemas"]["FluxControlNetOutput"] | components["schemas"]["FluxFillOutput"] | components["schemas"]["FluxKontextOutput"] | components["schemas"]["FluxLoRALoaderOutput"] | components["schemas"]["FluxModelLoaderOutput"] | components["schemas"]["FluxReduxOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["IfInvocationOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ImageGeneratorOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["ImagePanelCoordinateOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["IntegerGeneratorOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsMetaOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["MDControlListOutput"] | components["schemas"]["MDIPAdapterListOutput"] | components["schemas"]["MDT2IAdapterListOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["MetadataToLorasCollectionOutput"] | components["schemas"]["MetadataToModelOutput"] | components["schemas"]["MetadataToSDXLModelOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PBRMapsOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["PromptTemplateOutput"] | components["schemas"]["QwenImageConditioningOutput"] | components["schemas"]["QwenImageLoRALoaderOutput"] | components["schemas"]["QwenImageModelLoaderOutput"] | components["schemas"]["SD3ConditioningOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["Sd3ModelLoaderOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringGeneratorOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["ZImageConditioningOutput"] | components["schemas"]["ZImageControlOutput"] | components["schemas"]["ZImageLoRALoaderOutput"] | components["schemas"]["ZImageModelLoaderOutput"]; }; /** * InvocationErrorEvent @@ -15740,7 +16019,7 @@ export type components = { * Invocation * @description The ID of the invocation */ - invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2DevLoRACollectionLoader"] | components["schemas"]["Flux2DevLoRALoaderInvocation"] | components["schemas"]["Flux2DevModelLoaderInvocation"] | components["schemas"]["Flux2DevTextEncoderInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; /** * Invocation Source Id * @description The ID of the prepared invocation's source node @@ -15827,6 +16106,10 @@ export type components = { float_range: components["schemas"]["FloatCollectionOutput"]; float_to_int: components["schemas"]["IntegerOutput"]; flux2_denoise: components["schemas"]["LatentsOutput"]; + flux2_dev_lora_collection_loader: components["schemas"]["Flux2DevLoRALoaderOutput"]; + flux2_dev_lora_loader: components["schemas"]["Flux2DevLoRALoaderOutput"]; + flux2_dev_model_loader: components["schemas"]["Flux2DevModelLoaderOutput"]; + flux2_dev_text_encoder: components["schemas"]["FluxConditioningOutput"]; flux2_klein_lora_collection_loader: components["schemas"]["Flux2KleinLoRALoaderOutput"]; flux2_klein_lora_loader: components["schemas"]["Flux2KleinLoRALoaderOutput"]; flux2_klein_model_loader: components["schemas"]["Flux2KleinModelLoaderOutput"]; @@ -16070,7 +16353,7 @@ export type components = { * Invocation * @description The ID of the invocation */ - invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2DevLoRACollectionLoader"] | components["schemas"]["Flux2DevLoRALoaderInvocation"] | components["schemas"]["Flux2DevModelLoaderInvocation"] | components["schemas"]["Flux2DevTextEncoderInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; /** * Invocation Source Id * @description The ID of the prepared invocation's source node @@ -16145,7 +16428,7 @@ export type components = { * Invocation * @description The ID of the invocation */ - invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlibabaCloudImageGenerationInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["AnimaDenoiseInvocation"] | components["schemas"]["AnimaImageToLatentsInvocation"] | components["schemas"]["AnimaLatentsToImageInvocation"] | components["schemas"]["AnimaLoRACollectionLoader"] | components["schemas"]["AnimaLoRALoaderInvocation"] | components["schemas"]["AnimaModelLoaderInvocation"] | components["schemas"]["AnimaTextEncoderInvocation"] | components["schemas"]["ApplyMaskTensorToImageInvocation"] | components["schemas"]["ApplyMaskToImageInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["BoundingBoxInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyEdgeDetectionInvocation"] | components["schemas"]["CanvasOutputInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CanvasV2MaskAndCropInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CogView4DenoiseInvocation"] | components["schemas"]["CogView4ImageToLatentsInvocation"] | components["schemas"]["CogView4LatentsToImageInvocation"] | components["schemas"]["CogView4ModelLoaderInvocation"] | components["schemas"]["CogView4TextEncoderInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropImageToBoundingBoxInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeDetectionInvocation"] | components["schemas"]["DecodeInvisibleWatermarkInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DenoiseLatentsMetaInvocation"] | components["schemas"]["DepthAnythingDepthEstimationInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["ExpandMaskWithFadeInvocation"] | components["schemas"]["FLUXLoRACollectionLoader"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatBatchInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatGenerator"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["Flux2DenoiseInvocation"] | components["schemas"]["Flux2DevLoRACollectionLoader"] | components["schemas"]["Flux2DevLoRALoaderInvocation"] | components["schemas"]["Flux2DevModelLoaderInvocation"] | components["schemas"]["Flux2DevTextEncoderInvocation"] | components["schemas"]["Flux2KleinLoRACollectionLoader"] | components["schemas"]["Flux2KleinLoRALoaderInvocation"] | components["schemas"]["Flux2KleinModelLoaderInvocation"] | components["schemas"]["Flux2KleinTextEncoderInvocation"] | components["schemas"]["Flux2VaeDecodeInvocation"] | components["schemas"]["Flux2VaeEncodeInvocation"] | components["schemas"]["FluxControlLoRALoaderInvocation"] | components["schemas"]["FluxControlNetInvocation"] | components["schemas"]["FluxDenoiseInvocation"] | components["schemas"]["FluxDenoiseLatentsMetaInvocation"] | components["schemas"]["FluxFillInvocation"] | components["schemas"]["FluxIPAdapterInvocation"] | components["schemas"]["FluxKontextConcatenateImagesInvocation"] | components["schemas"]["FluxKontextInvocation"] | components["schemas"]["FluxLoRALoaderInvocation"] | components["schemas"]["FluxModelLoaderInvocation"] | components["schemas"]["FluxReduxInvocation"] | components["schemas"]["FluxTextEncoderInvocation"] | components["schemas"]["FluxVaeDecodeInvocation"] | components["schemas"]["FluxVaeEncodeInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["GeminiImageGenerationInvocation"] | components["schemas"]["GetMaskBoundingBoxInvocation"] | components["schemas"]["GroundingDinoInvocation"] | components["schemas"]["HEDEdgeDetectionInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["IfInvocation"] | components["schemas"]["ImageBatchInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageGenerator"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImageNoiseInvocation"] | components["schemas"]["ImagePanelLayoutInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerBatchInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerGenerator"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["InvokeAdjustImageHuePlusInvocation"] | components["schemas"]["InvokeEquivalentAchromaticLightnessInvocation"] | components["schemas"]["InvokeImageBlendInvocation"] | components["schemas"]["InvokeImageCompositorInvocation"] | components["schemas"]["InvokeImageDilateOrErodeInvocation"] | components["schemas"]["InvokeImageEnhanceInvocation"] | components["schemas"]["InvokeImageValueThresholdsInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LineartAnimeEdgeDetectionInvocation"] | components["schemas"]["LineartEdgeDetectionInvocation"] | components["schemas"]["LlavaOnevisionVllmInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MLSDDetectionInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MaskTensorToImageInvocation"] | components["schemas"]["MediaPipeFaceDetectionInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataFieldExtractorInvocation"] | components["schemas"]["MetadataFromImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MetadataItemLinkedInvocation"] | components["schemas"]["MetadataToBoolCollectionInvocation"] | components["schemas"]["MetadataToBoolInvocation"] | components["schemas"]["MetadataToControlnetsInvocation"] | components["schemas"]["MetadataToFloatCollectionInvocation"] | components["schemas"]["MetadataToFloatInvocation"] | components["schemas"]["MetadataToIPAdaptersInvocation"] | components["schemas"]["MetadataToIntegerCollectionInvocation"] | components["schemas"]["MetadataToIntegerInvocation"] | components["schemas"]["MetadataToLorasCollectionInvocation"] | components["schemas"]["MetadataToLorasInvocation"] | components["schemas"]["MetadataToModelInvocation"] | components["schemas"]["MetadataToSDXLLorasInvocation"] | components["schemas"]["MetadataToSDXLModelInvocation"] | components["schemas"]["MetadataToSchedulerInvocation"] | components["schemas"]["MetadataToStringCollectionInvocation"] | components["schemas"]["MetadataToStringInvocation"] | components["schemas"]["MetadataToT2IAdaptersInvocation"] | components["schemas"]["MetadataToVAEInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalMapInvocation"] | components["schemas"]["OklabUnsharpMaskInvocation"] | components["schemas"]["OklchImageHueAdjustmentInvocation"] | components["schemas"]["OpenAIImageGenerationInvocation"] | components["schemas"]["PBRMapsInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PasteImageIntoBoundingBoxInvocation"] | components["schemas"]["PiDiNetEdgeDetectionInvocation"] | components["schemas"]["PromptTemplateInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["QwenImageDenoiseInvocation"] | components["schemas"]["QwenImageImageToLatentsInvocation"] | components["schemas"]["QwenImageLatentsToImageInvocation"] | components["schemas"]["QwenImageLoRACollectionLoader"] | components["schemas"]["QwenImageLoRALoaderInvocation"] | components["schemas"]["QwenImageModelLoaderInvocation"] | components["schemas"]["QwenImageTextEncoderInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SD3DenoiseInvocation"] | components["schemas"]["SD3ImageToLatentsInvocation"] | components["schemas"]["SD3LatentsToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["Sd3ModelLoaderInvocation"] | components["schemas"]["Sd3TextEncoderInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SeedreamImageGenerationInvocation"] | components["schemas"]["SegmentAnythingInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["SpandrelImageToImageAutoscaleInvocation"] | components["schemas"]["SpandrelImageToImageInvocation"] | components["schemas"]["StringBatchInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringGenerator"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TextLLMInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["TiledMultiDiffusionDenoiseLatents"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZImageControlInvocation"] | components["schemas"]["ZImageDenoiseInvocation"] | components["schemas"]["ZImageDenoiseMetaInvocation"] | components["schemas"]["ZImageImageToLatentsInvocation"] | components["schemas"]["ZImageLatentsToImageInvocation"] | components["schemas"]["ZImageLoRACollectionLoader"] | components["schemas"]["ZImageLoRALoaderInvocation"] | components["schemas"]["ZImageModelLoaderInvocation"] | components["schemas"]["ZImageSeedVarianceEnhancerInvocation"] | components["schemas"]["ZImageTextEncoderInvocation"]; /** * Invocation Source Id * @description The ID of the prepared invocation's source node @@ -16314,14 +16597,14 @@ export type components = { * Convert Cache Dir * Format: path * @description Path to the converted models cache directory (DEPRECATED, but do not delete because it is needed for migration from previous versions). - * @default models/.convert_cache + * @default models\.convert_cache */ convert_cache_dir?: string; /** * Download Cache Dir * Format: path * @description Path to the directory that contains dynamically downloaded models. - * @default models/.download_cache + * @default models\.download_cache */ download_cache_dir?: string; /** @@ -20527,7 +20810,7 @@ export type components = { }; /** * Main_Diffusers_Flux2_Config - * @description Model config for FLUX.2 models in diffusers format (e.g. FLUX.2 Klein). + * @description Model config for FLUX.2 models in diffusers format (FLUX.2 Klein and FLUX.2 [dev]). */ Main_Diffusers_Flux2_Config: { /** @@ -23250,12 +23533,303 @@ export type components = { */ type: "metadata_to_vae"; }; + /** + * MistralEncoderField + * @description Field for the Mistral text encoder used by FLUX.2 [dev]. + * + * The "tokenizer" submodel actually points to the multimodal processor (AutoProcessor / + * Mistral3Processor), which wraps the tokenizer plus the chat template needed by FLUX.2. + */ + MistralEncoderField: { + /** @description Info to load tokenizer / processor submodel */ + tokenizer: components["schemas"]["ModelIdentifierField"]; + /** @description Info to load text_encoder submodel */ + text_encoder: components["schemas"]["ModelIdentifierField"]; + /** + * Loras + * @description LoRAs to apply on model loading + */ + loras?: components["schemas"]["LoRAField"][]; + }; + /** + * MistralEncoder_Checkpoint_Config + * @description Configuration for a single-file Mistral text encoder (safetensors). + */ + MistralEncoder_Checkpoint_Config: { + /** + * Key + * @description A unique key for this model. + */ + key: string; + /** + * Hash + * @description The hash of the model file(s). + */ + hash: string; + /** + * Path + * @description Path to the model on the filesystem. Relative paths are relative to the Invoke root directory. + */ + path: string; + /** + * File Size + * @description The size of the model in bytes. + */ + file_size: number; + /** + * Name + * @description Name of the model. + */ + name: string; + /** + * Description + * @description Model description + */ + description: string | null; + /** + * Source + * @description The original source of the model (path, URL or repo_id). + */ + source: string; + /** @description The type of source */ + source_type: components["schemas"]["ModelSourceType"]; + /** + * Source Api Response + * @description The original API response from the source, as stringified JSON. + */ + source_api_response: string | null; + /** + * Source Url + * @description Optional URL for the model (e.g. download page or model page). + */ + source_url: string | null; + /** + * Cover Image + * @description Url for image to preview model + */ + cover_image: string | null; + /** + * Config Path + * @description Path to the config for this model, if any. + */ + config_path: string | null; + /** + * Base + * @default any + * @constant + */ + base: "any"; + /** + * Type + * @default mistral_encoder + * @constant + */ + type: "mistral_encoder"; + /** + * Format + * @default checkpoint + * @constant + */ + format: "checkpoint"; + /** + * Cpu Only + * @description Whether this model should run on CPU only + */ + cpu_only: boolean | null; + /** @description Mistral text encoder variant */ + variant: components["schemas"]["MistralVariantType"]; + }; + /** + * MistralEncoder_Diffusers_Config + * @description Configuration for a Mistral text encoder in HuggingFace transformers/diffusers folder layout. + * + * Matches: + * - Full pipelines downloaded as just the `text_encoder/` subfolder + * (e.g. `black-forest-labs/FLUX.2-dev/text_encoder/`) + * - Quantized variants such as `diffusers/FLUX.2-dev-bnb-4bit/text_encoder/` + * + * Does NOT match a full FLUX.2 pipeline directory — those are picked up by the + * `Main_Diffusers_Flux2_Config` instead. + */ + MistralEncoder_Diffusers_Config: { + /** + * Key + * @description A unique key for this model. + */ + key: string; + /** + * Hash + * @description The hash of the model file(s). + */ + hash: string; + /** + * Path + * @description Path to the model on the filesystem. Relative paths are relative to the Invoke root directory. + */ + path: string; + /** + * File Size + * @description The size of the model in bytes. + */ + file_size: number; + /** + * Name + * @description Name of the model. + */ + name: string; + /** + * Description + * @description Model description + */ + description: string | null; + /** + * Source + * @description The original source of the model (path, URL or repo_id). + */ + source: string; + /** @description The type of source */ + source_type: components["schemas"]["ModelSourceType"]; + /** + * Source Api Response + * @description The original API response from the source, as stringified JSON. + */ + source_api_response: string | null; + /** + * Source Url + * @description Optional URL for the model (e.g. download page or model page). + */ + source_url: string | null; + /** + * Cover Image + * @description Url for image to preview model + */ + cover_image: string | null; + /** + * Base + * @default any + * @constant + */ + base: "any"; + /** + * Type + * @default mistral_encoder + * @constant + */ + type: "mistral_encoder"; + /** + * Format + * @default mistral_encoder + * @constant + */ + format: "mistral_encoder"; + /** + * Cpu Only + * @description Whether this model should run on CPU only + */ + cpu_only: boolean | null; + /** @description Mistral text encoder variant */ + variant: components["schemas"]["MistralVariantType"]; + }; + /** + * MistralEncoder_GGUF_Config + * @description Configuration for a GGUF-quantized Mistral text encoder. + */ + MistralEncoder_GGUF_Config: { + /** + * Key + * @description A unique key for this model. + */ + key: string; + /** + * Hash + * @description The hash of the model file(s). + */ + hash: string; + /** + * Path + * @description Path to the model on the filesystem. Relative paths are relative to the Invoke root directory. + */ + path: string; + /** + * File Size + * @description The size of the model in bytes. + */ + file_size: number; + /** + * Name + * @description Name of the model. + */ + name: string; + /** + * Description + * @description Model description + */ + description: string | null; + /** + * Source + * @description The original source of the model (path, URL or repo_id). + */ + source: string; + /** @description The type of source */ + source_type: components["schemas"]["ModelSourceType"]; + /** + * Source Api Response + * @description The original API response from the source, as stringified JSON. + */ + source_api_response: string | null; + /** + * Source Url + * @description Optional URL for the model (e.g. download page or model page). + */ + source_url: string | null; + /** + * Cover Image + * @description Url for image to preview model + */ + cover_image: string | null; + /** + * Config Path + * @description Path to the config for this model, if any. + */ + config_path: string | null; + /** + * Base + * @default any + * @constant + */ + base: "any"; + /** + * Type + * @default mistral_encoder + * @constant + */ + type: "mistral_encoder"; + /** + * Format + * @default gguf_quantized + * @constant + */ + format: "gguf_quantized"; + /** + * Cpu Only + * @description Whether this model should run on CPU only + */ + cpu_only: boolean | null; + /** @description Mistral text encoder variant */ + variant: components["schemas"]["MistralVariantType"]; + }; + /** + * MistralVariantType + * @description Mistral text encoder variants used by FLUX.2 [dev]. + * @enum {string} + */ + MistralVariantType: "mistral_small_3_1"; /** * ModelFormat * @description Storage format of model. * @enum {string} */ - ModelFormat: "omi" | "diffusers" | "checkpoint" | "lycoris" | "onnx" | "olive" | "embedding_file" | "embedding_folder" | "invokeai" | "t5_encoder" | "qwen3_encoder" | "qwen_vl_encoder" | "bnb_quantized_int8b" | "bnb_quantized_nf4b" | "gguf_quantized" | "external_api" | "unknown"; + ModelFormat: "omi" | "diffusers" | "checkpoint" | "lycoris" | "onnx" | "olive" | "embedding_file" | "embedding_folder" | "invokeai" | "t5_encoder" | "qwen3_encoder" | "qwen_vl_encoder" | "mistral_encoder" | "bnb_quantized_int8b" | "bnb_quantized_nf4b" | "gguf_quantized" | "external_api" | "unknown"; /** ModelIdentifierField */ ModelIdentifierField: { /** @@ -23392,7 +23966,7 @@ export type components = { * Config * @description The installed model's config */ - config: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + config: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; /** * ModelInstallDownloadProgressEvent @@ -23558,7 +24132,7 @@ export type components = { * Config Out * @description After successful installation, this will hold the configuration object. */ - config_out?: (components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]) | null; + config_out?: (components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]) | null; /** * Inplace * @description Leave model in its current location; otherwise install under models directory @@ -23644,7 +24218,7 @@ export type components = { * Config * @description The model's config */ - config: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + config: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; /** * @description The submodel type, if any * @default null @@ -23665,7 +24239,7 @@ export type components = { * Config * @description The model's config */ - config: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + config: components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; /** * @description The submodel type, if any * @default null @@ -23791,7 +24365,7 @@ export type components = { * Variant * @description The variant of the model. */ - variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | null; + variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | components["schemas"]["MistralVariantType"] | null; /** @description The prediction type of the model. */ prediction_type?: components["schemas"]["SchedulerPredictionType"] | null; /** @@ -23849,7 +24423,7 @@ export type components = { * @description Model type. * @enum {string} */ - ModelType: "onnx" | "main" | "vae" | "lora" | "control_lora" | "controlnet" | "embedding" | "ip_adapter" | "clip_vision" | "clip_embed" | "t2i_adapter" | "t5_encoder" | "qwen3_encoder" | "qwen_vl_encoder" | "spandrel_image_to_image" | "siglip" | "flux_redux" | "llava_onevision" | "text_llm" | "external_image_generator" | "unknown"; + ModelType: "onnx" | "main" | "vae" | "lora" | "control_lora" | "controlnet" | "embedding" | "ip_adapter" | "clip_vision" | "clip_embed" | "t2i_adapter" | "t5_encoder" | "qwen3_encoder" | "qwen_vl_encoder" | "mistral_encoder" | "spandrel_image_to_image" | "siglip" | "flux_redux" | "llava_onevision" | "text_llm" | "external_image_generator" | "unknown"; /** * ModelVariantType * @description Variant type. @@ -23862,7 +24436,7 @@ export type components = { */ ModelsList: { /** Models */ - models: (components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"])[]; + models: (components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"])[]; }; /** * Multiply Integers @@ -28526,7 +29100,7 @@ export type components = { type: components["schemas"]["ModelType"]; format?: components["schemas"]["ModelFormat"] | null; /** Variant */ - variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | null; + variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | components["schemas"]["MistralVariantType"] | null; /** * Is Installed * @default false @@ -28571,7 +29145,7 @@ export type components = { type: components["schemas"]["ModelType"]; format?: components["schemas"]["ModelFormat"] | null; /** Variant */ - variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | null; + variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | components["schemas"]["MistralVariantType"] | null; /** * Is Installed * @default false @@ -29102,7 +29676,7 @@ export type components = { path_or_prefix: string; model_type: components["schemas"]["ModelType"]; /** Variant */ - variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | null; + variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["Qwen3VariantType"] | components["schemas"]["MistralVariantType"] | null; }; /** * Subtract Integers @@ -33408,7 +33982,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; }; /** @description Validation Error */ @@ -33440,7 +34014,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; }; /** @description Validation Error */ @@ -33490,7 +34064,7 @@ export interface operations { * "repo_variant": "fp16", * "upcast_attention": false * } */ - "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; }; /** @description Bad request */ @@ -33595,7 +34169,7 @@ export interface operations { * "repo_variant": "fp16", * "upcast_attention": false * } */ - "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; }; /** @description Bad request */ @@ -33666,7 +34240,7 @@ export interface operations { * "repo_variant": "fp16", * "upcast_attention": false * } */ - "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; }; /** @description Bad request */ @@ -34399,7 +34973,7 @@ export interface operations { * "repo_variant": "fp16", * "upcast_attention": false * } */ - "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; + "application/json": components["schemas"]["Main_Diffusers_SD1_Config"] | components["schemas"]["Main_Diffusers_SD2_Config"] | components["schemas"]["Main_Diffusers_SDXL_Config"] | components["schemas"]["Main_Diffusers_SDXLRefiner_Config"] | components["schemas"]["Main_Diffusers_SD3_Config"] | components["schemas"]["Main_Diffusers_FLUX_Config"] | components["schemas"]["Main_Diffusers_Flux2_Config"] | components["schemas"]["Main_Diffusers_CogView4_Config"] | components["schemas"]["Main_Diffusers_QwenImage_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Checkpoint_SD1_Config"] | components["schemas"]["Main_Checkpoint_SD2_Config"] | components["schemas"]["Main_Checkpoint_SDXL_Config"] | components["schemas"]["Main_Checkpoint_SDXLRefiner_Config"] | components["schemas"]["Main_Checkpoint_Flux2_Config"] | components["schemas"]["Main_Checkpoint_FLUX_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_BnBNF4_FLUX_Config"] | components["schemas"]["Main_GGUF_Flux2_Config"] | components["schemas"]["Main_GGUF_FLUX_Config"] | components["schemas"]["Main_GGUF_QwenImage_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["VAE_Checkpoint_SD1_Config"] | components["schemas"]["VAE_Checkpoint_SD2_Config"] | components["schemas"]["VAE_Checkpoint_SDXL_Config"] | components["schemas"]["VAE_Checkpoint_FLUX_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["ControlNet_Checkpoint_SD1_Config"] | components["schemas"]["ControlNet_Checkpoint_SD2_Config"] | components["schemas"]["ControlNet_Checkpoint_SDXL_Config"] | components["schemas"]["ControlNet_Checkpoint_FLUX_Config"] | components["schemas"]["ControlNet_Checkpoint_ZImage_Config"] | components["schemas"]["ControlNet_Diffusers_SD1_Config"] | components["schemas"]["ControlNet_Diffusers_SD2_Config"] | components["schemas"]["ControlNet_Diffusers_SDXL_Config"] | components["schemas"]["ControlNet_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_SD1_Config"] | components["schemas"]["LoRA_LyCORIS_SD2_Config"] | components["schemas"]["LoRA_LyCORIS_SDXL_Config"] | components["schemas"]["LoRA_LyCORIS_Flux2_Config"] | components["schemas"]["LoRA_LyCORIS_FLUX_Config"] | components["schemas"]["LoRA_LyCORIS_ZImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_Anima_Config"] | components["schemas"]["LoRA_OMI_SDXL_Config"] | components["schemas"]["LoRA_OMI_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_SD1_Config"] | components["schemas"]["LoRA_Diffusers_SD2_Config"] | components["schemas"]["LoRA_Diffusers_SDXL_Config"] | components["schemas"]["LoRA_Diffusers_Flux2_Config"] | components["schemas"]["LoRA_Diffusers_FLUX_Config"] | components["schemas"]["LoRA_Diffusers_ZImage_Config"] | components["schemas"]["ControlLoRA_LyCORIS_FLUX_Config"] | components["schemas"]["T5Encoder_T5Encoder_Config"] | components["schemas"]["T5Encoder_BnBLLMint8_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["TI_File_SD1_Config"] | components["schemas"]["TI_File_SD2_Config"] | components["schemas"]["TI_File_SDXL_Config"] | components["schemas"]["TI_Folder_SD1_Config"] | components["schemas"]["TI_Folder_SD2_Config"] | components["schemas"]["TI_Folder_SDXL_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD1_Config"] | components["schemas"]["IPAdapter_InvokeAI_SD2_Config"] | components["schemas"]["IPAdapter_InvokeAI_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD1_Config"] | components["schemas"]["IPAdapter_Checkpoint_SD2_Config"] | components["schemas"]["IPAdapter_Checkpoint_SDXL_Config"] | components["schemas"]["IPAdapter_Checkpoint_FLUX_Config"] | components["schemas"]["T2IAdapter_Diffusers_SD1_Config"] | components["schemas"]["T2IAdapter_Diffusers_SDXL_Config"] | components["schemas"]["Spandrel_Checkpoint_Config"] | components["schemas"]["CLIPEmbed_Diffusers_G_Config"] | components["schemas"]["CLIPEmbed_Diffusers_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"]; }; }; /** @description Bad request */ diff --git a/invokeai/frontend/web/src/services/api/types.ts b/invokeai/frontend/web/src/services/api/types.ts index 27c6fcbf3c3..08a2c8b2208 100644 --- a/invokeai/frontend/web/src/services/api/types.ts +++ b/invokeai/frontend/web/src/services/api/types.ts @@ -116,6 +116,7 @@ export type T5EncoderBnbQuantizedLlmInt8bModelConfig = Extract< { type: 't5_encoder'; format: 'bnb_quantized_int8b' } >; export type Qwen3EncoderModelConfig = Extract; +export type MistralEncoderModelConfig = Extract; export type QwenVLEncoderModelConfig = Extract; export type SpandrelImageToImageModelConfig = Extract; export type CheckpointModelConfig = Extract; @@ -375,6 +376,10 @@ export const isAnimaQwen3EncoderModelConfig = (config: AnyModelConfig): config i return config.type === 'qwen3_encoder' && config.variant === 'qwen3_06b'; }; +export const isMistralEncoderModelConfig = (config: AnyModelConfig): config is MistralEncoderModelConfig => { + return config.type === 'mistral_encoder'; +}; + export const isQwenVLEncoderModelConfig = (config: AnyModelConfig): config is QwenVLEncoderModelConfig => { return config.type === 'qwen_vl_encoder'; }; @@ -466,8 +471,16 @@ const isFlux2Klein9BMainModelConfig = (config: AnyModelConfig): config is MainMo return config.type === 'main' && config.base === 'flux2' && config.name.toLowerCase().includes('9b'); }; +export const isFlux2DevMainModelConfig = (config: AnyModelConfig): config is MainModelConfig => { + return config.type === 'main' && config.base === 'flux2' && config.variant === 'dev'; +}; + +export const isFlux2DevDiffusersMainModelConfig = (config: AnyModelConfig): config is MainModelConfig => { + return isFlux2DevMainModelConfig(config) && config.format === 'diffusers'; +}; + export const isNonCommercialMainModelConfig = (config: AnyModelConfig): config is MainModelConfig => { - return isFluxDevMainModelConfig(config) || isFlux2Klein9BMainModelConfig(config); + return isFluxDevMainModelConfig(config) || isFlux2Klein9BMainModelConfig(config) || isFlux2DevMainModelConfig(config); }; export const isFluxFillMainModelModelConfig = (config: AnyModelConfig): config is MainModelConfig => { From 0e7373d46c8a21d8e2f11ca8d993ad51a0246466 Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Mon, 25 May 2026 22:07:51 +0200 Subject: [PATCH 2/8] fix(flux2): wire dev path end-to-end, harden Mistral encoder loader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up fixes after first end-to-end run with FLUX.2 [dev] GGUF + Mistral 3.x GGUF + standalone FLUX.2 VAE. Frontend - buildFLUXGraph: wire dev model loader's vae into both flux2_denoise (required for BN statistics / inpaint) and flux2_vae_decode; missing edge was raising RequiredConnectionException at runtime - readiness.ts: variant-aware FLUX.2 readiness check — dev requires flux2DevVaeModel + flux2DevMistralEncoderModel (or a Dev diffusers source); Klein keeps Qwen3/VAE check. Threads hasFlux2DevDiffusersSource through generate + canvas tabs and updates buildGenerateTabArg / buildCanvasTabArg test helpers - en.json: noFlux2DevVaeModelSelected, noFlux2DevMistralEncoderModelSelected Mistral encoder loader (GGUF / single-file) - Fix "Cannot copy out of meta tensor": llama.cpp conversion produced `model.*` keys but loader instantiated bare MistralModel (no `model.` prefix). Add _convert_for_bare_mistral_model to strip the prefix and drop lm_head before load_state_dict - _materialize_remaining_meta_tensors: after load_state_dict, replace any still-meta parameters (norms→ones, others→zeros) and buffers so the cache→VRAM move can't fail on partial state dicts, with a warning listing what was missing - llama.cpp converter: map attn_q_norm/attn_k_norm (Mistral 3.x qk-norm variants), with ordering before attn_q/attn_k to avoid bad rewrites Tokenizer / processor fallback - _load_processor_with_offline_fallback walks a list of sources (black-forest-labs/FLUX.2-dev tokenizer subfolder, then mistralai/Mistral-Small-3.1-… and 3.2-…), trying AutoProcessor then AutoTokenizer for each, cache-first then online. Final error spells out the three workarounds (install Diffusers folder, set HF_ENDPOINT, pre-cache the tokenizer) - flux2_dev_text_encoder: try multimodal `[{type, text}]` chat template first (PixtralProcessor / Mistral3Processor), fall back to plain string content (AutoTokenizer), then to manual [INST]…[/INST] Qwen3 encoder probe strictness - _get_qwen3_variant_from_state_dict and _get_variant_from_config now return None / raise NotAMatchError for unknown hidden_size instead of silently defaulting to qwen3_4b. The old fallback meant any llama.cpp GGUF causal LM (Mistral, Llama, …) was wrongly classified as Qwen3 — visible when the Mistral 3.x GGUF was identified as a Qwen3-4B encoder - Checkpoint / GGUF / Diffusers loaders propagate the strictness --- .../app/invocations/flux2_dev_text_encoder.py | 49 +++--- .../model_manager/configs/qwen3_encoder.py | 51 +++--- .../load/model_loaders/mistral_encoder.py | 152 +++++++++++++++--- invokeai/frontend/web/public/locales/en.json | 2 + .../controlLayers/store/paramsSlice.ts | 4 +- .../util/graph/generation/buildFLUXGraph.ts | 1 + .../features/queue/store/readiness.test.ts | 4 + .../web/src/features/queue/store/readiness.ts | 60 +++++-- 8 files changed, 246 insertions(+), 77 deletions(-) diff --git a/invokeai/app/invocations/flux2_dev_text_encoder.py b/invokeai/app/invocations/flux2_dev_text_encoder.py index 046601545d6..2a8af851b96 100644 --- a/invokeai/app/invocations/flux2_dev_text_encoder.py +++ b/invokeai/app/invocations/flux2_dev_text_encoder.py @@ -139,18 +139,21 @@ def _encode_prompt(self, context: InvocationContext, exit_stack: ExitStack) -> t "The Mistral encoder model may be corrupted or incompatible." ) - # Build the chat-template messages. The processor may be either a full - # AutoProcessor (for Mistral3ForConditionalGeneration) or a bare tokenizer - # (for text-only single-file/GGUF loaders); both expose `apply_chat_template`. - messages = [ - { - "role": "system", - "content": [{"type": "text", "text": FLUX2_DEV_SYSTEM_MESSAGE}], - }, - { - "role": "user", - "content": [{"type": "text", "text": self.prompt}], - }, + # Two valid chat-template content shapes depending on the loaded artifact: + # - Multimodal Mistral3 processors (PixtralProcessor / Mistral3Processor) want + # `[{type: "text", text: ...}]` even for text-only prompts and crash on a + # plain string with `string indices must be integers`. + # - Plain AutoTokenizer / MistralTokenizer want simple string content and + # may fail on the dict-list form depending on the template. + # We try multimodal first (matches BFL's canonical FLUX.2-dev processor), + # then fall back to string content, then to manual [INST]...[/INST] format. + multimodal_messages = [ + {"role": "system", "content": [{"type": "text", "text": FLUX2_DEV_SYSTEM_MESSAGE}]}, + {"role": "user", "content": [{"type": "text", "text": self.prompt}]}, + ] + plain_messages = [ + {"role": "system", "content": FLUX2_DEV_SYSTEM_MESSAGE}, + {"role": "user", "content": self.prompt}, ] tokenize_kwargs = { @@ -163,12 +166,22 @@ def _encode_prompt(self, context: InvocationContext, exit_stack: ExitStack) -> t "max_length": self.max_seq_len, } - try: - inputs = processor.apply_chat_template(messages, **tokenize_kwargs) - except (AttributeError, ValueError): - # Fallback path: processor has no chat template (single-file - # tokenizer download). Format the prompt manually using Mistral's - # [INST]...[/INST] convention. + inputs = None + last_error: Exception | None = None + for messages in (multimodal_messages, plain_messages): + try: + inputs = processor.apply_chat_template(messages, **tokenize_kwargs) + break + except (AttributeError, ValueError, TypeError, KeyError) as e: + last_error = e + + if inputs is None: + # Fallback: no usable chat template. Format the prompt manually using + # Mistral's classic [INST]...[/INST] convention. + context.logger.debug( + f"Mistral chat template failed ({type(last_error).__name__}: {last_error}); " + "falling back to manual [INST] formatting." + ) text = f"[INST] {FLUX2_DEV_SYSTEM_MESSAGE}\n\n{self.prompt} [/INST]" inputs = processor( text, diff --git a/invokeai/backend/model_manager/configs/qwen3_encoder.py b/invokeai/backend/model_manager/configs/qwen3_encoder.py index 308539aa354..49ed34a8fba 100644 --- a/invokeai/backend/model_manager/configs/qwen3_encoder.py +++ b/invokeai/backend/model_manager/configs/qwen3_encoder.py @@ -92,16 +92,16 @@ def _get_qwen3_variant_from_state_dict(state_dict: dict[str | int, Any]) -> Opti else: return None - # Determine variant based on hidden_size + # Determine variant based on hidden_size. Unknown sizes mean this is NOT a + # recognized Qwen3 variant (could be another causal LM in GGUF format such as + # Mistral or Llama, which use identical llama.cpp key naming). if hidden_size == QWEN3_06B_HIDDEN_SIZE: return Qwen3VariantType.Qwen3_06B elif hidden_size == QWEN3_4B_HIDDEN_SIZE: return Qwen3VariantType.Qwen3_4B elif hidden_size == QWEN3_8B_HIDDEN_SIZE: return Qwen3VariantType.Qwen3_8B - else: - # Unknown size, default to 4B (more common) - return Qwen3VariantType.Qwen3_4B + return None class Qwen3Encoder_Checkpoint_Config(Checkpoint_Config_Base, Config_Base): @@ -130,10 +130,16 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - @classmethod def _get_variant_or_default(cls, mod: ModelOnDisk) -> Qwen3VariantType: - """Get variant from state dict, defaulting to 4B if unknown.""" + """Get the variant from state dict, raising NotAMatch when the size does not match a known Qwen3 variant. + + We previously defaulted to 4B for unknown sizes, but that swallowed other causal-LM GGUFs + (Mistral, Llama, ...) which share llama.cpp tensor naming with Qwen3. + """ state_dict = mod.load_state_dict() variant = _get_qwen3_variant_from_state_dict(state_dict) - return variant if variant is not None else Qwen3VariantType.Qwen3_4B + if variant is None: + raise NotAMatchError("hidden size does not match a known Qwen3 variant") + return variant @classmethod def _validate_looks_like_qwen3_model(cls, mod: ModelOnDisk) -> None: @@ -217,7 +223,7 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - @classmethod def _get_variant_from_config(cls, config_path) -> Qwen3VariantType: - """Get variant from config.json based on hidden_size.""" + """Get variant from config.json based on hidden_size, or raise NotAMatch if unknown.""" QWEN3_06B_HIDDEN_SIZE = 1024 QWEN3_4B_HIDDEN_SIZE = 2560 QWEN3_8B_HIDDEN_SIZE = 4096 @@ -225,18 +231,17 @@ def _get_variant_from_config(cls, config_path) -> Qwen3VariantType: try: with open(config_path, "r", encoding="utf-8") as f: config = json.load(f) - hidden_size = config.get("hidden_size") - if hidden_size == QWEN3_8B_HIDDEN_SIZE: - return Qwen3VariantType.Qwen3_8B - elif hidden_size == QWEN3_4B_HIDDEN_SIZE: - return Qwen3VariantType.Qwen3_4B - elif hidden_size == QWEN3_06B_HIDDEN_SIZE: - return Qwen3VariantType.Qwen3_06B - else: - # Default to 4B for unknown sizes - return Qwen3VariantType.Qwen3_4B - except (json.JSONDecodeError, OSError): + except (json.JSONDecodeError, OSError) as e: + raise NotAMatchError(f"unable to read Qwen3 config.json: {e}") from e + + hidden_size = config.get("hidden_size") + if hidden_size == QWEN3_8B_HIDDEN_SIZE: + return Qwen3VariantType.Qwen3_8B + elif hidden_size == QWEN3_4B_HIDDEN_SIZE: return Qwen3VariantType.Qwen3_4B + elif hidden_size == QWEN3_06B_HIDDEN_SIZE: + return Qwen3VariantType.Qwen3_06B + raise NotAMatchError(f"hidden_size {hidden_size} does not match a known Qwen3 variant") class Qwen3Encoder_GGUF_Config(Checkpoint_Config_Base, Config_Base): @@ -265,10 +270,16 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - @classmethod def _get_variant_or_default(cls, mod: ModelOnDisk) -> Qwen3VariantType: - """Get variant from state dict, defaulting to 4B if unknown.""" + """Get the variant from state dict, raising NotAMatch when the size does not match a known Qwen3 variant. + + We previously defaulted to 4B for unknown sizes, but that swallowed other causal-LM GGUFs + (Mistral, Llama, ...) which share llama.cpp tensor naming with Qwen3. + """ state_dict = mod.load_state_dict() variant = _get_qwen3_variant_from_state_dict(state_dict) - return variant if variant is not None else Qwen3VariantType.Qwen3_4B + if variant is None: + raise NotAMatchError("hidden size does not match a known Qwen3 variant") + return variant @classmethod def _validate_looks_like_qwen3_model(cls, mod: ModelOnDisk) -> None: diff --git a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py index ad4f38753dc..3ff30433059 100644 --- a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py +++ b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py @@ -12,7 +12,7 @@ import accelerate import torch -from transformers import AutoProcessor, MistralConfig, MistralModel +from transformers import AutoProcessor, AutoTokenizer, MistralConfig, MistralModel from invokeai.backend.model_manager.configs.factory import AnyModelConfig from invokeai.backend.model_manager.configs.mistral_encoder import ( @@ -50,11 +50,20 @@ _MISTRAL_SMALL_3_1_ROPE_THETA = 1000000.0 _MISTRAL_SMALL_3_1_RMS_NORM_EPS = 1e-5 -# Default tokenizer / processor source. The official Mistral repo requires -# accepting a license; FLUX.2-dev embeds the same processor under `tokenizer/` -# and is the canonical companion for image-generation use. -_DEFAULT_PROCESSOR_SOURCE = "black-forest-labs/FLUX.2-dev" -_DEFAULT_PROCESSOR_SUBFOLDER = "tokenizer" +# Fallback tokenizer/processor sources for single-file / GGUF Mistral encoders. +# The GGUF format doesn't bundle a tokenizer; we have to fetch one. We try each +# source in order, preferring the local HuggingFace cache before any network +# lookup, and use AutoTokenizer (text-only, simpler config requirements) so the +# offline fallback works even when HF Hub is unreachable. +# +# - ``black-forest-labs/FLUX.2-dev`` (subfolder=``tokenizer``): canonical FLUX.2 processor +# - ``mistralai/Mistral-Small-3.1-24B-Instruct-2503``: official Mistral 3.1, the version FLUX.2 was trained on +# - ``mistralai/Mistral-Small-3.2-24B-Instruct-2506``: drop-in 3.2 (same chat template) +_TOKENIZER_FALLBACK_SOURCES: tuple[tuple[str, Optional[str]], ...] = ( + ("black-forest-labs/FLUX.2-dev", "tokenizer"), + ("mistralai/Mistral-Small-3.1-24B-Instruct-2503", None), + ("mistralai/Mistral-Small-3.2-24B-Instruct-2506", None), +) def _build_mistral_config( @@ -143,6 +152,62 @@ def _strip_known_prefixes(sd: dict[str, Any]) -> dict[str, Any]: return out +def _convert_for_bare_mistral_model(sd: dict[str, Any]) -> dict[str, Any]: + """Rewrite a `model.*` causal-LM state dict for direct loading into ``MistralModel``. + + Transformers' ``MistralForCausalLM`` exposes its decoder under ``model.`` and adds + an ``lm_head``; bare ``MistralModel`` has the decoder modules at the top level + (``embed_tokens``, ``layers``, ``norm``) and no LM head. Our state dicts come from + GGUF / safetensors that target the CausalLM layout, so we strip the prefix and + drop the LM head before calling ``MistralModel.load_state_dict``. + """ + out: dict[str, Any] = {} + for key, value in sd.items(): + if not isinstance(key, str): + out[key] = value + continue + if key.startswith("lm_head."): + continue + if key.startswith("model."): + out[key[len("model.") :]] = value + else: + out[key] = value + return out + + +def _materialize_remaining_meta_tensors(model: torch.nn.Module, dtype: torch.dtype, logger) -> None: + """Replace any parameters/buffers still on the meta device after load_state_dict. + + A meta tensor in the final model triggers ``Cannot copy out of meta tensor`` when + the model cache moves the weights to the compute device. We can't recover the + actual values for missing weights, but we can at least give the model a real + tensor — norms get ones, everything else gets zeros — so the load completes and + obvious errors are easier to debug than a low-level move failure. + """ + materialized: list[str] = [] + for name, param in list(model.named_parameters()): + if not param.is_meta: + continue + is_norm = "norm" in name.split(".") or name.endswith("_norm.weight") + new_tensor = torch.ones(param.shape, dtype=dtype) if is_norm else torch.zeros(param.shape, dtype=dtype) + parent_name, _, attr = name.rpartition(".") + parent = model.get_submodule(parent_name) if parent_name else model + setattr(parent, attr, torch.nn.Parameter(new_tensor, requires_grad=False)) + materialized.append(name) + for name, buffer in list(model.named_buffers()): + if not buffer.is_meta: + continue + parent_name, _, attr = name.rpartition(".") + parent = model.get_submodule(parent_name) if parent_name else model + parent.register_buffer(attr, torch.zeros(buffer.shape, dtype=dtype), persistent=False) + materialized.append(f"{name} (buffer)") + if materialized: + logger.warning( + f"Mistral encoder: materialized {len(materialized)} meta tensor(s) with default values " + f"(this usually means a key was missing from the checkpoint). First 5: {materialized[:5]}" + ) + + def _drop_quantization_metadata(sd: dict[str, Any], logger) -> dict[str, Any]: """Dequantize Comfy-Org-style FP8/FP4 weights and drop their metadata keys. @@ -181,18 +246,47 @@ def _drop_quantization_metadata(sd: dict[str, Any], logger) -> dict[str, Any]: def _load_processor_with_offline_fallback() -> AnyModel: - """Load the FLUX.2 Mistral processor (tokenizer + chat template) from cache, else HF.""" - try: - return AutoProcessor.from_pretrained( - _DEFAULT_PROCESSOR_SOURCE, - subfolder=_DEFAULT_PROCESSOR_SUBFOLDER, - local_files_only=True, - ) - except (OSError, EnvironmentError): - return AutoProcessor.from_pretrained( - _DEFAULT_PROCESSOR_SOURCE, - subfolder=_DEFAULT_PROCESSOR_SUBFOLDER, - ) + """Load a Mistral tokenizer / processor for FLUX.2 [dev] text encoding. + + Strategy: walk the fallback source list twice — first looking only at the + local HuggingFace cache, then with network lookups enabled. For each entry + we try ``AutoProcessor`` (multimodal Mistral3 processor, includes the + ``apply_chat_template`` we use) and then ``AutoTokenizer`` (text-only, used + when the source ships only tokenizer files without the multimodal + ``processor_config.json``). The first match wins. + """ + attempts: list[str] = [] + + def _try(source: str, subfolder: Optional[str], local_only: bool) -> Optional[AnyModel]: + kwargs: dict[str, Any] = {"local_files_only": local_only} + if subfolder is not None: + kwargs["subfolder"] = subfolder + for loader_cls in (AutoProcessor, AutoTokenizer): + try: + return loader_cls.from_pretrained(source, **kwargs) + except (OSError, EnvironmentError, ValueError) as e: + attempts.append( + f"{loader_cls.__name__}({source}, subfolder={subfolder}, local_only={local_only}): {type(e).__name__}" + ) + return None + + for local_only in (True, False): + for source, subfolder in _TOKENIZER_FALLBACK_SOURCES: + result = _try(source, subfolder, local_only) + if result is not None: + return result + + sources_str = ", ".join(f"{s}{f':{f}' if f else ''}" for s, f in _TOKENIZER_FALLBACK_SOURCES) + raise RuntimeError( + "Could not load a Mistral tokenizer/processor for FLUX.2 [dev]. " + f"Tried (cached + online): {sources_str}. " + "Workarounds: (1) install the full FLUX.2-dev diffusers folder as a model in InvokeAI " + "(it bundles the tokenizer), (2) point HF_ENDPOINT at a reachable HuggingFace mirror " + "or run once with internet access to populate the local cache, " + "or (3) pre-cache the tokenizer with: " + "`huggingface-cli download black-forest-labs/FLUX.2-dev --include 'tokenizer/*'`. " + f"Attempt details: {'; '.join(attempts[-6:])}" + ) @ModelLoaderRegistry.register( @@ -304,6 +398,9 @@ def _load_text_encoder(self, config: MistralEncoder_Checkpoint_Config) -> AnyMod for k in list(sd.keys()): sd[k] = sd[k].to(model_dtype) + # Adapt CausalLM-prefixed keys for bare MistralModel. + sd = _convert_for_bare_mistral_model(sd) + with accelerate.init_empty_weights(): model = MistralModel(mistral_config) @@ -338,6 +435,8 @@ def _load_text_encoder(self, config: MistralEncoder_Checkpoint_Config) -> AnyMod ) parent.register_buffer(parts[-1], inv_freq.to(model_dtype), persistent=False) + _materialize_remaining_meta_tensors(model, model_dtype, logger) + return model @@ -390,10 +489,19 @@ def _load_from_gguf(self, config: MistralEncoder_GGUF_Config) -> AnyModel: f"kv_heads={mistral_config.num_key_value_heads}, intermediate={mistral_config.intermediate_size}" ) + # Adapt CausalLM-prefixed keys for bare MistralModel. + sd = _convert_for_bare_mistral_model(sd) + with accelerate.init_empty_weights(): model = MistralModel(mistral_config) - model.load_state_dict(sd, strict=False, assign=True) + missing, unexpected = model.load_state_dict(sd, strict=False, assign=True) + if unexpected: + logger.debug(f"Mistral encoder (GGUF): ignored {len(unexpected)} unexpected keys") + if missing: + logger.debug( + f"Mistral encoder (GGUF): {len(missing)} keys missing from state dict (first 5: {missing[:5]})" + ) # Embedding lookups require an indexable tensor — dequantize the GGMLTensor for embed_tokens. embed_weight = model.embed_tokens.weight @@ -410,6 +518,8 @@ def _load_from_gguf(self, config: MistralEncoder_GGUF_Config) -> AnyModel: ) parent.register_buffer(parts[-1], inv_freq.to(compute_dtype), persistent=False) + _materialize_remaining_meta_tensors(model, compute_dtype, logger) + return model @@ -433,6 +543,10 @@ def _convert_llamacpp_mistral_to_pytorch(sd: dict[str, Any]) -> dict[str, Any]: parts = key.split(".", 2) # ["blk", "", ""] if len(parts) == 3: rest = parts[2] + # Order matters: q_norm/k_norm must be checked BEFORE attn_q/attn_k + # so we don't rewrite "attn_q_norm" -> "self_attn.q_proj_norm". + rest = rest.replace("attn_q_norm.", "self_attn.q_norm.") + rest = rest.replace("attn_k_norm.", "self_attn.k_norm.") rest = rest.replace("attn_q.", "self_attn.q_proj.") rest = rest.replace("attn_k.", "self_attn.k_proj.") rest = rest.replace("attn_v.", "self_attn.v_proj.") diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 3e88d460e55..5f37034b624 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1678,6 +1678,8 @@ "noQwen3EncoderModelSelected": "No Qwen3 Encoder model selected for FLUX2 Klein generation", "noFlux2KleinVaeModelSelected": "No VAE selected. Non-diffusers FLUX.2 Klein models require a standalone VAE", "noFlux2KleinQwen3EncoderModelSelected": "No Qwen3 Encoder selected. Non-diffusers FLUX.2 Klein models require a standalone Qwen3 Encoder", + "noFlux2DevVaeModelSelected": "No VAE selected. Non-diffusers FLUX.2 [dev] models require a standalone FLUX.2 VAE", + "noFlux2DevMistralEncoderModelSelected": "No Mistral Encoder selected. Non-diffusers FLUX.2 [dev] models require a standalone Mistral text encoder", "noQwenImageComponentSourceSelected": "GGUF Qwen Image models require a Diffusers Component Source for VAE/encoder", "noZImageVaeSourceSelected": "No VAE source: Select VAE (FLUX) or Qwen3 Source model", "noZImageQwen3EncoderSourceSelected": "No Qwen3 Encoder source: Select Qwen3 Encoder or Qwen3 Source model", diff --git a/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts index 312b857c3a7..954e9662eda 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts @@ -809,9 +809,7 @@ export const selectAnimaScheduler = createParamsSelector((params) => params.anim export const selectKleinVaeModel = createParamsSelector((params) => params.kleinVaeModel); export const selectKleinQwen3EncoderModel = createParamsSelector((params) => params.kleinQwen3EncoderModel); export const selectFlux2DevVaeModel = createParamsSelector((params) => params.flux2DevVaeModel); -export const selectFlux2DevMistralEncoderModel = createParamsSelector( - (params) => params.flux2DevMistralEncoderModel -); +export const selectFlux2DevMistralEncoderModel = createParamsSelector((params) => params.flux2DevMistralEncoderModel); export const selectFlux2DevSourceModel = createParamsSelector((params) => params.flux2DevSourceModel); export const selectQwenImageComponentSource = createParamsSelector((params) => params.qwenImageComponentSource); export const selectQwenImageVaeModel = createParamsSelector((params) => params.qwenImageVaeModel); diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts index ed9fefa1e44..a7df1ab031d 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/generation/buildFLUXGraph.ts @@ -195,6 +195,7 @@ export const buildFLUXGraph = async (arg: GraphBuilderArg): Promise ({ isConnected: true, model: overrides.model ?? flux2DiffusersModel, @@ -94,6 +95,7 @@ const buildGenerateTabArg = (overrides: { dynamicPrompts: baseDynamicPrompts, hasFlux2DiffusersVaeSource: overrides.hasFlux2DiffusersVaeSource ?? false, hasFlux2DiffusersQwen3Source: overrides.hasFlux2DiffusersQwen3Source ?? false, + hasFlux2DevDiffusersSource: overrides.hasFlux2DevDiffusersSource ?? false, }); const buildCanvasTabArg = (overrides: { @@ -102,6 +104,7 @@ const buildCanvasTabArg = (overrides: { kleinQwen3EncoderModel?: unknown; hasFlux2DiffusersVaeSource?: boolean; hasFlux2DiffusersQwen3Source?: boolean; + hasFlux2DevDiffusersSource?: boolean; }) => ({ isConnected: true, model: overrides.model ?? flux2DiffusersModel, @@ -131,6 +134,7 @@ const buildCanvasTabArg = (overrides: { canvasIsSelectingObject: false, hasFlux2DiffusersVaeSource: overrides.hasFlux2DiffusersVaeSource ?? false, hasFlux2DiffusersQwen3Source: overrides.hasFlux2DiffusersQwen3Source ?? false, + hasFlux2DevDiffusersSource: overrides.hasFlux2DevDiffusersSource ?? false, }); const hasFlux2VaeReason = (reasons: { content: string }[]) => diff --git a/invokeai/frontend/web/src/features/queue/store/readiness.ts b/invokeai/frontend/web/src/features/queue/store/readiness.ts index 230fa3348d6..313f5d1cc44 100644 --- a/invokeai/frontend/web/src/features/queue/store/readiness.ts +++ b/invokeai/frontend/web/src/features/queue/store/readiness.ts @@ -40,7 +40,7 @@ import type { TabName } from 'features/ui/store/uiTypes'; import i18n from 'i18next'; import { atom, computed } from 'nanostores'; import { useEffect } from 'react'; -import { selectFlux2DiffusersModels } from 'services/api/hooks/modelsByType'; +import { selectFlux2DevDiffusersModels, selectFlux2DiffusersModels } from 'services/api/hooks/modelsByType'; import type { MainOrExternalModelConfig } from 'services/api/types'; import { isExternalApiModelConfig } from 'services/api/types'; import { $isConnected } from 'services/events/stores'; @@ -117,6 +117,7 @@ const debouncedUpdateReasons = debounce(async (arg: UpdateReasonsArg) => { const hasFlux2DiffusersQwen3Source = flux2DiffusersModels.some( (m) => 'variant' in m && isFlux2KleinQwen3Compatible(m.variant, modelVariant) ); + const hasFlux2DevDiffusersSource = selectFlux2DevDiffusersModels(store.getState()).length > 0; const reasons = await getReasonsWhyCannotEnqueueGenerateTab({ isConnected, model, @@ -126,6 +127,7 @@ const debouncedUpdateReasons = debounce(async (arg: UpdateReasonsArg) => { loras, hasFlux2DiffusersVaeSource, hasFlux2DiffusersQwen3Source, + hasFlux2DevDiffusersSource, }); $reasonsWhyCannotEnqueue.set(reasons); } else if (tab === 'canvas') { @@ -136,6 +138,7 @@ const debouncedUpdateReasons = debounce(async (arg: UpdateReasonsArg) => { const hasFlux2DiffusersQwen3Source = flux2DiffusersModels.some( (m) => 'variant' in m && isFlux2KleinQwen3Compatible(m.variant, modelVariant) ); + const hasFlux2DevDiffusersSource = selectFlux2DevDiffusersModels(store.getState()).length > 0; const reasons = await getReasonsWhyCannotEnqueueCanvasTab({ isConnected, model, @@ -151,6 +154,7 @@ const debouncedUpdateReasons = debounce(async (arg: UpdateReasonsArg) => { loras, hasFlux2DiffusersVaeSource, hasFlux2DiffusersQwen3Source, + hasFlux2DevDiffusersSource, }); $reasonsWhyCannotEnqueue.set(reasons); } else if (tab === 'workflows') { @@ -247,6 +251,7 @@ export const getReasonsWhyCannotEnqueueGenerateTab = (arg: { dynamicPrompts: DynamicPromptsState; hasFlux2DiffusersVaeSource: boolean; hasFlux2DiffusersQwen3Source: boolean; + hasFlux2DevDiffusersSource: boolean; }) => { const { isConnected, @@ -257,6 +262,7 @@ export const getReasonsWhyCannotEnqueueGenerateTab = (arg: { dynamicPrompts, hasFlux2DiffusersVaeSource, hasFlux2DiffusersQwen3Source, + hasFlux2DevDiffusersSource, } = arg; const { positivePrompt } = params; const reasons: Reason[] = []; @@ -290,14 +296,24 @@ export const getReasonsWhyCannotEnqueueGenerateTab = (arg: { } if (model?.base === 'flux2' && model.format !== 'diffusers') { - // Non-diffusers FLUX.2 Klein models require standalone VAE and Qwen3 Encoder - // unless a diffusers flux2 model is available to extract them from. - // VAE is shared across variants, but Qwen3 encoder requires a variant-matching diffusers model. - if (!params.kleinVaeModel && !hasFlux2DiffusersVaeSource) { - reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinVaeModelSelected') }); - } - if (!params.kleinQwen3EncoderModel && !hasFlux2DiffusersQwen3Source) { - reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinQwen3EncoderModelSelected') }); + // Non-diffusers FLUX.2 models need standalone VAE + text encoder unless a Diffusers + // pipeline of the matching variant family is installed to extract from. + if ('variant' in model && model.variant === 'dev') { + // FLUX.2 [dev]: needs FLUX.2 VAE + Mistral text encoder. + if (!params.flux2DevVaeModel && !hasFlux2DevDiffusersSource) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2DevVaeModelSelected') }); + } + if (!params.flux2DevMistralEncoderModel && !hasFlux2DevDiffusersSource) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2DevMistralEncoderModelSelected') }); + } + } else { + // FLUX.2 Klein: needs FLUX.2 VAE + Qwen3 text encoder (variant-matched). + if (!params.kleinVaeModel && !hasFlux2DiffusersVaeSource) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinVaeModelSelected') }); + } + if (!params.kleinQwen3EncoderModel && !hasFlux2DiffusersQwen3Source) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinQwen3EncoderModelSelected') }); + } } } @@ -510,6 +526,7 @@ export const getReasonsWhyCannotEnqueueCanvasTab = (arg: { canvasIsSelectingObject: boolean; hasFlux2DiffusersVaeSource: boolean; hasFlux2DiffusersQwen3Source: boolean; + hasFlux2DevDiffusersSource: boolean; }) => { const { isConnected, @@ -526,6 +543,7 @@ export const getReasonsWhyCannotEnqueueCanvasTab = (arg: { canvasIsSelectingObject, hasFlux2DiffusersVaeSource, hasFlux2DiffusersQwen3Source, + hasFlux2DevDiffusersSource, } = arg; const { positivePrompt } = params; const reasons: Reason[] = []; @@ -618,15 +636,23 @@ export const getReasonsWhyCannotEnqueueCanvasTab = (arg: { } if (model?.base === 'flux2') { - // Non-diffusers FLUX.2 Klein models require standalone VAE and Qwen3 Encoder - // unless a diffusers flux2 model is available to extract them from. - // VAE is shared across variants, but Qwen3 encoder requires a variant-matching diffusers model. + // Non-diffusers FLUX.2 models need standalone VAE + text encoder unless a Diffusers + // pipeline of the matching variant family is installed to extract from. if (model.format !== 'diffusers') { - if (!params.kleinVaeModel && !hasFlux2DiffusersVaeSource) { - reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinVaeModelSelected') }); - } - if (!params.kleinQwen3EncoderModel && !hasFlux2DiffusersQwen3Source) { - reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinQwen3EncoderModelSelected') }); + if ('variant' in model && model.variant === 'dev') { + if (!params.flux2DevVaeModel && !hasFlux2DevDiffusersSource) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2DevVaeModelSelected') }); + } + if (!params.flux2DevMistralEncoderModel && !hasFlux2DevDiffusersSource) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2DevMistralEncoderModelSelected') }); + } + } else { + if (!params.kleinVaeModel && !hasFlux2DiffusersVaeSource) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinVaeModelSelected') }); + } + if (!params.kleinQwen3EncoderModel && !hasFlux2DiffusersQwen3Source) { + reasons.push({ content: i18n.t('parameters.invoke.noFlux2KleinQwen3EncoderModelSelected') }); + } } } From 684d7d500ded0a69832be162e1b8ab85784b50da Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Mon, 25 May 2026 22:34:59 +0200 Subject: [PATCH 3/8] Chore Path fix --- invokeai/frontend/web/src/services/api/schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index 1cb1ad27d5c..cebbf3e2643 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -16597,14 +16597,14 @@ export type components = { * Convert Cache Dir * Format: path * @description Path to the converted models cache directory (DEPRECATED, but do not delete because it is needed for migration from previous versions). - * @default models\.convert_cache + * @default models/.convert_cache */ convert_cache_dir?: string; /** * Download Cache Dir * Format: path * @description Path to the directory that contains dynamically downloaded models. - * @default models\.download_cache + * @default models/.download_cache */ download_cache_dir?: string; /** From b8579510f37489bdd0cac7c3b05c8a163191b55c Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Sat, 6 Jun 2026 02:25:16 +0200 Subject: [PATCH 4/8] FLUX.2 [dev]: restrict Mistral encoder to 30-layer cow + add recall handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream Mistral Small 3.1/3.2 (40 layers) produces off-distribution embeddings under FLUX.2's static (10, 20, 30) hidden-state extraction. The joint attention was actually trained against BFL's 30-layer cow-mistral3-small distillation — both Comfy-Org's safetensors and gguf-org's cow GGUFs ship the same 30-layer weights, just packaged differently. - Probing (configs/mistral_encoder.py) now rejects non-cow Mistrals across all three formats (Diffusers / Checkpoint / GGUF) with a clear error. - Loader (load/model_loaders/mistral_encoder.py) extracts the embedded Tekken tokenizer from the `tekken_model` U8 (safetensors) / fp16-per-byte (cow GGUF) tensor via mistral_common, falling back to the BFL HF tokenizer. Removes the INVOKEAI_MISTRAL_TOKENIZER_SOURCE env var. - Starter models: drop upstream Mistral 3.x entries, add Comfy-Org bf16/fp8/fp4 variants alongside the cow GGUFs. - MistralVariantType: drop Small3_1, keep only Cow. - pyproject.toml: add mistral-common dependency. Frontend recall: - Add Flux2DevVAEModel + Flux2DevMistralEncoderModel handlers, disambiguating Klein vs dev via presence of `mistral_encoder` / `qwen3_encoder` metadata fields (both bases are `flux2`). - Wire both into the Recall Parameters panel (hardcoded list was missing them). - Add `metadata.mistralEncoder` i18n key + colocated tests. --- .../app/invocations/flux2_dev_text_encoder.py | 36 +- .../model_manager/configs/mistral_encoder.py | 117 +++-- .../load/model_loaders/mistral_encoder.py | 429 ++++++++++++++---- .../backend/model_manager/starter_models.py | 145 ++++-- invokeai/backend/model_manager/taxonomy.py | 9 +- invokeai/frontend/web/public/locales/en.json | 1 + .../ImageMetadataActions.tsx | 2 + .../src/features/metadata/parsing.test.tsx | 99 +++- .../web/src/features/metadata/parsing.tsx | 71 ++- .../web/src/features/modelManagerV2/models.ts | 2 +- .../web/src/features/nodes/types/common.ts | 2 +- .../frontend/web/src/services/api/schema.ts | 12 +- pyproject.toml | 1 + 13 files changed, 744 insertions(+), 182 deletions(-) diff --git a/invokeai/app/invocations/flux2_dev_text_encoder.py b/invokeai/app/invocations/flux2_dev_text_encoder.py index 2a8af851b96..22beb6c8e22 100644 --- a/invokeai/app/invocations/flux2_dev_text_encoder.py +++ b/invokeai/app/invocations/flux2_dev_text_encoder.py @@ -1,15 +1,18 @@ """FLUX.2 [dev] text encoder invocation. -FLUX.2 [dev] uses Mistral Small 3.1 as its sole text encoder, following the -diffusers Flux2Pipeline reference implementation: +FLUX.2 [dev] uses the BFL "cow-mistral3-small" 30-layer Mistral distillation as +its sole text encoder (sometimes referred to as "Mistral Small 3" in BFL's +documentation, but the shipped weights are the 30-layer cow variant — upstream +40-layer Mistral Small 3.1 / 3.2 does not work): - A fixed system message biases the model toward structured image descriptions. - The user prompt is wrapped in Mistral's chat template via the multimodal AutoProcessor. -- Three intermediate hidden states (layers 10, 20, 30 in the 30-layer model) are - stacked and flattened to produce a (B, seq, 3 * hidden_size) tensor — for - Mistral Small 3.1 that is 3 * 5120 = 15360, matching the transformer's - joint_attention_dim. +- Three intermediate hidden states (layers 10, 20, 30) are stacked and flattened + to produce a (B, seq, 3 * hidden_size) = (B, seq, 15360) tensor matching the + FLUX.2 transformer's joint_attention_dim. For the 30-layer cow model those + indices map to (1/3, 2/3, last) — exactly what BFL's joint attention was + trained to consume. """ from contextlib import ExitStack @@ -46,11 +49,11 @@ "without speculation." ) -# Diffusers / BFL extract hidden states from these layers and stack them. -# Indices are 1-based into hidden_states[] (hidden_states[0] is the embedding layer). -# Mistral Small 3.1 has 40 transformer layers (so up to hidden_states[40]); the -# reference pipeline uses (10, 20, 30) and we scale proportionally if the model -# has fewer layers. +# Indices into hidden_states[] (hidden_states[0] is the embedding output) that +# FLUX.2 [dev]'s joint attention was trained to consume. Hard-coded to the +# 30-layer cow Mistral — (10, 20, 30) hits (1/3, 2/3, last) for that depth. +# The model loaders reject anything other than 30-layer cow weights, so we don't +# need a scaling fallback here. DEV_EXTRACTION_LAYERS = (10, 20, 30) # Default max sequence length for FLUX.2 [dev]. The reference pipeline caps at 512. @@ -213,12 +216,13 @@ def _encode_prompt(self, context: InvocationContext, exit_stack: ExitStack) -> t ) num_hidden_states = len(outputs.hidden_states) # = num_hidden_layers + 1 (embedding output) - # Scale extraction layer indices if the model is smaller than the reference. - # hidden_states[0] is the embedding output, hidden_states[i] is the output of layer i. + # Safety check: the model loaders only accept 30-layer cow weights, so + # hidden_states[] should have ≥ 31 entries (embedding output + 30 layers). + # Fall back to a scaled tuple only if a non-cow encoder somehow slipped + # past the loaders, so we don't crash with an IndexError. if num_hidden_states - 1 < max(DEV_EXTRACTION_LAYERS): - n = num_hidden_states - 1 # number of transformer layers - scaled = (max(1, n // 3), max(1, (2 * n) // 3), n) - extraction_layers = scaled + n = num_hidden_states - 1 + extraction_layers = (max(1, n // 3), max(1, (2 * n) // 3), n) else: extraction_layers = DEV_EXTRACTION_LAYERS diff --git a/invokeai/backend/model_manager/configs/mistral_encoder.py b/invokeai/backend/model_manager/configs/mistral_encoder.py index 19d01729468..6bf8bd634f1 100644 --- a/invokeai/backend/model_manager/configs/mistral_encoder.py +++ b/invokeai/backend/model_manager/configs/mistral_encoder.py @@ -1,5 +1,5 @@ import json -from typing import Any, Literal, Optional, Self +from typing import Any, Literal, Self from pydantic import Field @@ -15,8 +15,15 @@ from invokeai.backend.model_manager.taxonomy import BaseModelType, MistralVariantType, ModelFormat, ModelType from invokeai.backend.quantization.gguf.ggml_tensor import GGMLTensor -# Mistral Small 3.1 hidden_size. Used by FLUX.2 [dev]. -_MISTRAL_SMALL_3_1_HIDDEN_SIZE = 5120 +# Mistral cow distillation hidden_size. Used by FLUX.2 [dev]. +_COW_HIDDEN_SIZE = 5120 + +# Layer count of the BFL "cow-mistral3-small" distillation. FLUX.2 [dev]'s joint +# attention was trained with hidden-state indices (10, 20, 30) — for a 30-layer +# Mistral that's (1/3, 2/3, last). Upstream Mistral Small 3.1 / 3.2 (40 layers) +# sample at different relative depths and produce off-distribution embeddings, +# so we reject anything but 30-layer cow encoders. +_COW_NUM_LAYERS = 30 def _has_mistral_keys(state_dict: dict[str | int, Any]) -> bool: @@ -50,6 +57,30 @@ def _has_ggml_tensors(state_dict: dict[str | int, Any]) -> bool: return any(isinstance(v, GGMLTensor) for v in state_dict.values()) +def _count_mistral_layers(state_dict: dict[str | int, Any]) -> int: + """Count transformer layers in a Mistral state dict. + + Supports both transformers' ``model.layers.N.*`` layout and llama.cpp's + ``blk.N.*`` layout. Returns 0 if no per-layer keys are present. + """ + indices: set[int] = set() + for key in state_dict.keys(): + if not isinstance(key, str): + continue + # transformers / diffusers: model.layers.N.* or language_model.model.layers.N.* + if ".layers." in key: + parts = key.split(".layers.", 1)[1].split(".", 1) + if parts and parts[0].isdigit(): + indices.add(int(parts[0])) + continue + # llama.cpp GGUF: blk.N.* + if key.startswith("blk."): + parts = key.split(".", 2) + if len(parts) >= 2 and parts[1].isdigit(): + indices.add(int(parts[1])) + return (max(indices) + 1) if indices else 0 + + def _embed_hidden_size(state_dict: dict[str | int, Any]) -> int | None: """Read the embedding hidden size from a Mistral-like state dict. @@ -73,34 +104,37 @@ def _embed_hidden_size(state_dict: dict[str | int, Any]) -> int | None: return None -def _get_mistral_variant_from_state_dict(state_dict: dict[str | int, Any]) -> Optional[MistralVariantType]: - """Determine the Mistral variant from a state dict based on hidden_size. +def _is_cow_state_dict(state_dict: dict[str | int, Any]) -> bool: + """Check whether a state dict matches the 30-layer cow distillation. - Only Mistral Small 3.1 (hidden_size=5120) is currently recognized. + FLUX.2 [dev] only works with the 30-layer cow-mistral3-small weights — upstream + Mistral Small 3.1 / 3.2 (40 layers) produce off-distribution embeddings under + the (10, 20, 30) hidden-state extraction the joint attention was trained for. """ - hidden_size = _embed_hidden_size(state_dict) - if hidden_size == _MISTRAL_SMALL_3_1_HIDDEN_SIZE: - return MistralVariantType.Small3_1 - return None + if _embed_hidden_size(state_dict) != _COW_HIDDEN_SIZE: + return False + return _count_mistral_layers(state_dict) == _COW_NUM_LAYERS -def _get_mistral_variant_from_config(config_path) -> MistralVariantType: - """Determine Mistral variant from a config.json (hidden_size or text_config.hidden_size).""" +def _is_cow_config(config_path) -> bool: + """Check a HF ``config.json`` for the 30-layer cow Mistral signature.""" try: with open(config_path, "r", encoding="utf-8") as f: config = json.load(f) except (json.JSONDecodeError, OSError): - return MistralVariantType.Small3_1 + return False # Mistral3ForConditionalGeneration nests the LM config under text_config. hidden_size = config.get("hidden_size") - if hidden_size is None: + num_layers = config.get("num_hidden_layers") + if hidden_size is None or num_layers is None: text_config = config.get("text_config") or {} - hidden_size = text_config.get("hidden_size") + if hidden_size is None: + hidden_size = text_config.get("hidden_size") + if num_layers is None: + num_layers = text_config.get("num_hidden_layers") - if hidden_size == _MISTRAL_SMALL_3_1_HIDDEN_SIZE: - return MistralVariantType.Small3_1 - return MistralVariantType.Small3_1 + return hidden_size == _COW_HIDDEN_SIZE and num_layers == _COW_NUM_LAYERS class MistralEncoder_Diffusers_Config(Config_Base): @@ -113,6 +147,10 @@ class MistralEncoder_Diffusers_Config(Config_Base): Does NOT match a full FLUX.2 pipeline directory — those are picked up by the `Main_Diffusers_Flux2_Config` instead. + + Only the 30-layer cow distillation is accepted; upstream Mistral Small 3.1 / 3.2 + (40 layers) produces off-distribution embeddings under FLUX.2's (10, 20, 30) + hidden-state extraction. """ base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) @@ -153,13 +191,22 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - }, ) - variant = _get_mistral_variant_from_config(expected_config_path) + if not _is_cow_config(expected_config_path): + raise NotAMatchError( + "config.json describes a non-cow Mistral (expected hidden_size=5120, num_hidden_layers=30). " + "Only the 30-layer cow-mistral3-small distillation is supported for FLUX.2 [dev]." + ) - return cls(variant=variant, **override_fields) + return cls(variant=MistralVariantType.Cow, **override_fields) class MistralEncoder_Checkpoint_Config(Checkpoint_Config_Base, Config_Base): - """Configuration for a single-file Mistral text encoder (safetensors).""" + """Configuration for a single-file Mistral text encoder (safetensors). + + Only the 30-layer cow distillation is accepted (e.g. Comfy-Org's bf16/fp8/fp4 + files). Upstream Mistral Small 3.1 / 3.2 single-files are rejected — they have + 40 layers and produce off-distribution embeddings for FLUX.2's joint attention. + """ base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) type: Literal[ModelType.MistralEncoder] = Field(default=ModelType.MistralEncoder) @@ -181,15 +228,21 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - if _has_ggml_tensors(state_dict): raise NotAMatchError("state dict looks like GGUF quantized") - variant = _get_mistral_variant_from_state_dict(state_dict) - if variant is None: - raise NotAMatchError("hidden size does not match a known Mistral variant") + if not _is_cow_state_dict(state_dict): + raise NotAMatchError( + f"not a 30-layer cow-mistral3-small (got hidden_size={_embed_hidden_size(state_dict)}, " + f"layers={_count_mistral_layers(state_dict)}). FLUX.2 [dev] only works with the 30-layer " + "cow distillation — upstream Mistral Small 3.1 / 3.2 (40 layers) produces wrong embeddings." + ) - return cls(variant=variant, **override_fields) + return cls(variant=MistralVariantType.Cow, **override_fields) class MistralEncoder_GGUF_Config(Checkpoint_Config_Base, Config_Base): - """Configuration for a GGUF-quantized Mistral text encoder.""" + """Configuration for a GGUF-quantized Mistral text encoder. + + Only the 30-layer cow distillation is accepted — see ``MistralEncoder_Checkpoint_Config``. + """ base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) type: Literal[ModelType.MistralEncoder] = Field(default=ModelType.MistralEncoder) @@ -211,9 +264,11 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - if not _has_ggml_tensors(state_dict): raise NotAMatchError("state dict does not look like GGUF quantized") - variant = _get_mistral_variant_from_state_dict(state_dict) - if variant is None: - # Fall back to Small 3.1 — this is the only Mistral encoder used by FLUX.2 today. - variant = MistralVariantType.Small3_1 + if not _is_cow_state_dict(state_dict): + raise NotAMatchError( + f"not a 30-layer cow-mistral3-small (got hidden_size={_embed_hidden_size(state_dict)}, " + f"layers={_count_mistral_layers(state_dict)}). FLUX.2 [dev] only works with the 30-layer " + "cow distillation — upstream Mistral Small 3.1 / 3.2 (40 layers) produces wrong embeddings." + ) - return cls(variant=variant, **override_fields) + return cls(variant=MistralVariantType.Cow, **override_fields) diff --git a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py index 3ff30433059..457528a5ffb 100644 --- a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py +++ b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py @@ -1,10 +1,16 @@ # Copyright (c) 2026, The InvokeAI Development Team """Model loaders for the Mistral text encoder used by FLUX.2 [dev]. -FLUX.2 [dev] uses Mistral Small 3.1 (24B) as its sole text encoder. The diffusers -release ships it as the multimodal `Mistral3ForConditionalGeneration`; standalone -single-file safetensors and GGUF redistributions typically contain only the text -tower, which we load as an encoder-only `MistralModel`. +FLUX.2 [dev] uses BFL's 30-layer "cow-mistral3-small" distillation as its sole +text encoder. The diffusers release wraps it in the multimodal +``Mistral3ForConditionalGeneration``; standalone single-file safetensors +(Comfy-Org bf16/fp8/fp4) and GGUF redistributions (gguf-org cow variants) ship +only the text tower, which we load as an encoder-only ``MistralModel``. + +Both single-file packagings embed the canonical Tekken tokenizer as a U8 tensor +named ``tekken_model`` (~19 MB). When ``mistral_common`` is installed we use +that embedded tokenizer directly; otherwise we fall back to fetching the +tokenizer from ``black-forest-labs/FLUX.2-dev`` via HuggingFace. """ from pathlib import Path @@ -34,47 +40,41 @@ from invokeai.backend.util.devices import TorchDevice from invokeai.backend.util.logging import InvokeAILogger -# Architecture constants for Mistral Small 3.1 (used by FLUX.2 [dev]). -# Sourced from the FLUX.2-dev `text_encoder/config.json` (text-model side of the -# Mistral3 multimodal stack). Layers/heads/head_dim are needed when reconstructing -# the model from a state dict (single-file or GGUF) because the architecture is -# not embedded in those files. -_MISTRAL_SMALL_3_1_HIDDEN_SIZE = 5120 -_MISTRAL_SMALL_3_1_INTERMEDIATE_SIZE = 32768 -_MISTRAL_SMALL_3_1_NUM_HIDDEN_LAYERS = 40 -_MISTRAL_SMALL_3_1_NUM_ATTENTION_HEADS = 32 -_MISTRAL_SMALL_3_1_NUM_KV_HEADS = 8 # grouped-query attention -_MISTRAL_SMALL_3_1_HEAD_DIM = 128 -_MISTRAL_SMALL_3_1_VOCAB_SIZE = 131072 -_MISTRAL_SMALL_3_1_MAX_POSITION_EMBEDDINGS = 131072 -_MISTRAL_SMALL_3_1_ROPE_THETA = 1000000.0 -_MISTRAL_SMALL_3_1_RMS_NORM_EPS = 1e-5 - -# Fallback tokenizer/processor sources for single-file / GGUF Mistral encoders. -# The GGUF format doesn't bundle a tokenizer; we have to fetch one. We try each -# source in order, preferring the local HuggingFace cache before any network -# lookup, and use AutoTokenizer (text-only, simpler config requirements) so the -# offline fallback works even when HF Hub is unreachable. -# -# - ``black-forest-labs/FLUX.2-dev`` (subfolder=``tokenizer``): canonical FLUX.2 processor -# - ``mistralai/Mistral-Small-3.1-24B-Instruct-2503``: official Mistral 3.1, the version FLUX.2 was trained on -# - ``mistralai/Mistral-Small-3.2-24B-Instruct-2506``: drop-in 3.2 (same chat template) -_TOKENIZER_FALLBACK_SOURCES: tuple[tuple[str, Optional[str]], ...] = ( - ("black-forest-labs/FLUX.2-dev", "tokenizer"), - ("mistralai/Mistral-Small-3.1-24B-Instruct-2503", None), - ("mistralai/Mistral-Small-3.2-24B-Instruct-2506", None), -) +# Architecture constants for the 30-layer cow-mistral3-small distillation. +# Sourced from BFL's FLUX.2-dev ``text_encoder/config.json`` (text-model side of +# the Mistral3 multimodal stack) with the layer count adjusted to the cow depth. +# Hidden / head / KV / RoPE settings match upstream Mistral Small 3 because the +# cow distillation only changes depth (40 → 30), not width. +_COW_HIDDEN_SIZE = 5120 +_COW_INTERMEDIATE_SIZE = 32768 +_COW_NUM_HIDDEN_LAYERS = 30 +_COW_NUM_ATTENTION_HEADS = 32 +_COW_NUM_KV_HEADS = 8 # grouped-query attention +_COW_HEAD_DIM = 128 +_COW_VOCAB_SIZE = 131072 +_COW_MAX_POSITION_EMBEDDINGS = 131072 +_COW_ROPE_THETA = 1000000000.0 # 1e9 — matches BFL FLUX.2-dev/text_encoder/config.json +_COW_RMS_NORM_EPS = 1e-5 + +# HuggingFace fallback for the tokenizer when the model file doesn't embed +# tekken_model (older cow GGUFs without the embedded blob, or a diffusers folder +# without a sibling tokenizer/). We only need the BFL canonical source — upstream +# Mistral tokenizers (3.1 / 3.2) don't match BFL's chat template exactly. +_TOKENIZER_FALLBACK_SOURCE: tuple[str, str] = ("black-forest-labs/FLUX.2-dev", "tokenizer") def _build_mistral_config( state_dict: dict[str, Any], torch_dtype: torch.dtype, + rope_theta: float | None = None, + max_position_embeddings: int | None = None, ) -> MistralConfig: - """Build a transformers ``MistralConfig`` from a Mistral Small 3.1 state dict. + """Build a transformers ``MistralConfig`` from a cow-mistral3-small state dict. Reads the bulk shapes from the state dict (vocab, hidden, heads, kv_heads, - intermediate, layer count) so we can also handle non-Small-3.1 Mistrals that - happen to be wired through this loader. + intermediate, layer count). ``rope_theta`` and ``max_position_embeddings`` can + be passed explicitly when an out-of-band source is available (e.g. GGUF + metadata); otherwise we fall back to cow defaults. """ # Vocab and hidden_size come from embed_tokens. embed_key = "model.embed_tokens.weight" if "model.embed_tokens.weight" in state_dict else None @@ -94,13 +94,13 @@ def _build_mistral_config( layer_indices.add(int(key.split(".")[2])) except (ValueError, IndexError): pass - num_hidden_layers = (max(layer_indices) + 1) if layer_indices else _MISTRAL_SMALL_3_1_NUM_HIDDEN_LAYERS + num_hidden_layers = (max(layer_indices) + 1) if layer_indices else _COW_NUM_HIDDEN_LAYERS # Derive head counts from the first layer's attention projections. q_proj = state_dict.get("model.layers.0.self_attn.q_proj.weight") k_proj = state_dict.get("model.layers.0.self_attn.k_proj.weight") gate_proj = state_dict.get("model.layers.0.mlp.gate_proj.weight") - head_dim = _MISTRAL_SMALL_3_1_HEAD_DIM + head_dim = _COW_HEAD_DIM if q_proj is not None and k_proj is not None and gate_proj is not None: q_shape = q_proj.tensor_shape if isinstance(q_proj, GGMLTensor) else q_proj.shape k_shape = k_proj.tensor_shape if isinstance(k_proj, GGMLTensor) else k_proj.shape @@ -109,9 +109,9 @@ def _build_mistral_config( num_key_value_heads = int(k_shape[0]) // head_dim intermediate_size = int(gate_shape[0]) else: - num_attention_heads = _MISTRAL_SMALL_3_1_NUM_ATTENTION_HEADS - num_key_value_heads = _MISTRAL_SMALL_3_1_NUM_KV_HEADS - intermediate_size = _MISTRAL_SMALL_3_1_INTERMEDIATE_SIZE + num_attention_heads = _COW_NUM_ATTENTION_HEADS + num_key_value_heads = _COW_NUM_KV_HEADS + intermediate_size = _COW_INTERMEDIATE_SIZE return MistralConfig( vocab_size=vocab_size, @@ -121,16 +121,62 @@ def _build_mistral_config( num_attention_heads=num_attention_heads, num_key_value_heads=num_key_value_heads, head_dim=head_dim, - max_position_embeddings=_MISTRAL_SMALL_3_1_MAX_POSITION_EMBEDDINGS, - rms_norm_eps=_MISTRAL_SMALL_3_1_RMS_NORM_EPS, + max_position_embeddings=max_position_embeddings or _COW_MAX_POSITION_EMBEDDINGS, + rms_norm_eps=_COW_RMS_NORM_EPS, tie_word_embeddings=False, - rope_theta=_MISTRAL_SMALL_3_1_ROPE_THETA, + rope_theta=rope_theta or _COW_ROPE_THETA, attention_bias=False, attention_dropout=0.0, torch_dtype=torch_dtype, ) +def _read_gguf_metadata_value(path: Path, key: str) -> Any | None: + """Read a single named field from a GGUF file's metadata header. + + Returns ``None`` if the key is missing or the file/header can't be read — + callers must treat the return as best-effort and fall back to defaults. + """ + try: + import gguf + + reader = gguf.GGUFReader(path) + except Exception: + return None + field = reader.fields.get(key) + if field is None: + return None + try: + # GGUFReader exposes scalar fields under `.contents()` in recent gguf releases. + # Fall back to parts decoding for older versions. + if hasattr(field, "contents"): + return field.contents() + except Exception: + pass + import struct + + try: + if field.types[0].name in ("FLOAT32",): + return struct.unpack(" float | None: + value = _read_gguf_metadata_value(path, key) + return float(value) if isinstance(value, (int, float)) else None + + +def _read_gguf_metadata_int(path: Path, key: str) -> int | None: + value = _read_gguf_metadata_value(path, key) + return int(value) if isinstance(value, (int, float)) else None + + def _strip_known_prefixes(sd: dict[str, Any]) -> dict[str, Any]: """Strip wrapper prefixes used by some FLUX.2 single-file redistributions. @@ -245,50 +291,242 @@ def _drop_quantization_metadata(sd: dict[str, Any], logger) -> dict[str, Any]: return sd -def _load_processor_with_offline_fallback() -> AnyModel: - """Load a Mistral tokenizer / processor for FLUX.2 [dev] text encoding. +def _flatten_message_content(content: Any) -> str: + """Reduce HF chat-template content (str or [{type:"text", text:"..."}]) to plain text.""" + if isinstance(content, str): + return content + if isinstance(content, list): + parts: list[str] = [] + for item in content: + if isinstance(item, dict) and item.get("type") == "text": + parts.append(str(item.get("text", ""))) + return "".join(parts) + return str(content) + - Strategy: walk the fallback source list twice — first looking only at the - local HuggingFace cache, then with network lookups enabled. For each entry - we try ``AutoProcessor`` (multimodal Mistral3 processor, includes the - ``apply_chat_template`` we use) and then ``AutoTokenizer`` (text-only, used - when the source ships only tokenizer files without the multimodal - ``processor_config.json``). The first match wins. +class _TekkenChatTemplateAdapter: + """Expose HuggingFace's ``apply_chat_template`` surface backed by + ``mistral_common.MistralTokenizer``. + + The FLUX.2 [dev] invocation only calls ``apply_chat_template(messages, + tokenize=True, return_tensors='pt', padding='max_length', max_length=N)``, + so only that surface is implemented. """ - attempts: list[str] = [] - def _try(source: str, subfolder: Optional[str], local_only: bool) -> Optional[AnyModel]: - kwargs: dict[str, Any] = {"local_files_only": local_only} - if subfolder is not None: - kwargs["subfolder"] = subfolder - for loader_cls in (AutoProcessor, AutoTokenizer): - try: - return loader_cls.from_pretrained(source, **kwargs) - except (OSError, EnvironmentError, ValueError) as e: - attempts.append( - f"{loader_cls.__name__}({source}, subfolder={subfolder}, local_only={local_only}): {type(e).__name__}" - ) + def __init__(self, mistral_tokenizer: Any): + self._tok = mistral_tokenizer + # Mistral Small 3's id (token 11 in the Tekken vocab). + self.pad_token_id = 11 + + def apply_chat_template( + self, + messages: list[dict[str, Any]], + *, + tokenize: bool = True, + return_dict: bool = True, + return_tensors: str = "pt", + add_generation_prompt: bool = False, + padding: str | bool = "max_length", + truncation: bool = True, + max_length: int = 512, + **_kwargs: Any, + ) -> dict[str, torch.Tensor]: + if not tokenize or return_tensors != "pt": + raise NotImplementedError( + "_TekkenChatTemplateAdapter only supports tokenize=True / return_tensors='pt' " + f"(got tokenize={tokenize}, return_tensors={return_tensors})" + ) + + from mistral_common.protocol.instruct.messages import SystemMessage, UserMessage + from mistral_common.protocol.instruct.request import ChatCompletionRequest + + msgs: list[Any] = [] + for msg in messages: + role = msg.get("role") + content = _flatten_message_content(msg.get("content")) + if role == "system": + msgs.append(SystemMessage(content=content)) + elif role == "user": + msgs.append(UserMessage(content=content)) + + encoded = self._tok.encode_chat_completion(ChatCompletionRequest(messages=msgs)) + tokens: list[int] = list(encoded.tokens) + + if truncation and len(tokens) > max_length: + tokens = tokens[:max_length] + attention: list[int] = [1] * len(tokens) + + if padding == "max_length": + pad_needed = max_length - len(tokens) + if pad_needed > 0: + tokens.extend([self.pad_token_id] * pad_needed) + attention.extend([0] * pad_needed) + + return { + "input_ids": torch.tensor([tokens], dtype=torch.long), + "attention_mask": torch.tensor([attention], dtype=torch.long), + } + + +def _extract_tekken_bytes(model_path: Path) -> Optional[bytes]: + """Return the bytes of the embedded ``tekken_model`` blob if the file has one. + + Both Comfy-Org's safetensors and gguf-org's cow GGUFs ship the canonical + Tekken JSON inside a tensor named ``tekken_model``, but in incompatible + layouts: + + - **Comfy safetensors**: U8 tensor, raw bytes, ``shape=(N,)`` — direct read. + - **gguf-org cow GGUFs**: F16 tensor with one half-float per original byte + (so the float values are 0..255 cast to fp16, and ``shape=(N,)``). We + recover by casting each fp16 back to ``uint8``. + + Returns ``None`` if the file isn't a recognized container, doesn't embed + the blob, or reading fails. + """ + suffix = model_path.suffix.lower() + try: + if suffix == ".safetensors": + from safetensors import safe_open + + with safe_open(str(model_path), framework="pt") as f: + if "tekken_model" in f.keys(): + return f.get_tensor("tekken_model").cpu().numpy().tobytes() + elif suffix == ".gguf": + import gguf + import numpy as np + + reader = gguf.GGUFReader(str(model_path)) + for tensor in reader.tensors: + if tensor.name != "tekken_model": + continue + data = tensor.data + if data.dtype == np.uint8: + return data.tobytes() + # cow GGUFs (and friends) store one byte per fp16 value. + return np.clip(np.rint(data.astype(np.float32)), 0, 255).astype(np.uint8).tobytes() + except Exception: return None + return None + +def _try_load_embedded_tekken(model_path: Path, logger: Any) -> Optional[AnyModel]: + """Extract the embedded Tekken tokenizer and wrap it in the HF-compatible adapter. + + Returns ``None`` (so callers fall through to HF) if: + - the file isn't a single-file container, or + - no ``tekken_model`` blob is embedded, or + - ``mistral_common`` isn't installed, or + - the blob can't be parsed. + """ + if not model_path.is_file(): + return None + + tekken_bytes = _extract_tekken_bytes(model_path) + if tekken_bytes is None: + return None + + try: + from mistral_common.tokens.tokenizers.mistral import MistralTokenizer + except ImportError: + logger.info( + "Found embedded Tekken tokenizer in %s but mistral_common is not installed. " + "Run `pip install mistral-common` (or `uv add mistral-common`) to skip the " + "HuggingFace tokenizer fetch.", + model_path.name, + ) + return None + + import os + import tempfile + + fd, tmp_path = tempfile.mkstemp(suffix=".json", prefix="invokeai-tekken-") + try: + with os.fdopen(fd, "wb") as f: + f.write(tekken_bytes) + mistral_tok = MistralTokenizer.from_file(tmp_path) + except Exception as e: + logger.warning( + f"Failed to load embedded Tekken tokenizer from {model_path.name}: {type(e).__name__}: {e}. " + "Falling back to the HuggingFace BFL tokenizer." + ) + return None + finally: + try: + os.unlink(tmp_path) + except OSError: + pass + + logger.info(f"Loaded embedded Tekken tokenizer from {model_path.name}") + return _TekkenChatTemplateAdapter(mistral_tok) + + +def _load_tokenizer_from_hf(logger: Any) -> AnyModel: + """Download / load the BFL canonical FLUX.2 tokenizer from HuggingFace.""" + source, subfolder = _TOKENIZER_FALLBACK_SOURCE + attempts: list[str] = [] for local_only in (True, False): - for source, subfolder in _TOKENIZER_FALLBACK_SOURCES: - result = _try(source, subfolder, local_only) - if result is not None: - return result + for loader_cls in (AutoProcessor, AutoTokenizer): + try: + obj = loader_cls.from_pretrained(source, subfolder=subfolder, local_files_only=local_only) + logger.info( + f"Loaded Mistral processor/tokenizer: {type(obj).__name__} from " + f"{source}:{subfolder} (local_only={local_only})" + ) + return obj + except (OSError, EnvironmentError, ValueError) as e: + attempts.append(f"{loader_cls.__name__}(local_only={local_only}): {type(e).__name__}") - sources_str = ", ".join(f"{s}{f':{f}' if f else ''}" for s, f in _TOKENIZER_FALLBACK_SOURCES) raise RuntimeError( - "Could not load a Mistral tokenizer/processor for FLUX.2 [dev]. " - f"Tried (cached + online): {sources_str}. " - "Workarounds: (1) install the full FLUX.2-dev diffusers folder as a model in InvokeAI " - "(it bundles the tokenizer), (2) point HF_ENDPOINT at a reachable HuggingFace mirror " - "or run once with internet access to populate the local cache, " - "or (3) pre-cache the tokenizer with: " + f"Could not load FLUX.2 Mistral tokenizer from {source}:{subfolder}. " + "Workarounds: (1) install a Mistral encoder that embeds the Tekken tokenizer " + "(Comfy-Org safetensors or gguf-org cow GGUFs) and `pip install mistral-common`, " + "(2) run once with internet access to populate the HF cache, or " + "(3) pre-cache the tokenizer: " "`huggingface-cli download black-forest-labs/FLUX.2-dev --include 'tokenizer/*'`. " - f"Attempt details: {'; '.join(attempts[-6:])}" + f"Tried: {'; '.join(attempts)}" ) +def _load_tokenizer_for_model(model_path: Path, logger: Any) -> AnyModel: + """Load a tokenizer matching the given Mistral encoder model path. + + Strategy (first hit wins): + + 1. **Embedded Tekken** — Comfy-Org safetensors and gguf-org cow GGUFs ship + the canonical Tekken JSON as a ``tekken_model`` U8 tensor; we extract it + and wrap it via ``mistral_common``. + 2. **Sibling ``tokenizer/`` folder** — diffusers-style HuggingFace layouts. + 3. **BFL HuggingFace fallback** — fetches the canonical tokenizer from + ``black-forest-labs/FLUX.2-dev/tokenizer``. + """ + # 1. Single-file with embedded Tekken + embedded = _try_load_embedded_tekken(model_path, logger) + if embedded is not None: + return embedded + + # 2. Diffusers folder with sibling tokenizer/ + if model_path.is_dir(): + tokenizer_dir = model_path / "tokenizer" + if tokenizer_dir.exists(): + try: + obj = AutoProcessor.from_pretrained(tokenizer_dir, local_files_only=True) + logger.info(f"Loaded Mistral tokenizer from sibling tokenizer/: {type(obj).__name__}") + return obj + except (OSError, EnvironmentError, ValueError): + pass + # Some diffusers folders ship the encoder weights as text_encoder/*.safetensors + # which may embed Tekken — probe each in turn. + text_encoder_dir = model_path / "text_encoder" + if text_encoder_dir.is_dir(): + for st in sorted(text_encoder_dir.glob("*.safetensors")): + embedded = _try_load_embedded_tekken(st, logger) + if embedded is not None: + return embedded + + # 3. HF fallback + return _load_tokenizer_from_hf(logger) + + @ModelLoaderRegistry.register( base=BaseModelType.Any, type=ModelType.MistralEncoder, @@ -326,11 +564,15 @@ def _load_model( match submodel_type: case SubModelType.Tokenizer: - try: - return AutoProcessor.from_pretrained(tokenizer_path, local_files_only=True) - except (OSError, EnvironmentError): - # Fall back to the canonical FLUX.2-dev tokenizer subfolder on HF. - return _load_processor_with_offline_fallback() + logger = InvokeAILogger.get_logger("MistralEncoderProcessor") + # Try the sibling tokenizer/ first when the diffusers folder ships one, + # else fall through to the multi-strategy loader (embedded Tekken / HF). + if tokenizer_path.exists() and tokenizer_path != model_path: + try: + return AutoProcessor.from_pretrained(tokenizer_path, local_files_only=True) + except (OSError, EnvironmentError): + pass + return _load_tokenizer_for_model(model_path, logger) case SubModelType.TextEncoder: # Lazy import: transformers may load `Mistral3ForConditionalGeneration` # only when the diffusers/transformers version supports it. @@ -369,7 +611,8 @@ def _load_model( case SubModelType.TextEncoder: return self._load_text_encoder(config) case SubModelType.Tokenizer: - return _load_processor_with_offline_fallback() + logger = InvokeAILogger.get_logger("MistralEncoderProcessor") + return _load_tokenizer_for_model(Path(config.path), logger) raise ValueError( "Only Tokenizer and TextEncoder submodels are supported. " @@ -460,7 +703,8 @@ def _load_model( case SubModelType.TextEncoder: return self._load_from_gguf(config) case SubModelType.Tokenizer: - return _load_processor_with_offline_fallback() + logger = InvokeAILogger.get_logger("MistralEncoderProcessor") + return _load_tokenizer_for_model(Path(config.path), logger) raise ValueError( "Only Tokenizer and TextEncoder submodels are supported. " @@ -474,6 +718,16 @@ def _load_from_gguf(self, config: MistralEncoder_GGUF_Config) -> AnyModel: sd = gguf_sd_loader(Path(config.path), compute_dtype=compute_dtype) + # Read RoPE / context hyperparameters from the GGUF metadata before key + # conversion strips them. Mistral GGUFs use the llama.* prefix because + # they share llama.cpp's architecture family. Falling back silently is OK: + # `_build_mistral_config` defaults to Mistral Small 3.1 values when the + # override is None. + rope_theta = _read_gguf_metadata_float(Path(config.path), "llama.rope.freq_base") + max_pos = _read_gguf_metadata_int(Path(config.path), "llama.context_length") + if rope_theta is not None: + logger.info(f"GGUF metadata: rope_theta={rope_theta}, max_position={max_pos}") + # llama.cpp stores layers as `blk.N.*`. Normalize to transformers' `model.layers.N.*` if needed. is_llamacpp = any(isinstance(k, str) and k.startswith("blk.") for k in sd.keys()) if is_llamacpp: @@ -482,7 +736,12 @@ def _load_from_gguf(self, config: MistralEncoder_GGUF_Config) -> AnyModel: sd = _strip_known_prefixes(sd) - mistral_config = _build_mistral_config(sd, torch_dtype=compute_dtype) + mistral_config = _build_mistral_config( + sd, + torch_dtype=compute_dtype, + rope_theta=rope_theta, + max_position_embeddings=max_pos, + ) logger.info( f"Mistral encoder config (GGUF): layers={mistral_config.num_hidden_layers}, " f"hidden={mistral_config.hidden_size}, heads={mistral_config.num_attention_heads}, " diff --git a/invokeai/backend/model_manager/starter_models.py b/invokeai/backend/model_manager/starter_models.py index 82c213f7689..7aed1b342a2 100644 --- a/invokeai/backend/model_manager/starter_models.py +++ b/invokeai/backend/model_manager/starter_models.py @@ -1024,27 +1024,79 @@ class StarterModelBundle(BaseModel): # region FLUX.2 [dev] # -# FLUX.2 [dev] is BFL's 32B guidance-distilled rectified-flow model and uses Mistral -# Small 3.1 (24B) as its sole text encoder. The transformer alone is ~64 GB at full -# bf16, so we surface several quantized variants. All FLUX.2 [dev] releases are -# governed by the FLUX.2 Non-Commercial License. +# FLUX.2 [dev] is BFL's 32B guidance-distilled rectified-flow model. The bf16 +# transformer alone is ~64 GB, so most users want the GGUF quantizations from +# the curated `gguf-org/flux2-dev-gguf` repo (the same repo also ships the +# matching "cow-mistral3-small" text encoder — a FLUX.2-specific 30-layer +# Mistral distillation that BFL trained the joint attention against; the +# README notes "Q2 works, but use a higher tier encoder for better prompt +# adherence"). All FLUX.2 [dev] releases are governed by the FLUX.2 +# Non-Commercial License. + +# --- Text encoders --- +# Only the 30-layer "cow-mistral3-small" distillation works for FLUX.2 [dev]. +# BFL's joint attention was trained against hidden states at indices (10, 20, 30) +# of a 30-layer Mistral — extracting from upstream Mistral Small 3.1 / 3.2 (40 +# layers) samples at different relative depths and produces off-distribution +# embeddings. Both the gguf-org cow GGUFs and Comfy-Org's safetensors are the +# same 30-layer cow weights, just packaged differently. + +# Comfy-Org safetensors (single-file, 30-layer cow, with embedded Tekken tokenizer). +# Higher precision than the cow GGUFs and avoids the Tekken-via-HF-Hub fetch. +flux2_dev_comfy_mistral_fp8 = StarterModel( + name="FLUX.2 [dev] Mistral Encoder (Comfy FP8)", + base=BaseModelType.Any, + source="https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_fp8.safetensors", + description="Comfy-Org FP8 of BFL's 30-layer cow-mistral3-small. Best quality/size for prompt adherence; embeds Tekken tokenizer (no HF fetch needed). ~18GB", + type=ModelType.MistralEncoder, +) + +flux2_dev_comfy_mistral_bf16 = StarterModel( + name="FLUX.2 [dev] Mistral Encoder (Comfy BF16)", + base=BaseModelType.Any, + source="https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors", + description="Comfy-Org BF16 of BFL's 30-layer cow-mistral3-small. Reference precision; embeds Tekken tokenizer. ~35.6GB", + type=ModelType.MistralEncoder, +) + +flux2_dev_comfy_mistral_fp4 = StarterModel( + name="FLUX.2 [dev] Mistral Encoder (Comfy FP4 mixed)", + base=BaseModelType.Any, + source="https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_fp4_mixed.safetensors", + description="Comfy-Org FP4-mixed of BFL's 30-layer cow-mistral3-small. Smallest safetensors variant; embeds Tekken tokenizer. ~12.3GB", + type=ModelType.MistralEncoder, +) + +# gguf-org cow GGUF variants (30-layer cow, llama.cpp packaging, also embed Tekken). +# Lower memory footprint than the Comfy safetensors but slightly lower fidelity. +flux2_dev_cow_mistral_q4 = StarterModel( + name="FLUX.2 [dev] cow Mistral Encoder (GGUF Q4)", + base=BaseModelType.Any, + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/cow-mistral3-small-q4_0.gguf", + description="cow-mistral3-small Q4_0 — 30-layer cow distillation BFL trained against. ~11.6GB", + type=ModelType.MistralEncoder, + format=ModelFormat.GGUFQuantized, +) -flux2_dev_mistral_encoder = StarterModel( - name="FLUX.2 [dev] Mistral Encoder", +flux2_dev_cow_mistral_q8 = StarterModel( + name="FLUX.2 [dev] cow Mistral Encoder (GGUF Q8)", base=BaseModelType.Any, - source="black-forest-labs/FLUX.2-dev::text_encoder+tokenizer", - description="Mistral Small 3.1 (24B) text encoder + tokenizer for FLUX.2 [dev]. ~48GB bf16", + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/cow-mistral3-small-q8_0.gguf", + description="cow-mistral3-small Q8_0 — best prompt adherence among cow GGUF quants. ~20GB", type=ModelType.MistralEncoder, + format=ModelFormat.GGUFQuantized, ) -flux2_dev_mistral_encoder_nf4 = StarterModel( - name="FLUX.2 [dev] Mistral Encoder (NF4)", +flux2_dev_cow_mistral_iq4_xs = StarterModel( + name="FLUX.2 [dev] cow Mistral Encoder (GGUF IQ4_XS)", base=BaseModelType.Any, - source="diffusers/FLUX.2-dev-bnb-4bit::text_encoder+tokenizer", - description="NF4-quantized Mistral Small 3.1 text encoder for FLUX.2 [dev]. ~12GB", + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/cow-mistral3-small-iq4_xs.gguf", + description="cow-mistral3-small IQ4_XS — smallest usable quant with reasonable adherence. ~11.1GB", type=ModelType.MistralEncoder, + format=ModelFormat.GGUFQuantized, ) +# --- Diffusers transformer --- flux2_dev_diffusers = StarterModel( name="FLUX.2 [dev] (Diffusers)", base=BaseModelType.Flux2, @@ -1061,34 +1113,57 @@ class StarterModelBundle(BaseModel): type=ModelType.Main, ) -flux2_dev_gguf_q4 = StarterModel( - name="FLUX.2 [dev] (GGUF Q4)", +# --- GGUF transformers from gguf-org/flux2-dev-gguf (canonical repo) --- +# These are the GGUFs BFL/community curate for cow-paired inference. Default +# encoder dependency is cow Q4 to make starter installs work out of the box. +flux2_dev_gguf_q3_k_m = StarterModel( + name="FLUX.2 [dev] Transformer (GGUF Q3_K_M)", + base=BaseModelType.Flux2, + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/flux2-dev-q3_k_m.gguf", + description="FLUX.2 [dev] transformer Q3_K_M — fits ~12GB VRAM with offload. ~15.9GB", + type=ModelType.Main, + format=ModelFormat.GGUFQuantized, + dependencies=[flux2_vae, flux2_dev_cow_mistral_q4], +) + +flux2_dev_gguf_q4_k_m = StarterModel( + name="FLUX.2 [dev] Transformer (GGUF Q4_K_M)", + base=BaseModelType.Flux2, + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/flux2-dev-q4_k_m.gguf", + description="FLUX.2 [dev] transformer Q4_K_M — good quality / size tradeoff. ~20GB", + type=ModelType.Main, + format=ModelFormat.GGUFQuantized, + dependencies=[flux2_vae, flux2_dev_cow_mistral_q4], +) + +flux2_dev_gguf_q5_k_m = StarterModel( + name="FLUX.2 [dev] Transformer (GGUF Q5_K_M)", base=BaseModelType.Flux2, - source="https://huggingface.co/city96/FLUX.2-dev-gguf/resolve/main/flux2_dev_Q4_K_M.gguf", - description="FLUX.2 [dev] transformer, GGUF Q4_K_M - ~18.7GB. Requires a separate FLUX.2 VAE and a Mistral encoder.", + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/flux2-dev-q5_k_m.gguf", + description="FLUX.2 [dev] transformer Q5_K_M — higher fidelity than Q4. ~24GB", type=ModelType.Main, format=ModelFormat.GGUFQuantized, - dependencies=[flux2_vae, flux2_dev_mistral_encoder_nf4], + dependencies=[flux2_vae, flux2_dev_cow_mistral_q8], ) -flux2_dev_gguf_q6 = StarterModel( - name="FLUX.2 [dev] (GGUF Q6)", +flux2_dev_gguf_q6_k = StarterModel( + name="FLUX.2 [dev] Transformer (GGUF Q6_K)", base=BaseModelType.Flux2, - source="https://huggingface.co/city96/FLUX.2-dev-gguf/resolve/main/flux2_dev_Q6_K.gguf", - description="FLUX.2 [dev] transformer, GGUF Q6_K - ~26.7GB. Requires a separate FLUX.2 VAE and a Mistral encoder.", + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/flux2-dev-q6_k.gguf", + description="FLUX.2 [dev] transformer Q6_K — near-Q8 quality at lower size. ~27.9GB", type=ModelType.Main, format=ModelFormat.GGUFQuantized, - dependencies=[flux2_vae, flux2_dev_mistral_encoder_nf4], + dependencies=[flux2_vae, flux2_dev_cow_mistral_q8], ) -flux2_dev_gguf_q8 = StarterModel( - name="FLUX.2 [dev] (GGUF Q8)", +flux2_dev_gguf_q8_0 = StarterModel( + name="FLUX.2 [dev] Transformer (GGUF Q8_0)", base=BaseModelType.Flux2, - source="https://huggingface.co/city96/FLUX.2-dev-gguf/resolve/main/flux2_dev_Q8_0.gguf", - description="FLUX.2 [dev] transformer, GGUF Q8_0 - ~34.5GB. Requires a separate FLUX.2 VAE and a Mistral encoder.", + source="https://huggingface.co/gguf-org/flux2-dev-gguf/resolve/main/flux2-dev-q8_0.gguf", + description="FLUX.2 [dev] transformer Q8_0 — highest GGUF fidelity. ~35.5GB", type=ModelType.Main, format=ModelFormat.GGUFQuantized, - dependencies=[flux2_vae, flux2_dev_mistral_encoder_nf4], + dependencies=[flux2_vae, flux2_dev_cow_mistral_q8], ) # endregion @@ -1733,13 +1808,19 @@ def _gemini_3_resolution_presets( flux2_klein_9b_gguf_q8, flux2_klein_qwen3_4b_encoder, flux2_klein_qwen3_8b_encoder, - flux2_dev_mistral_encoder, - flux2_dev_mistral_encoder_nf4, + flux2_dev_comfy_mistral_bf16, + flux2_dev_comfy_mistral_fp4, + flux2_dev_comfy_mistral_fp8, + flux2_dev_cow_mistral_iq4_xs, + flux2_dev_cow_mistral_q4, + flux2_dev_cow_mistral_q8, flux2_dev_diffusers, flux2_dev_diffusers_nf4, - flux2_dev_gguf_q4, - flux2_dev_gguf_q6, - flux2_dev_gguf_q8, + flux2_dev_gguf_q3_k_m, + flux2_dev_gguf_q4_k_m, + flux2_dev_gguf_q5_k_m, + flux2_dev_gguf_q6_k, + flux2_dev_gguf_q8_0, cogview4, qwen_image_vae, qwen_vl_encoder_fp8, diff --git a/invokeai/backend/model_manager/taxonomy.py b/invokeai/backend/model_manager/taxonomy.py index a7bcfff286f..15c0e305642 100644 --- a/invokeai/backend/model_manager/taxonomy.py +++ b/invokeai/backend/model_manager/taxonomy.py @@ -185,8 +185,13 @@ class Qwen3VariantType(str, Enum): class MistralVariantType(str, Enum): """Mistral text encoder variants used by FLUX.2 [dev].""" - Small3_1 = "mistral_small_3_1" - """Mistral Small 3.1 (24B, hidden_size=5120). Used by FLUX.2 [dev].""" + Cow = "cow_mistral3_small" + """The 30-layer BFL "cow-mistral3-small" distillation (hidden_size=5120) — + the only Mistral variant FLUX.2 [dev]'s joint attention was trained against. + Hidden states are sampled at indices (10, 20, 30) which on a 30-layer model + hit 1/3, 2/3, and the final layer. Upstream Mistral Small 3.1 / 3.2 (40 + layers) sample at different relative depths and produce off-distribution + embeddings, so they are not accepted as FLUX.2 text encoders.""" class ModelFormat(str, Enum): diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 5f37034b624..685ee64b255 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1036,6 +1036,7 @@ "noRecallParameters": "No parameters to recall found", "parameterSet": "Parameter {{parameter}} set", "parsingFailed": "Parsing Failed", + "mistralEncoder": "Mistral Encoder", "positivePrompt": "Positive Prompt", "qwen3Encoder": "Qwen3 Encoder", "qwen3Source": "Qwen3 Source", diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataActions.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataActions.tsx index d24ff27323c..85a5896158d 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataActions.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataActions.tsx @@ -66,6 +66,8 @@ export const ImageMetadataActions = memo((props: Props) => { + + ); diff --git a/invokeai/frontend/web/src/features/metadata/parsing.test.tsx b/invokeai/frontend/web/src/features/metadata/parsing.test.tsx index bb295303273..0cd7122b8d6 100644 --- a/invokeai/frontend/web/src/features/metadata/parsing.test.tsx +++ b/invokeai/frontend/web/src/features/metadata/parsing.test.tsx @@ -8,11 +8,12 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; // Module mocks // // We are testing only the *gating* logic of the model-related metadata -// handlers (`VAEModel`, `KleinVAEModel`, `KleinQwen3EncoderModel`). The actual -// model lookup goes through `parseModelIdentifier`, which dispatches RTK -// Query thunks. We stub the models endpoint so that any lookup resolves to a -// canned model identifier — the parse step then succeeds and the assertions -// inside each handler become observable. +// handlers (`VAEModel`, `KleinVAEModel`, `KleinQwen3EncoderModel`, +// `Flux2DevVAEModel`, `Flux2DevMistralEncoderModel`). The model lookup goes +// through `parseModelIdentifier`, which dispatches an RTK Query thunk. We stub +// the models endpoint so any lookup resolves to a canned model identifier — +// the parse step then succeeds and the assertions inside each handler become +// observable. // --------------------------------------------------------------------------- let currentBase: string | null = 'flux2'; @@ -22,7 +23,7 @@ vi.mock('features/controlLayers/store/paramsSlice', async (importOriginal) => { return { ...mod, selectBase: () => currentBase }; }); -const fakeModel = (type: 'vae' | 'qwen3_encoder', base: string) => ({ +const fakeModel = (type: 'vae' | 'qwen3_encoder' | 'mistral_encoder', base: string) => ({ key: `${type}-key`, hash: 'hash', name: `Some ${type}`, @@ -61,7 +62,7 @@ beforeEach(() => { describe('ImageMetadataHandlers — Klein recall gating', () => { describe('KleinVAEModel', () => { - it('parses metadata.vae when the current main model is FLUX.2 Klein', async () => { + it('parses metadata.vae for Klein images (no mistral_encoder field) when base is flux2', async () => { currentBase = 'flux2'; nextResolved = fakeModel('vae', 'flux2'); const store = makeStore(); @@ -72,17 +73,67 @@ describe('ImageMetadataHandlers — Klein recall gating', () => { expect(parsed.type).toBe('vae'); }); - it('rejects parsing when the current main model is not FLUX.2 Klein', async () => { + it('rejects when base is not flux2', async () => { currentBase = 'sdxl'; nextResolved = fakeModel('vae', 'flux2'); const store = makeStore(); await expect(ImageMetadataHandlers.KleinVAEModel.parse({ vae: nextResolved }, store)).rejects.toThrow(); }); + + it('rejects FLUX.2 [dev] images (mistral_encoder field present)', async () => { + currentBase = 'flux2'; + nextResolved = fakeModel('vae', 'flux2'); + const store = makeStore(); + + await expect( + ImageMetadataHandlers.KleinVAEModel.parse( + { vae: nextResolved, mistral_encoder: fakeModel('mistral_encoder', 'flux2') }, + store + ) + ).rejects.toThrow(); + }); + }); + + describe('Flux2DevVAEModel', () => { + it('parses metadata.vae for [dev] images (mistral_encoder field present)', async () => { + currentBase = 'flux2'; + nextResolved = fakeModel('vae', 'flux2'); + const store = makeStore(); + + const parsed = await ImageMetadataHandlers.Flux2DevVAEModel.parse( + { vae: nextResolved, mistral_encoder: fakeModel('mistral_encoder', 'flux2') }, + store + ); + + expect(parsed.key).toBe('vae-key'); + expect(parsed.type).toBe('vae'); + }); + + it('rejects Klein images (no mistral_encoder field)', async () => { + currentBase = 'flux2'; + nextResolved = fakeModel('vae', 'flux2'); + const store = makeStore(); + + await expect(ImageMetadataHandlers.Flux2DevVAEModel.parse({ vae: nextResolved }, store)).rejects.toThrow(); + }); + + it('rejects when base is not flux2', async () => { + currentBase = 'sdxl'; + nextResolved = fakeModel('vae', 'flux2'); + const store = makeStore(); + + await expect( + ImageMetadataHandlers.Flux2DevVAEModel.parse( + { vae: nextResolved, mistral_encoder: fakeModel('mistral_encoder', 'flux2') }, + store + ) + ).rejects.toThrow(); + }); }); describe('KleinQwen3EncoderModel', () => { - it('parses metadata.qwen3_encoder when the current main model is FLUX.2 Klein', async () => { + it('parses metadata.qwen3_encoder when base is flux2', async () => { currentBase = 'flux2'; nextResolved = fakeModel('qwen3_encoder', 'flux2'); const store = makeStore(); @@ -93,7 +144,7 @@ describe('ImageMetadataHandlers — Klein recall gating', () => { expect(parsed.type).toBe('qwen3_encoder'); }); - it('rejects parsing when the current main model is not FLUX.2 Klein', async () => { + it('rejects when base is not flux2', async () => { currentBase = 'sdxl'; nextResolved = fakeModel('qwen3_encoder', 'flux2'); const store = makeStore(); @@ -104,10 +155,36 @@ describe('ImageMetadataHandlers — Klein recall gating', () => { }); }); + describe('Flux2DevMistralEncoderModel', () => { + it('parses metadata.mistral_encoder when base is flux2', async () => { + currentBase = 'flux2'; + nextResolved = fakeModel('mistral_encoder', 'flux2'); + const store = makeStore(); + + const parsed = await ImageMetadataHandlers.Flux2DevMistralEncoderModel.parse( + { mistral_encoder: nextResolved }, + store + ); + + expect(parsed.key).toBe('mistral_encoder-key'); + expect(parsed.type).toBe('mistral_encoder'); + }); + + it('rejects when base is not flux2', async () => { + currentBase = 'sdxl'; + nextResolved = fakeModel('mistral_encoder', 'flux2'); + const store = makeStore(); + + await expect( + ImageMetadataHandlers.Flux2DevMistralEncoderModel.parse({ mistral_encoder: nextResolved }, store) + ).rejects.toThrow(); + }); + }); + describe('VAEModel (generic)', () => { // The generic VAEModel handler must NOT also fire for FLUX.2 / Z-Image // images, otherwise the metadata viewer renders duplicate VAE rows next - // to the dedicated KleinVAEModel / ZImageVAEModel handlers. + // to the dedicated KleinVAEModel / Flux2DevVAEModel / ZImageVAEModel handlers. it.each(['flux2', 'z-image'])('rejects parsing when current base is %s', async (base) => { currentBase = base; nextResolved = fakeModel('vae', base); diff --git a/invokeai/frontend/web/src/features/metadata/parsing.tsx b/invokeai/frontend/web/src/features/metadata/parsing.tsx index 60c6ba49fcb..29d45cb83ef 100644 --- a/invokeai/frontend/web/src/features/metadata/parsing.tsx +++ b/invokeai/frontend/web/src/features/metadata/parsing.tsx @@ -11,6 +11,8 @@ import { animaQwen3EncoderModelSelected, animaT5EncoderModelSelected, animaVaeModelSelected, + flux2DevMistralEncoderModelSelected, + flux2DevVaeModelSelected, geminiTemperatureChanged, geminiThinkingLevelChanged, heightChanged, @@ -1215,9 +1217,16 @@ const KleinVAEModel: SingleMetadataHandler = { const raw = getProperty(metadata, 'vae'); const parsed = await parseModelIdentifier(raw, store, 'vae'); assert(parsed.type === 'vae'); - // Only recall if the current main model is FLUX.2 Klein + // FLUX.2 Klein and FLUX.2 [dev] both have base `flux2` and write the VAE + // under `metadata.vae`. They use the presence of `mistral_encoder` (dev + // only) vs `qwen3_encoder` (Klein only) as a distinguisher so each VAE + // handler dispatches into its own slice. const base = selectBase(store.getState()); assert(base === 'flux2', 'KleinVAEModel handler only works with FLUX.2 Klein models'); + assert( + getProperty(metadata, 'mistral_encoder') === undefined, + 'KleinVAEModel does not handle FLUX.2 [dev] images (mistral_encoder present)' + ); return Promise.resolve(parsed); }, recall: (value, store) => { @@ -1231,6 +1240,36 @@ const KleinVAEModel: SingleMetadataHandler = { }; //#endregion KleinVAEModel +//#region Flux2DevVAEModel +const Flux2DevVAEModel: SingleMetadataHandler = { + [SingleMetadataKey]: true, + type: 'Flux2DevVAEModel', + parse: async (metadata, store) => { + const raw = getProperty(metadata, 'vae'); + const parsed = await parseModelIdentifier(raw, store, 'vae'); + assert(parsed.type === 'vae'); + const base = selectBase(store.getState()); + assert(base === 'flux2', 'Flux2DevVAEModel handler only works with FLUX.2 models'); + // FLUX.2 [dev] images always carry a `mistral_encoder` field; Klein images + // carry `qwen3_encoder` instead. This is the disambiguator that keeps dev's + // VAE recall from clobbering Klein's slice (and vice versa). + assert( + getProperty(metadata, 'mistral_encoder') !== undefined, + 'Flux2DevVAEModel handler only fires on FLUX.2 [dev] images (mistral_encoder must be present)' + ); + return Promise.resolve(parsed); + }, + recall: (value, store) => { + store.dispatch(flux2DevVaeModelSelected(value)); + }, + i18nKey: 'metadata.vae', + LabelComponent: MetadataLabel, + ValueComponent: ({ value }: SingleMetadataValueProps) => ( + + ), +}; +//#endregion Flux2DevVAEModel + //#region KleinQwen3EncoderModel const KleinQwen3EncoderModel: SingleMetadataHandler = { [SingleMetadataKey]: true, @@ -1239,7 +1278,8 @@ const KleinQwen3EncoderModel: SingleMetadataHandler = { const raw = getProperty(metadata, 'qwen3_encoder'); const parsed = await parseModelIdentifier(raw, store, 'qwen3_encoder'); assert(parsed.type === 'qwen3_encoder'); - // Only recall if the current main model is FLUX.2 Klein + // qwen3_encoder is Klein-only metadata; dev never writes it. Just gate on + // base. (parseModelIdentifier already rejects when the field is absent.) const base = selectBase(store.getState()); assert(base === 'flux2', 'KleinQwen3EncoderModel handler only works with FLUX.2 Klein models'); return Promise.resolve(parsed); @@ -1255,6 +1295,31 @@ const KleinQwen3EncoderModel: SingleMetadataHandler = { }; //#endregion KleinQwen3EncoderModel +//#region Flux2DevMistralEncoderModel +const Flux2DevMistralEncoderModel: SingleMetadataHandler = { + [SingleMetadataKey]: true, + type: 'Flux2DevMistralEncoderModel', + parse: async (metadata, store) => { + const raw = getProperty(metadata, 'mistral_encoder'); + const parsed = await parseModelIdentifier(raw, store, 'mistral_encoder'); + assert(parsed.type === 'mistral_encoder'); + // mistral_encoder is dev-only metadata; Klein never writes it. Just gate on + // base. (parseModelIdentifier already rejects when the field is absent.) + const base = selectBase(store.getState()); + assert(base === 'flux2', 'Flux2DevMistralEncoderModel handler only works with FLUX.2 models'); + return Promise.resolve(parsed); + }, + recall: (value, store) => { + store.dispatch(flux2DevMistralEncoderModelSelected(value)); + }, + i18nKey: 'metadata.mistralEncoder', + LabelComponent: MetadataLabel, + ValueComponent: ({ value }: SingleMetadataValueProps) => ( + + ), +}; +//#endregion Flux2DevMistralEncoderModel + //#region LoRAs const LoRAs: CollectionMetadataHandler = { [CollectionMetadataKey]: true, @@ -1657,6 +1722,8 @@ export const ImageMetadataHandlers = { AnimaT5EncoderModel, KleinVAEModel, KleinQwen3EncoderModel, + Flux2DevVAEModel, + Flux2DevMistralEncoderModel, ZImageSeedVarianceEnabled, ZImageSeedVarianceStrength, ZImageSeedVarianceRandomizePercent, diff --git a/invokeai/frontend/web/src/features/modelManagerV2/models.ts b/invokeai/frontend/web/src/features/modelManagerV2/models.ts index f86a39bb675..b34986f58f2 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/models.ts +++ b/invokeai/frontend/web/src/features/modelManagerV2/models.ts @@ -262,7 +262,7 @@ export const MODEL_VARIANT_TO_LONG_NAME: Record = { qwen3_4b: 'Qwen3 4B', qwen3_8b: 'Qwen3 8B', qwen3_06b: 'Qwen3 0.6B', - mistral_small_3_1: 'Mistral Small 3.1', + cow_mistral3_small: 'cow-mistral3-small (FLUX.2)', }; export const MODEL_FORMAT_TO_LONG_NAME: Record = { diff --git a/invokeai/frontend/web/src/features/nodes/types/common.ts b/invokeai/frontend/web/src/features/nodes/types/common.ts index b4a46b5af99..ab335f61f8c 100644 --- a/invokeai/frontend/web/src/features/nodes/types/common.ts +++ b/invokeai/frontend/web/src/features/nodes/types/common.ts @@ -165,7 +165,7 @@ export const zFlux2VariantType = z.enum(['klein_4b', 'klein_4b_base', 'klein_9b' export const zZImageVariantType = z.enum(['turbo', 'zbase']); const zQwenImageVariantType = z.enum(['generate', 'edit']); export const zQwen3VariantType = z.enum(['qwen3_4b', 'qwen3_8b', 'qwen3_06b']); -export const zMistralVariantType = z.enum(['mistral_small_3_1']); +export const zMistralVariantType = z.enum(['cow_mistral3_small']); export const zAnyModelVariant = z.union([ zModelVariantType, zClipVariantType, diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index cebbf3e2643..ce790b571d7 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -23554,6 +23554,10 @@ export type components = { /** * MistralEncoder_Checkpoint_Config * @description Configuration for a single-file Mistral text encoder (safetensors). + * + * Only the 30-layer cow distillation is accepted (e.g. Comfy-Org's bf16/fp8/fp4 + * files). Upstream Mistral Small 3.1 / 3.2 single-files are rejected — they have + * 40 layers and produce off-distribution embeddings for FLUX.2's joint attention. */ MistralEncoder_Checkpoint_Config: { /** @@ -23650,6 +23654,10 @@ export type components = { * * Does NOT match a full FLUX.2 pipeline directory — those are picked up by the * `Main_Diffusers_Flux2_Config` instead. + * + * Only the 30-layer cow distillation is accepted; upstream Mistral Small 3.1 / 3.2 + * (40 layers) produces off-distribution embeddings under FLUX.2's (10, 20, 30) + * hidden-state extraction. */ MistralEncoder_Diffusers_Config: { /** @@ -23733,6 +23741,8 @@ export type components = { /** * MistralEncoder_GGUF_Config * @description Configuration for a GGUF-quantized Mistral text encoder. + * + * Only the 30-layer cow distillation is accepted — see ``MistralEncoder_Checkpoint_Config``. */ MistralEncoder_GGUF_Config: { /** @@ -23823,7 +23833,7 @@ export type components = { * @description Mistral text encoder variants used by FLUX.2 [dev]. * @enum {string} */ - MistralVariantType: "mistral_small_3_1"; + MistralVariantType: "cow_mistral3_small"; /** * ModelFormat * @description Storage format of model. diff --git a/pyproject.toml b/pyproject.toml index 155471d9067..1c175224b6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ dependencies = [ "diffusers[torch]==0.37.0", "gguf", "mediapipe==0.10.14", # needed for "mediapipeface" controlnet model + "mistral-common", # canonical Tekken tokenizer for FLUX.2 [dev] Mistral encoder "numpy<2.0.0", "onnx==1.16.1", "onnxruntime==1.19.2", From 95f810e478e27476ed905b002c8694e6e94e5401 Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Sat, 6 Jun 2026 03:50:13 +0200 Subject: [PATCH 5/8] feat(flux2-dev): match ComfyUI's Mistral reference + accept 40-layer encoders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After studying ComfyUI's `Flux2Tokenizer` / `Mistral3_24BModel` reference implementation, align the FLUX.2 [dev] text-encoder path with their setup: - Probing now accepts both 30-layer (cow distillation) and 40-layer (Mistral Small 3, BFL canonical / upstream) Mistrals. Re-adds `MistralVariantType.Mistral24B` alongside `Cow`. All three configs (Diffusers / Checkpoint / GGUF) updated. - Loaders strip `model.norm` (replace with Identity) when the loaded weights are the 30-layer cow distillation. Matches Comfy's `final_norm=False` for the pruned variant; for transformers' `MistralModel` the final RMSNorm is always built but the cow was trained against the raw post-layer-29 state. - 40-layer loads now log a clear warning that upstream Mistral 3.1 / 3.2 is NOT what FLUX.2's joint attention was trained against and recommends the Comfy-Org bf16/fp8/fp4 or gguf-org cow GGUF variants. BFL's canonical bundled text_encoder is also 40-layer so we don't hard-reject; the warning is opt-in self-discipline. - Text encoder invocation switches from `apply_chat_template(messages, ...)` to a raw text template `[SYSTEM_PROMPT]{sys}[/SYSTEM_PROMPT][INST]{prompt}[/INST]` fed straight to the tokenizer — byte-for-byte matches Comfy's `Flux2Tokenizer.llama_template.format(text)`. System prompt now includes the literal `\n` between "object" and "attribution" Comfy ships. - `_TekkenChatTemplateAdapter` renamed to `_TekkenRawTextAdapter` and exposes a `__call__(text, padding_side='left', ...)` interface that Tekken-encodes the raw string (BOS=1, no EOS) and left-pads with token id 11. Matches Comfy's `pad_left=True` / `pad_token=11` settings. Frontend types extended for the new `mistral3_24b` variant (zMistralVariantType, MODEL_VARIANT_TO_LONG_NAME, schema.ts). --- .../app/invocations/flux2_dev_text_encoder.py | 103 +++++------ .../model_manager/configs/mistral_encoder.py | 104 ++++++----- .../load/model_loaders/mistral_encoder.py | 166 ++++++++++++------ invokeai/backend/model_manager/taxonomy.py | 18 +- .../web/src/features/modelManagerV2/models.ts | 1 + .../web/src/features/nodes/types/common.ts | 2 +- .../frontend/web/src/services/api/schema.ts | 2 +- 7 files changed, 237 insertions(+), 159 deletions(-) diff --git a/invokeai/app/invocations/flux2_dev_text_encoder.py b/invokeai/app/invocations/flux2_dev_text_encoder.py index 22beb6c8e22..049070f1fcb 100644 --- a/invokeai/app/invocations/flux2_dev_text_encoder.py +++ b/invokeai/app/invocations/flux2_dev_text_encoder.py @@ -16,7 +16,7 @@ """ from contextlib import ExitStack -from typing import Iterator, Literal, Optional, Tuple +from typing import Any, Iterator, Literal, Optional, Tuple, cast import torch from transformers import PreTrainedModel @@ -40,20 +40,27 @@ from invokeai.backend.stable_diffusion.diffusion.conditioning_data import ConditioningFieldData, FLUXConditioningInfo from invokeai.backend.util.devices import TorchDevice -# System prompt used by the FLUX.2 [dev] reference pipeline. Biasing the model -# toward structured image descriptions produces the embedding distribution the -# transformer was trained to consume. +# System prompt used by the FLUX.2 [dev] reference pipeline. Byte-for-byte +# identical to ComfyUI's ``Flux2Tokenizer.llama_template`` — note the literal +# ``\n`` between "object" and "attribution"; that's part of the trained-against +# token sequence, not a formatting artifact. FLUX2_DEV_SYSTEM_MESSAGE = ( "You are an AI that reasons about image descriptions. You give structured " - "responses focusing on object relationships, object attribution and actions " + "responses focusing on object relationships, object\nattribution and actions " "without speculation." ) +# Raw chat template fed straight to the tokenizer — matches Comfy's approach +# (no ``apply_chat_template`` indirection). ``[SYSTEM_PROMPT]`` / ``[INST]`` are +# special tokens in Mistral Small 3's Tekken vocab, so the encoder produces the +# exact token sequence BFL trained the joint attention against. +FLUX2_DEV_PROMPT_TEMPLATE = "[SYSTEM_PROMPT]{system}[/SYSTEM_PROMPT][INST]{prompt}[/INST]" + # Indices into hidden_states[] (hidden_states[0] is the embedding output) that -# FLUX.2 [dev]'s joint attention was trained to consume. Hard-coded to the -# 30-layer cow Mistral — (10, 20, 30) hits (1/3, 2/3, last) for that depth. -# The model loaders reject anything other than 30-layer cow weights, so we don't -# need a scaling fallback here. +# FLUX.2 [dev]'s joint attention was trained to consume. ComfyUI uses these +# same indices for both the 30-layer cow distillation and the 40-layer Mistral +# Small 3; for cow they hit (1/3, 2/3, last), and the loader strips the final +# RMSNorm so the layer-30 readout is the raw post-layer-29 state. DEV_EXTRACTION_LAYERS = (10, 20, 30) # Default max sequence length for FLUX.2 [dev]. The reference pipeline caps at 512. @@ -142,58 +149,32 @@ def _encode_prompt(self, context: InvocationContext, exit_stack: ExitStack) -> t "The Mistral encoder model may be corrupted or incompatible." ) - # Two valid chat-template content shapes depending on the loaded artifact: - # - Multimodal Mistral3 processors (PixtralProcessor / Mistral3Processor) want - # `[{type: "text", text: ...}]` even for text-only prompts and crash on a - # plain string with `string indices must be integers`. - # - Plain AutoTokenizer / MistralTokenizer want simple string content and - # may fail on the dict-list form depending on the template. - # We try multimodal first (matches BFL's canonical FLUX.2-dev processor), - # then fall back to string content, then to manual [INST]...[/INST] format. - multimodal_messages = [ - {"role": "system", "content": [{"type": "text", "text": FLUX2_DEV_SYSTEM_MESSAGE}]}, - {"role": "user", "content": [{"type": "text", "text": self.prompt}]}, - ] - plain_messages = [ - {"role": "system", "content": FLUX2_DEV_SYSTEM_MESSAGE}, - {"role": "user", "content": self.prompt}, - ] - - tokenize_kwargs = { - "tokenize": True, - "return_dict": True, - "return_tensors": "pt", - "add_generation_prompt": False, - "padding": "max_length", - "truncation": True, - "max_length": self.max_seq_len, - } - - inputs = None - last_error: Exception | None = None - for messages in (multimodal_messages, plain_messages): - try: - inputs = processor.apply_chat_template(messages, **tokenize_kwargs) - break - except (AttributeError, ValueError, TypeError, KeyError) as e: - last_error = e - - if inputs is None: - # Fallback: no usable chat template. Format the prompt manually using - # Mistral's classic [INST]...[/INST] convention. - context.logger.debug( - f"Mistral chat template failed ({type(last_error).__name__}: {last_error}); " - "falling back to manual [INST] formatting." - ) - text = f"[INST] {FLUX2_DEV_SYSTEM_MESSAGE}\n\n{self.prompt} [/INST]" - inputs = processor( - text, - return_tensors="pt", - padding="max_length", - truncation=True, - max_length=self.max_seq_len, - ) - + # Build the raw FLUX.2 [dev] prompt template — matches ComfyUI's + # `Flux2Tokenizer.llama_template.format(text)` byte-for-byte. `[SYSTEM_PROMPT]`, + # `[/SYSTEM_PROMPT]`, `[INST]`, `[/INST]` are Tekken special tokens, so any of + # the three processors we can land on (Pixtral/Mistral3 processor, plain HF + # LlamaTokenizerFast, our embedded-Tekken adapter) emit the same sequence. + text = FLUX2_DEV_PROMPT_TEMPLATE.format(system=FLUX2_DEV_SYSTEM_MESSAGE, prompt=self.prompt) + + # Comfy pads on the LEFT (`pad_left=True`), keeping the meaningful tokens + # at the right edge of the sequence. HF processors expose this via the + # `padding_side` attribute on their underlying tokenizer; we set it + # explicitly so the call matches Comfy's behavior regardless of the + # tokenizer's default. `processor` is typed as the `AnyModel` union; + # narrow to `Any` for the duration of the tokenizer call. + proc = cast(Any, processor) + tokenizer = getattr(proc, "tokenizer", proc) + if hasattr(tokenizer, "padding_side"): + tokenizer.padding_side = "left" + + inputs = proc( + text, + return_tensors="pt", + padding="max_length", + padding_side="left", + truncation=True, + max_length=self.max_seq_len, + ) input_ids = inputs["input_ids"].to(device) attention_mask = inputs["attention_mask"].to(device) diff --git a/invokeai/backend/model_manager/configs/mistral_encoder.py b/invokeai/backend/model_manager/configs/mistral_encoder.py index 6bf8bd634f1..d14f7003f18 100644 --- a/invokeai/backend/model_manager/configs/mistral_encoder.py +++ b/invokeai/backend/model_manager/configs/mistral_encoder.py @@ -15,15 +15,18 @@ from invokeai.backend.model_manager.taxonomy import BaseModelType, MistralVariantType, ModelFormat, ModelType from invokeai.backend.quantization.gguf.ggml_tensor import GGMLTensor -# Mistral cow distillation hidden_size. Used by FLUX.2 [dev]. -_COW_HIDDEN_SIZE = 5120 - -# Layer count of the BFL "cow-mistral3-small" distillation. FLUX.2 [dev]'s joint -# attention was trained with hidden-state indices (10, 20, 30) — for a 30-layer -# Mistral that's (1/3, 2/3, last). Upstream Mistral Small 3.1 / 3.2 (40 layers) -# sample at different relative depths and produce off-distribution embeddings, -# so we reject anything but 30-layer cow encoders. +# Mistral Small 3 family hidden_size — both the BFL canonical 40-layer encoder +# (``black-forest-labs/FLUX.2-dev/text_encoder``) and the 30-layer "cow" community +# distillation share this. Anything else is rejected as not a FLUX.2 encoder. +_MISTRAL_3_HIDDEN_SIZE = 5120 + +# Layer counts ComfyUI's reference implementation accepts: +# - 40 layers → BFL canonical (Mistral3_24B), keep final RMSNorm enabled. +# - 30 layers → BFL "cow" distillation, final RMSNorm dropped at load time. +# Anything else is rejected. +_MISTRAL_24B_NUM_LAYERS = 40 _COW_NUM_LAYERS = 30 +_ACCEPTED_NUM_LAYERS = (_COW_NUM_LAYERS, _MISTRAL_24B_NUM_LAYERS) def _has_mistral_keys(state_dict: dict[str | int, Any]) -> bool: @@ -104,25 +107,30 @@ def _embed_hidden_size(state_dict: dict[str | int, Any]) -> int | None: return None -def _is_cow_state_dict(state_dict: dict[str | int, Any]) -> bool: - """Check whether a state dict matches the 30-layer cow distillation. +def _get_mistral_variant_from_state_dict(state_dict: dict[str | int, Any]) -> MistralVariantType | None: + """Return the Mistral variant for a state dict, or ``None`` if unrecognized. - FLUX.2 [dev] only works with the 30-layer cow-mistral3-small weights — upstream - Mistral Small 3.1 / 3.2 (40 layers) produce off-distribution embeddings under - the (10, 20, 30) hidden-state extraction the joint attention was trained for. + Recognized variants: + - 30-layer + hidden_size=5120 → ``MistralVariantType.Cow`` (BFL distillation) + - 40-layer + hidden_size=5120 → ``MistralVariantType.Mistral24B`` (BFL canonical / upstream Mistral Small 3.x) """ - if _embed_hidden_size(state_dict) != _COW_HIDDEN_SIZE: - return False - return _count_mistral_layers(state_dict) == _COW_NUM_LAYERS + if _embed_hidden_size(state_dict) != _MISTRAL_3_HIDDEN_SIZE: + return None + num_layers = _count_mistral_layers(state_dict) + if num_layers == _COW_NUM_LAYERS: + return MistralVariantType.Cow + if num_layers == _MISTRAL_24B_NUM_LAYERS: + return MistralVariantType.Mistral24B + return None -def _is_cow_config(config_path) -> bool: - """Check a HF ``config.json`` for the 30-layer cow Mistral signature.""" +def _get_mistral_variant_from_config(config_path) -> MistralVariantType | None: + """Return the Mistral variant for a HF ``config.json``, or ``None`` if unrecognized.""" try: with open(config_path, "r", encoding="utf-8") as f: config = json.load(f) except (json.JSONDecodeError, OSError): - return False + return None # Mistral3ForConditionalGeneration nests the LM config under text_config. hidden_size = config.get("hidden_size") @@ -134,7 +142,13 @@ def _is_cow_config(config_path) -> bool: if num_layers is None: num_layers = text_config.get("num_hidden_layers") - return hidden_size == _COW_HIDDEN_SIZE and num_layers == _COW_NUM_LAYERS + if hidden_size != _MISTRAL_3_HIDDEN_SIZE: + return None + if num_layers == _COW_NUM_LAYERS: + return MistralVariantType.Cow + if num_layers == _MISTRAL_24B_NUM_LAYERS: + return MistralVariantType.Mistral24B + return None class MistralEncoder_Diffusers_Config(Config_Base): @@ -148,9 +162,13 @@ class MistralEncoder_Diffusers_Config(Config_Base): Does NOT match a full FLUX.2 pipeline directory — those are picked up by the `Main_Diffusers_Flux2_Config` instead. - Only the 30-layer cow distillation is accepted; upstream Mistral Small 3.1 / 3.2 - (40 layers) produces off-distribution embeddings under FLUX.2's (10, 20, 30) - hidden-state extraction. + Accepts both: + - 30-layer "cow" distillation (recommended, produces the cleanest output) + - 40-layer Mistral Small 3 (BFL canonical / upstream Mistral 3.x — also works, + slightly weaker prompt adherence than cow in our tests) + + The variant field records which one was probed so the loader can decide + whether to keep the final RMSNorm (40-layer) or strip it (30-layer cow). """ base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) @@ -191,21 +209,22 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - }, ) - if not _is_cow_config(expected_config_path): + variant = _get_mistral_variant_from_config(expected_config_path) + if variant is None: raise NotAMatchError( - "config.json describes a non-cow Mistral (expected hidden_size=5120, num_hidden_layers=30). " - "Only the 30-layer cow-mistral3-small distillation is supported for FLUX.2 [dev]." + f"config.json does not describe a recognized Mistral variant " + f"(expected hidden_size={_MISTRAL_3_HIDDEN_SIZE} and num_hidden_layers in {_ACCEPTED_NUM_LAYERS})." ) - return cls(variant=MistralVariantType.Cow, **override_fields) + return cls(variant=variant, **override_fields) class MistralEncoder_Checkpoint_Config(Checkpoint_Config_Base, Config_Base): """Configuration for a single-file Mistral text encoder (safetensors). - Only the 30-layer cow distillation is accepted (e.g. Comfy-Org's bf16/fp8/fp4 - files). Upstream Mistral Small 3.1 / 3.2 single-files are rejected — they have - 40 layers and produce off-distribution embeddings for FLUX.2's joint attention. + Accepts both 30-layer cow (Comfy-Org bf16/fp8/fp4) and 40-layer Mistral Small 3 + (BFL canonical / upstream Mistral 3.x single-files). The loader uses the + detected variant to decide whether to keep or strip the final RMSNorm. """ base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) @@ -228,20 +247,22 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - if _has_ggml_tensors(state_dict): raise NotAMatchError("state dict looks like GGUF quantized") - if not _is_cow_state_dict(state_dict): + variant = _get_mistral_variant_from_state_dict(state_dict) + if variant is None: raise NotAMatchError( - f"not a 30-layer cow-mistral3-small (got hidden_size={_embed_hidden_size(state_dict)}, " - f"layers={_count_mistral_layers(state_dict)}). FLUX.2 [dev] only works with the 30-layer " - "cow distillation — upstream Mistral Small 3.1 / 3.2 (40 layers) produces wrong embeddings." + f"unrecognized Mistral geometry (got hidden_size={_embed_hidden_size(state_dict)}, " + f"layers={_count_mistral_layers(state_dict)}). Expected hidden_size={_MISTRAL_3_HIDDEN_SIZE} " + f"and num_hidden_layers in {_ACCEPTED_NUM_LAYERS}." ) - return cls(variant=MistralVariantType.Cow, **override_fields) + return cls(variant=variant, **override_fields) class MistralEncoder_GGUF_Config(Checkpoint_Config_Base, Config_Base): """Configuration for a GGUF-quantized Mistral text encoder. - Only the 30-layer cow distillation is accepted — see ``MistralEncoder_Checkpoint_Config``. + Accepts both 30-layer cow GGUFs and 40-layer Mistral Small 3 GGUFs — see + ``MistralEncoder_Checkpoint_Config`` for variant handling. """ base: Literal[BaseModelType.Any] = Field(default=BaseModelType.Any) @@ -264,11 +285,12 @@ def from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) - if not _has_ggml_tensors(state_dict): raise NotAMatchError("state dict does not look like GGUF quantized") - if not _is_cow_state_dict(state_dict): + variant = _get_mistral_variant_from_state_dict(state_dict) + if variant is None: raise NotAMatchError( - f"not a 30-layer cow-mistral3-small (got hidden_size={_embed_hidden_size(state_dict)}, " - f"layers={_count_mistral_layers(state_dict)}). FLUX.2 [dev] only works with the 30-layer " - "cow distillation — upstream Mistral Small 3.1 / 3.2 (40 layers) produces wrong embeddings." + f"unrecognized Mistral geometry (got hidden_size={_embed_hidden_size(state_dict)}, " + f"layers={_count_mistral_layers(state_dict)}). Expected hidden_size={_MISTRAL_3_HIDDEN_SIZE} " + f"and num_hidden_layers in {_ACCEPTED_NUM_LAYERS}." ) - return cls(variant=MistralVariantType.Cow, **override_fields) + return cls(variant=variant, **override_fields) diff --git a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py index 457528a5ffb..c91dd6b3bcf 100644 --- a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py +++ b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py @@ -48,6 +48,7 @@ _COW_HIDDEN_SIZE = 5120 _COW_INTERMEDIATE_SIZE = 32768 _COW_NUM_HIDDEN_LAYERS = 30 +_MISTRAL_24B_NUM_HIDDEN_LAYERS = 40 _COW_NUM_ATTENTION_HEADS = 32 _COW_NUM_KV_HEADS = 8 # grouped-query attention _COW_HEAD_DIM = 128 @@ -254,6 +255,53 @@ def _materialize_remaining_meta_tensors(model: torch.nn.Module, dtype: torch.dty ) +def _strip_final_norm_for_cow(model: torch.nn.Module, num_hidden_layers: int, logger: Any) -> None: + """Replace ``model.norm`` with ``Identity`` for the 30-layer cow distillation. + + ComfyUI's reference implementation (``Mistral3_24BModel`` with ``num_layers=30``) + sets ``final_norm=False``, so the hidden state at extraction index 30 is the + raw output of layer 29 — NOT the final-RMSNorm'd version. Transformers' + ``MistralModel`` always builds a final ``model.norm`` and applies it to + ``hidden_states[-1]`` when ``output_hidden_states=True``, which produces + off-distribution embeddings for the cow weights. Swap the norm out for an + identity here so our extraction matches Comfy / BFL. + + The 40-layer Mistral Small 3 variant keeps the final norm. + """ + if num_hidden_layers != _COW_NUM_HIDDEN_LAYERS: + return + if not hasattr(model, "norm"): + return + model.norm = torch.nn.Identity() + logger.info("Replaced model.norm with Identity for 30-layer cow Mistral (final_norm=False).") + + +def _warn_if_40_layer_mistral(num_hidden_layers: int, logger: Any) -> None: + """Warn when a 40-layer Mistral Small 3 is loaded as a FLUX.2 [dev] text encoder. + + Architecturally, BFL's canonical ``black-forest-labs/FLUX.2-dev/text_encoder`` + (40-layer, fine-tuned by BFL) and upstream ``mistralai/Mistral-Small-3.x`` + GGUFs / safetensors (40-layer, base weights) are indistinguishable. In + practice only the BFL bundle produces clean output — upstream Mistral 3.1/3.2 + at any quantization level gives visibly degraded prompt adherence because + the joint attention was not trained against those weights. + + We accept both at probe time and emit this warning at load time so users who + install a non-BFL 40-layer Mistral see the issue called out in the log + instead of just getting weird images. + """ + if num_hidden_layers != _MISTRAL_24B_NUM_HIDDEN_LAYERS: + return + logger.warning( + "Loaded a 40-layer Mistral Small 3 text encoder. " + "If this is NOT BFL's canonical FLUX.2-dev/text_encoder, expect degraded " + "prompt adherence — upstream Mistral 3.1 / 3.2 weights (GGUFs from " + "unsloth, gguf-org, etc.) are not what FLUX.2's joint attention was " + "trained against. Recommended encoders: Comfy-Org bf16/fp8/fp4 or " + "gguf-org cow-mistral3-small quants (all 30-layer cow distillation)." + ) + + def _drop_quantization_metadata(sd: dict[str, Any], logger) -> dict[str, Any]: """Dequantize Comfy-Org-style FP8/FP4 weights and drop their metadata keys. @@ -291,76 +339,79 @@ def _drop_quantization_metadata(sd: dict[str, Any], logger) -> dict[str, Any]: return sd -def _flatten_message_content(content: Any) -> str: - """Reduce HF chat-template content (str or [{type:"text", text:"..."}]) to plain text.""" - if isinstance(content, str): - return content - if isinstance(content, list): - parts: list[str] = [] - for item in content: - if isinstance(item, dict) and item.get("type") == "text": - parts.append(str(item.get("text", ""))) - return "".join(parts) - return str(content) - +class _TekkenRawTextAdapter: + """Expose a HuggingFace-tokenizer-like ``__call__`` over a ``mistral_common`` + Tekkenizer. -class _TekkenChatTemplateAdapter: - """Expose HuggingFace's ``apply_chat_template`` surface backed by - ``mistral_common.MistralTokenizer``. + FLUX.2 [dev]'s reference encoder pipeline (matching ComfyUI's + ``Mistral3Tokenizer`` + ``Flux2Tokenizer``) feeds a pre-formatted raw string + — ``[SYSTEM_PROMPT]…[/SYSTEM_PROMPT][INST]{prompt}[/INST]`` — straight into + the BPE encoder rather than going through ``apply_chat_template``. The + Tekken special tokens (``[SYSTEM_PROMPT]``, ``[/SYSTEM_PROMPT]``, ``[INST]``, + ``[/INST]``) are part of the vocab so the encode call produces the right + token IDs without any chat-template indirection. - The FLUX.2 [dev] invocation only calls ``apply_chat_template(messages, - tokenize=True, return_tensors='pt', padding='max_length', max_length=N)``, - so only that surface is implemented. + Padding defaults to **left** to match Comfy's ``pad_left=True`` — this keeps + the meaningful tokens at the right edge of the sequence, where the + transformer's joint attention was trained to consume them. """ + # Default special tokens for Mistral Small 3 Tekken vocab. + _BOS_ID = 1 # + _PAD_ID = 11 # + def __init__(self, mistral_tokenizer: Any): self._tok = mistral_tokenizer - # Mistral Small 3's id (token 11 in the Tekken vocab). - self.pad_token_id = 11 - - def apply_chat_template( + self.pad_token_id = self._PAD_ID + + def _encode(self, text: str) -> list[int]: + """Encode raw text via the underlying Tekkenizer (adds BOS, no EOS). + + ``mistral_common`` exposes the BPE under + ``MistralTokenizer.instruct_tokenizer.tokenizer`` (the inner Tekkenizer). + Different mistral-common versions name the encode entrypoint slightly + differently; we try the documented one first and fall back to the + wrapper's own encode method. + """ + inner = getattr(getattr(self._tok, "instruct_tokenizer", None), "tokenizer", None) + if inner is not None and hasattr(inner, "encode"): + # Tekkenizer.encode(text, bos: bool, eos: bool) → list[int] + return list(inner.encode(text, bos=True, eos=False)) + # Older mistral-common releases expose .encode on the top-level wrapper. + return list(self._tok.encode(text, add_bos=True, add_eos=False)) + + def __call__( self, - messages: list[dict[str, Any]], + text: str, *, - tokenize: bool = True, - return_dict: bool = True, - return_tensors: str = "pt", - add_generation_prompt: bool = False, padding: str | bool = "max_length", + padding_side: str = "left", truncation: bool = True, max_length: int = 512, + return_tensors: str = "pt", **_kwargs: Any, ) -> dict[str, torch.Tensor]: - if not tokenize or return_tensors != "pt": + if return_tensors != "pt": raise NotImplementedError( - "_TekkenChatTemplateAdapter only supports tokenize=True / return_tensors='pt' " - f"(got tokenize={tokenize}, return_tensors={return_tensors})" + "_TekkenRawTextAdapter only supports return_tensors='pt' " f"(got {return_tensors})" ) - from mistral_common.protocol.instruct.messages import SystemMessage, UserMessage - from mistral_common.protocol.instruct.request import ChatCompletionRequest - - msgs: list[Any] = [] - for msg in messages: - role = msg.get("role") - content = _flatten_message_content(msg.get("content")) - if role == "system": - msgs.append(SystemMessage(content=content)) - elif role == "user": - msgs.append(UserMessage(content=content)) - - encoded = self._tok.encode_chat_completion(ChatCompletionRequest(messages=msgs)) - tokens: list[int] = list(encoded.tokens) - + tokens = self._encode(text) if truncation and len(tokens) > max_length: tokens = tokens[:max_length] - attention: list[int] = [1] * len(tokens) + attention = [1] * len(tokens) if padding == "max_length": pad_needed = max_length - len(tokens) if pad_needed > 0: - tokens.extend([self.pad_token_id] * pad_needed) - attention.extend([0] * pad_needed) + pad_tokens = [self.pad_token_id] * pad_needed + pad_attn = [0] * pad_needed + if padding_side == "left": + tokens = pad_tokens + tokens + attention = pad_attn + attention + else: + tokens = tokens + pad_tokens + attention = attention + pad_attn return { "input_ids": torch.tensor([tokens], dtype=torch.long), @@ -457,7 +508,7 @@ def _try_load_embedded_tekken(model_path: Path, logger: Any) -> Optional[AnyMode pass logger.info(f"Loaded embedded Tekken tokenizer from {model_path.name}") - return _TekkenChatTemplateAdapter(mistral_tok) + return _TekkenRawTextAdapter(mistral_tok) def _load_tokenizer_from_hf(logger: Any) -> AnyModel: @@ -578,12 +629,23 @@ def _load_model( # only when the diffusers/transformers version supports it. from transformers import AutoModel - return AutoModel.from_pretrained( + model = AutoModel.from_pretrained( text_encoder_path, torch_dtype=model_dtype, low_cpu_mem_usage=True, local_files_only=True, ) + # `MistralModel.norm` is always built by transformers, but the + # 30-layer cow distillation was trained against the post-layer-29 + # state *without* the final norm — swap it for Identity to match + # ComfyUI's reference implementation. ``Mistral3ForConditionalGeneration`` + # nests the LM under ``.language_model``; handle both layouts. + inner = getattr(model, "language_model", None) or model + num_layers = int(getattr(getattr(inner, "config", None), "num_hidden_layers", 0)) + logger = InvokeAILogger.get_logger("MistralEncoderDiffusersLoader") + _strip_final_norm_for_cow(inner, num_layers, logger) + _warn_if_40_layer_mistral(num_layers, logger) + return model raise ValueError( "Only Tokenizer and TextEncoder submodels are supported. " @@ -679,6 +741,8 @@ def _load_text_encoder(self, config: MistralEncoder_Checkpoint_Config) -> AnyMod parent.register_buffer(parts[-1], inv_freq.to(model_dtype), persistent=False) _materialize_remaining_meta_tensors(model, model_dtype, logger) + _strip_final_norm_for_cow(model, mistral_config.num_hidden_layers, logger) + _warn_if_40_layer_mistral(mistral_config.num_hidden_layers, logger) return model @@ -778,6 +842,8 @@ def _load_from_gguf(self, config: MistralEncoder_GGUF_Config) -> AnyModel: parent.register_buffer(parts[-1], inv_freq.to(compute_dtype), persistent=False) _materialize_remaining_meta_tensors(model, compute_dtype, logger) + _strip_final_norm_for_cow(model, mistral_config.num_hidden_layers, logger) + _warn_if_40_layer_mistral(mistral_config.num_hidden_layers, logger) return model diff --git a/invokeai/backend/model_manager/taxonomy.py b/invokeai/backend/model_manager/taxonomy.py index 15c0e305642..fc934f5cf5b 100644 --- a/invokeai/backend/model_manager/taxonomy.py +++ b/invokeai/backend/model_manager/taxonomy.py @@ -186,12 +186,20 @@ class MistralVariantType(str, Enum): """Mistral text encoder variants used by FLUX.2 [dev].""" Cow = "cow_mistral3_small" - """The 30-layer BFL "cow-mistral3-small" distillation (hidden_size=5120) — - the only Mistral variant FLUX.2 [dev]'s joint attention was trained against. + """The 30-layer BFL "cow-mistral3-small" distillation (hidden_size=5120). Hidden states are sampled at indices (10, 20, 30) which on a 30-layer model - hit 1/3, 2/3, and the final layer. Upstream Mistral Small 3.1 / 3.2 (40 - layers) sample at different relative depths and produce off-distribution - embeddings, so they are not accepted as FLUX.2 text encoders.""" + hit 1/3, 2/3, and the final layer. ComfyUI's reference implementation + drops the final RMSNorm for this variant (``final_norm=False``), so the + loader strips ``model.norm`` after loading the weights.""" + + Mistral24B = "mistral3_24b" + """The 40-layer Mistral Small 3 (24B, hidden_size=5120) text encoder BFL + ships in the canonical ``black-forest-labs/FLUX.2-dev/text_encoder``. Same + extraction indices (10, 20, 30), final RMSNorm kept enabled. Architecturally + identical to upstream ``mistralai/Mistral-Small-3.1/3.2`` — installing one + of those instead of BFL's release will load fine but produces visibly + weaker prompt adherence than the cow distillation, so the cow variants + remain the recommended default.""" class ModelFormat(str, Enum): diff --git a/invokeai/frontend/web/src/features/modelManagerV2/models.ts b/invokeai/frontend/web/src/features/modelManagerV2/models.ts index b34986f58f2..ee440b6941b 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/models.ts +++ b/invokeai/frontend/web/src/features/modelManagerV2/models.ts @@ -263,6 +263,7 @@ export const MODEL_VARIANT_TO_LONG_NAME: Record = { qwen3_8b: 'Qwen3 8B', qwen3_06b: 'Qwen3 0.6B', cow_mistral3_small: 'cow-mistral3-small (FLUX.2)', + mistral3_24b: 'Mistral Small 3 (24B, FLUX.2)', }; export const MODEL_FORMAT_TO_LONG_NAME: Record = { diff --git a/invokeai/frontend/web/src/features/nodes/types/common.ts b/invokeai/frontend/web/src/features/nodes/types/common.ts index ab335f61f8c..4d9a2bb5050 100644 --- a/invokeai/frontend/web/src/features/nodes/types/common.ts +++ b/invokeai/frontend/web/src/features/nodes/types/common.ts @@ -165,7 +165,7 @@ export const zFlux2VariantType = z.enum(['klein_4b', 'klein_4b_base', 'klein_9b' export const zZImageVariantType = z.enum(['turbo', 'zbase']); const zQwenImageVariantType = z.enum(['generate', 'edit']); export const zQwen3VariantType = z.enum(['qwen3_4b', 'qwen3_8b', 'qwen3_06b']); -export const zMistralVariantType = z.enum(['cow_mistral3_small']); +export const zMistralVariantType = z.enum(['cow_mistral3_small', 'mistral3_24b']); export const zAnyModelVariant = z.union([ zModelVariantType, zClipVariantType, diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index 7d81b425305..c8e222d3ee0 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -23820,7 +23820,7 @@ export type components = { * @description Mistral text encoder variants used by FLUX.2 [dev]. * @enum {string} */ - MistralVariantType: "cow_mistral3_small"; + MistralVariantType: "cow_mistral3_small" | "mistral3_24b"; /** * ModelFormat * @description Storage format of model. From 0afef9d3b8fecda561935d3a2f8baa39dc632ab8 Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Fri, 10 Jul 2026 03:08:43 +0200 Subject: [PATCH 6/8] fix(ui): remove unused exports flagged by knip on FLUX.2 [dev] branch Knip reported 6 unused exports. Each was dead code rather than incomplete wiring, verified against the actual consumers: - Drop the vestigial `flux2DevSourceModel` param end-to-end (state field, default, migration, reducer, action, selector, test). The FLUX graph builder auto-picks the diffusers source itself and never read this param; no UI set it. Mirrors how the Klein path already works. - Delete `selectIsFlux2Klein`; the graph builder computes this locally and only `selectIsFlux2Dev` is consumed. - Un-export `zMistralVariantType`; used only in the local `zAnyModelVariant` union, like `zQwenImageVariantType`. - Delete `selectMistralEncoderModels`; components use the `useMistralEncoderModels` hook instead. - Un-export `isFlux2DevMainModelConfig`; used only within types.ts, like its `isFluxDevMainModelConfig` / `isFlux2Klein9BMainModelConfig` siblings. --- .../listeners/modelSelected.test.ts | 1 - .../features/controlLayers/store/paramsSlice.ts | 17 ----------------- .../src/features/controlLayers/store/types.ts | 2 -- .../web/src/features/nodes/types/common.ts | 2 +- .../web/src/services/api/hooks/modelsByType.ts | 1 - invokeai/frontend/web/src/services/api/types.ts | 2 +- 6 files changed, 2 insertions(+), 23 deletions(-) diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts index b78ca91baa1..80bb0773f7f 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelSelected.test.ts @@ -172,7 +172,6 @@ function buildMockState(overrides: Record = {}) { kleinQwen3EncoderModel: null, flux2DevVaeModel: null, flux2DevMistralEncoderModel: null, - flux2DevSourceModel: null, zImageScheduler: 'euler', ...overrides, }, diff --git a/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts index 1cfe79f58f0..17e8144673d 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts @@ -277,13 +277,6 @@ const slice = createSlice({ } state.flux2DevMistralEncoderModel = result.data; }, - flux2DevSourceModelSelected: (state, action: PayloadAction) => { - const result = zParamsState.shape.flux2DevSourceModel.safeParse(action.payload); - if (!result.success) { - return; - } - state.flux2DevSourceModel = result.data; - }, qwenImageComponentSourceSelected: (state, action: PayloadAction) => { const result = zParamsState.shape.qwenImageComponentSource.safeParse(action.payload); if (!result.success) { @@ -642,7 +635,6 @@ const resetState = (state: ParamsState): ParamsState => { newState.kleinQwen3EncoderModel = oldState.kleinQwen3EncoderModel; newState.flux2DevVaeModel = oldState.flux2DevVaeModel; newState.flux2DevMistralEncoderModel = oldState.flux2DevMistralEncoderModel; - newState.flux2DevSourceModel = oldState.flux2DevSourceModel; newState.qwenImageComponentSource = oldState.qwenImageComponentSource; newState.qwenImageVaeModel = oldState.qwenImageVaeModel; newState.qwenImageQwenVLEncoderModel = oldState.qwenImageQwenVLEncoderModel; @@ -697,7 +689,6 @@ export const { kleinQwen3EncoderModelSelected, flux2DevVaeModelSelected, flux2DevMistralEncoderModelSelected, - flux2DevSourceModelSelected, qwenImageComponentSourceSelected, qwenImageVaeModelSelected, qwenImageQwenVLEncoderModelSelected, @@ -819,7 +810,6 @@ export const selectKleinVaeModel = createParamsSelector((params) => params.klein export const selectKleinQwen3EncoderModel = createParamsSelector((params) => params.kleinQwen3EncoderModel); export const selectFlux2DevVaeModel = createParamsSelector((params) => params.flux2DevVaeModel); export const selectFlux2DevMistralEncoderModel = createParamsSelector((params) => params.flux2DevMistralEncoderModel); -export const selectFlux2DevSourceModel = createParamsSelector((params) => params.flux2DevSourceModel); export const selectQwenImageComponentSource = createParamsSelector((params) => params.qwenImageComponentSource); export const selectQwenImageVaeModel = createParamsSelector((params) => params.qwenImageVaeModel); export const selectQwenImageQwenVLEncoderModel = createParamsSelector((params) => params.qwenImageQwenVLEncoderModel); @@ -1033,10 +1023,3 @@ export const selectIsFlux2Dev = createSelector(selectMainModelConfig, (modelConf } return 'variant' in modelConfig && modelConfig.variant === 'dev'; }); - -export const selectIsFlux2Klein = createSelector(selectMainModelConfig, (modelConfig) => { - if (!modelConfig || modelConfig.base !== 'flux2') { - return false; - } - return !('variant' in modelConfig) || modelConfig.variant !== 'dev'; -}); diff --git a/invokeai/frontend/web/src/features/controlLayers/store/types.ts b/invokeai/frontend/web/src/features/controlLayers/store/types.ts index a11d3751172..fe4bd001fee 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/types.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/types.ts @@ -847,7 +847,6 @@ export const zParamsState = z.object({ // Flux2 [dev] model components - uses Mistral Small 3.1 (24B) text encoder flux2DevVaeModel: zParameterVAEModel.nullable(), // Optional: Separate FLUX.2 VAE for [dev] flux2DevMistralEncoderModel: zModelIdentifierField.nullable(), // Optional: Standalone Mistral encoder for [dev] - flux2DevSourceModel: zParameterModel.nullable(), // Diffusers FLUX.2 [dev] (fallback for VAE/Encoder) // Qwen Image Edit model components - GGUF transformer needs a Diffusers source for VAE/encoder qwenImageComponentSource: zParameterModel.nullable(), // Diffusers model providing VAE + text encoder qwenImageVaeModel: zParameterVAEModel.nullable(), // Optional: Standalone Qwen Image VAE checkpoint @@ -935,7 +934,6 @@ export const getInitialParamsState = (): ParamsState => ({ kleinQwen3EncoderModel: null, flux2DevVaeModel: null, flux2DevMistralEncoderModel: null, - flux2DevSourceModel: null, qwenImageComponentSource: null, qwenImageVaeModel: null, qwenImageQwenVLEncoderModel: null, diff --git a/invokeai/frontend/web/src/features/nodes/types/common.ts b/invokeai/frontend/web/src/features/nodes/types/common.ts index 4d9a2bb5050..3c1679ec0d8 100644 --- a/invokeai/frontend/web/src/features/nodes/types/common.ts +++ b/invokeai/frontend/web/src/features/nodes/types/common.ts @@ -165,7 +165,7 @@ export const zFlux2VariantType = z.enum(['klein_4b', 'klein_4b_base', 'klein_9b' export const zZImageVariantType = z.enum(['turbo', 'zbase']); const zQwenImageVariantType = z.enum(['generate', 'edit']); export const zQwen3VariantType = z.enum(['qwen3_4b', 'qwen3_8b', 'qwen3_06b']); -export const zMistralVariantType = z.enum(['cow_mistral3_small', 'mistral3_24b']); +const zMistralVariantType = z.enum(['cow_mistral3_small', 'mistral3_24b']); export const zAnyModelVariant = z.union([ zModelVariantType, zClipVariantType, diff --git a/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts b/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts index 1e61222d970..c568efdbb7c 100644 --- a/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts +++ b/invokeai/frontend/web/src/services/api/hooks/modelsByType.ts @@ -156,7 +156,6 @@ export const selectQwenVLEncoderModels = buildModelsSelector(isQwenVLEncoderMode export const selectZImageDiffusersModels = buildModelsSelector(isZImageDiffusersMainModelConfig); export const selectFlux2DiffusersModels = buildModelsSelector(isFlux2DiffusersMainModelConfig); export const selectFlux2DevDiffusersModels = buildModelsSelector(isFlux2DevDiffusersMainModelConfig); -export const selectMistralEncoderModels = buildModelsSelector(isMistralEncoderModelConfig); export const selectFluxVAEModels = buildModelsSelector(isFluxVAEModelConfig); export const selectAnimaVAEModels = buildModelsSelector(isAnimaVAEModelConfig); export const useTextLLMModels = () => buildModelsHook(isTextLLMModelConfig)(); diff --git a/invokeai/frontend/web/src/services/api/types.ts b/invokeai/frontend/web/src/services/api/types.ts index 08a2c8b2208..9d75c233dbe 100644 --- a/invokeai/frontend/web/src/services/api/types.ts +++ b/invokeai/frontend/web/src/services/api/types.ts @@ -471,7 +471,7 @@ const isFlux2Klein9BMainModelConfig = (config: AnyModelConfig): config is MainMo return config.type === 'main' && config.base === 'flux2' && config.name.toLowerCase().includes('9b'); }; -export const isFlux2DevMainModelConfig = (config: AnyModelConfig): config is MainModelConfig => { +const isFlux2DevMainModelConfig = (config: AnyModelConfig): config is MainModelConfig => { return config.type === 'main' && config.base === 'flux2' && config.variant === 'dev'; }; From 0a87bc4eaceaa0c099b2dc52b54e62b723ec4b4d Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Fri, 10 Jul 2026 03:14:45 +0200 Subject: [PATCH 7/8] Chore OpenApi --- invokeai/frontend/web/openapi.json | 2049 ++++++++++++++++++++++------ 1 file changed, 1639 insertions(+), 410 deletions(-) diff --git a/invokeai/frontend/web/openapi.json b/invokeai/frontend/web/openapi.json index 13a3185b23b..8c517af70a8 100644 --- a/invokeai/frontend/web/openapi.json +++ b/invokeai/frontend/web/openapi.json @@ -969,6 +969,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -1290,6 +1299,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -1611,6 +1629,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -1982,6 +2009,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -2377,6 +2413,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -3592,6 +3637,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -11637,6 +11691,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -24678,11 +24741,11 @@ "$ref": "#/components/schemas/LatentsOutput" } }, - "Flux2KleinLoRACollectionLoader": { + "Flux2DevLoRACollectionLoader": { "category": "model", "class": "invocation", "classification": "prototype", - "description": "Applies a collection of LoRAs to a FLUX.2 Klein transformer and/or Qwen3 text encoder.", + "description": "Apply a collection of LoRAs to a FLUX.2 [dev] transformer and/or Mistral encoder.", "node_pack": "invokeai", "properties": { "id": { @@ -24730,9 +24793,7 @@ "input": "any", "orig_default": null, "orig_required": false, - "title": "LoRAs", - "ui_model_base": ["flux2"], - "ui_model_type": ["lora"] + "title": "LoRAs" }, "transformer": { "anyOf": [ @@ -24751,45 +24812,45 @@ "orig_required": false, "title": "Transformer" }, - "qwen3_encoder": { + "mistral_encoder": { "anyOf": [ { - "$ref": "#/components/schemas/Qwen3EncoderField" + "$ref": "#/components/schemas/MistralEncoderField" }, { "type": "null" } ], "default": null, - "description": "Qwen3 tokenizer and text encoder", + "description": "Mistral tokenizer/processor and text encoder", "field_kind": "input", "input": "connection", "orig_default": null, "orig_required": false, - "title": "Qwen3 Encoder" + "title": "Mistral Encoder" }, "type": { - "const": "flux2_klein_lora_collection_loader", - "default": "flux2_klein_lora_collection_loader", + "const": "flux2_dev_lora_collection_loader", + "default": "flux2_dev_lora_collection_loader", "field_kind": "node_attribute", "title": "type", "type": "string" } }, "required": ["type", "id"], - "tags": ["lora", "model", "flux", "klein", "flux2"], - "title": "Apply LoRA Collection - Flux2 Klein", + "tags": ["lora", "model", "flux", "flux2", "dev"], + "title": "Apply LoRA Collection - FLUX.2 [dev]", "type": "object", - "version": "1.0.1", + "version": "1.0.0", "output": { - "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" + "$ref": "#/components/schemas/Flux2DevLoRALoaderOutput" } }, - "Flux2KleinLoRALoaderInvocation": { + "Flux2DevLoRALoaderInvocation": { "category": "model", "class": "invocation", "classification": "prototype", - "description": "Apply a LoRA model to a FLUX.2 Klein transformer and/or Qwen3 text encoder.", + "description": "Apply a LoRA to a FLUX.2 [dev] transformer and/or its Mistral text encoder.", "node_pack": "invokeai", "properties": { "id": { @@ -24861,43 +24922,43 @@ "orig_required": false, "title": "Transformer" }, - "qwen3_encoder": { + "mistral_encoder": { "anyOf": [ { - "$ref": "#/components/schemas/Qwen3EncoderField" + "$ref": "#/components/schemas/MistralEncoderField" }, { "type": "null" } ], "default": null, - "description": "Qwen3 tokenizer and text encoder", + "description": "Mistral tokenizer/processor and text encoder", "field_kind": "input", "input": "connection", "orig_default": null, "orig_required": false, - "title": "Qwen3 Encoder" + "title": "Mistral Encoder" }, "type": { - "const": "flux2_klein_lora_loader", - "default": "flux2_klein_lora_loader", + "const": "flux2_dev_lora_loader", + "default": "flux2_dev_lora_loader", "field_kind": "node_attribute", "title": "type", "type": "string" } }, "required": ["type", "id"], - "tags": ["lora", "model", "flux", "klein", "flux2"], - "title": "Apply LoRA - Flux2 Klein", + "tags": ["lora", "model", "flux", "flux2", "dev"], + "title": "Apply LoRA - FLUX.2 [dev]", "type": "object", "version": "1.0.0", "output": { - "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" + "$ref": "#/components/schemas/Flux2DevLoRALoaderOutput" } }, - "Flux2KleinLoRALoaderOutput": { + "Flux2DevLoRALoaderOutput": { "class": "output", - "description": "FLUX.2 Klein LoRA Loader Output", + "description": "FLUX.2 [dev] LoRA loader output.", "properties": { "transformer": { "anyOf": [ @@ -24914,38 +24975,38 @@ "title": "Transformer", "ui_hidden": false }, - "qwen3_encoder": { + "mistral_encoder": { "anyOf": [ { - "$ref": "#/components/schemas/Qwen3EncoderField" + "$ref": "#/components/schemas/MistralEncoderField" }, { "type": "null" } ], "default": null, - "description": "Qwen3 tokenizer and text encoder", + "description": "Mistral tokenizer/processor and text encoder", "field_kind": "output", - "title": "Qwen3 Encoder", + "title": "Mistral Encoder", "ui_hidden": false }, "type": { - "const": "flux2_klein_lora_loader_output", - "default": "flux2_klein_lora_loader_output", + "const": "flux2_dev_lora_loader_output", + "default": "flux2_dev_lora_loader_output", "field_kind": "node_attribute", "title": "type", "type": "string" } }, - "required": ["output_meta", "transformer", "qwen3_encoder", "type", "type"], - "title": "Flux2KleinLoRALoaderOutput", + "required": ["output_meta", "transformer", "mistral_encoder", "type", "type"], + "title": "Flux2DevLoRALoaderOutput", "type": "object" }, - "Flux2KleinModelLoaderInvocation": { + "Flux2DevModelLoaderInvocation": { "category": "model", "class": "invocation", "classification": "prototype", - "description": "Loads a Flux2 Klein model, outputting its submodels.\n\nFlux2 Klein uses Qwen3 as the text encoder instead of CLIP+T5.\nIt uses a 32-channel VAE (AutoencoderKLFlux2) instead of the 16-channel FLUX.1 VAE.\n\nWhen using a Diffusers format model, both VAE and Qwen3 encoder are extracted\nautomatically from the main model. You can override with standalone models:\n- Transformer: Always from Flux2 Klein main model\n- VAE: From main model (Diffusers) or standalone VAE\n- Qwen3 Encoder: From main model (Diffusers) or standalone Qwen3 model", + "description": "Load a FLUX.2 [dev] transformer plus its Mistral text encoder and VAE.\n\nFLUX.2 [dev] is a 32B guidance-distilled rectified flow transformer that uses\nMistral Small 3.1 (24B) as its sole text encoder, sharing the 32-channel\nAutoencoderKLFlux2 VAE with FLUX.2 Klein.\n\nWhen the transformer is a Diffusers-format checkpoint, both VAE and Mistral\nencoder can be extracted directly from the main model. For single-file\nsafetensors or GGUF transformers, you must supply standalone VAE and\nMistral encoder models, or point at a Diffusers FLUX.2 [dev] checkout for\nsub-model extraction.", "node_pack": "invokeai", "properties": { "id": { @@ -24974,7 +25035,7 @@ }, "model": { "$ref": "#/components/schemas/ModelIdentifierField", - "description": "Flux model (Transformer) to load", + "description": "FLUX.2 [dev] model (Transformer) to load", "field_kind": "input", "input": "direct", "orig_required": true, @@ -24992,16 +25053,16 @@ } ], "default": null, - "description": "Standalone VAE model. Flux2 Klein uses the same VAE as FLUX (16-channel). If not provided, VAE will be loaded from the Qwen3 Source model.", + "description": "Standalone FLUX.2 VAE (AutoencoderKLFlux2). If not provided, the VAE is extracted from the Diffusers source model.", "field_kind": "input", "input": "direct", "orig_default": null, "orig_required": false, "title": "VAE", - "ui_model_base": ["flux", "flux2"], + "ui_model_base": ["flux2"], "ui_model_type": ["vae"] }, - "qwen3_encoder_model": { + "mistral_encoder_model": { "anyOf": [ { "$ref": "#/components/schemas/ModelIdentifierField" @@ -25011,15 +25072,15 @@ } ], "default": null, - "description": "Standalone Qwen3 Encoder model. If not provided, encoder will be loaded from the Qwen3 Source model.", + "description": "Standalone Mistral text encoder. Required when the transformer is a single-file safetensors or GGUF without a sibling Diffusers source.", "field_kind": "input", "input": "direct", "orig_default": null, "orig_required": false, - "title": "Qwen3 Encoder", - "ui_model_type": ["qwen3_encoder"] + "title": "Mistral Encoder", + "ui_model_type": ["mistral_encoder"] }, - "qwen3_source_model": { + "mistral_source_model": { "anyOf": [ { "$ref": "#/components/schemas/ModelIdentifierField" @@ -25029,19 +25090,19 @@ } ], "default": null, - "description": "Diffusers Flux2 Klein model to extract VAE and/or Qwen3 encoder from. Use this if you don't have separate VAE/Qwen3 models. Ignored if both VAE and Qwen3 Encoder are provided separately.", + "description": "Diffusers FLUX.2 [dev] model to extract VAE and/or Mistral encoder from. Use this if you don't have separate VAE / Mistral encoder models. Ignored if both are provided separately.", "field_kind": "input", "input": "direct", "orig_default": null, "orig_required": false, - "title": "Qwen3 Source (Diffusers)", + "title": "Mistral Source (Diffusers)", "ui_model_base": ["flux2"], "ui_model_format": ["diffusers"], "ui_model_type": ["main"] }, "max_seq_len": { "default": 512, - "description": "Max sequence length for the Qwen3 encoder.", + "description": "Max sequence length for the Mistral encoder. FLUX.2 [dev] uses 512 by default.", "enum": [256, 512], "field_kind": "input", "input": "any", @@ -25051,25 +25112,25 @@ "type": "integer" }, "type": { - "const": "flux2_klein_model_loader", - "default": "flux2_klein_model_loader", + "const": "flux2_dev_model_loader", + "default": "flux2_dev_model_loader", "field_kind": "node_attribute", "title": "type", "type": "string" } }, "required": ["model", "type", "id"], - "tags": ["model", "flux", "klein", "qwen3"], - "title": "Main Model - Flux2 Klein", + "tags": ["model", "flux", "flux2", "dev", "mistral"], + "title": "Main Model - FLUX.2 [dev]", "type": "object", "version": "1.0.0", "output": { - "$ref": "#/components/schemas/Flux2KleinModelLoaderOutput" + "$ref": "#/components/schemas/Flux2DevModelLoaderOutput" } }, - "Flux2KleinModelLoaderOutput": { + "Flux2DevModelLoaderOutput": { "class": "output", - "description": "Flux2 Klein model loader output.", + "description": "FLUX.2 [dev] model loader output.", "properties": { "transformer": { "$ref": "#/components/schemas/TransformerField", @@ -25078,11 +25139,11 @@ "title": "Transformer", "ui_hidden": false }, - "qwen3_encoder": { - "$ref": "#/components/schemas/Qwen3EncoderField", - "description": "Qwen3 tokenizer and text encoder", + "mistral_encoder": { + "$ref": "#/components/schemas/MistralEncoderField", + "description": "Mistral tokenizer/processor and text encoder", "field_kind": "output", - "title": "Qwen3 Encoder", + "title": "Mistral Encoder", "ui_hidden": false }, "vae": { @@ -25093,7 +25154,7 @@ "ui_hidden": false }, "max_seq_len": { - "description": "The max sequence length for the Qwen3 encoder.", + "description": "Max sequence length for the Mistral encoder.", "enum": [256, 512], "field_kind": "output", "title": "Max Seq Length", @@ -25101,22 +25162,22 @@ "ui_hidden": false }, "type": { - "const": "flux2_klein_model_loader_output", - "default": "flux2_klein_model_loader_output", + "const": "flux2_dev_model_loader_output", + "default": "flux2_dev_model_loader_output", "field_kind": "node_attribute", "title": "type", "type": "string" } }, - "required": ["output_meta", "transformer", "qwen3_encoder", "vae", "max_seq_len", "type", "type"], - "title": "Flux2KleinModelLoaderOutput", + "required": ["output_meta", "transformer", "mistral_encoder", "vae", "max_seq_len", "type", "type"], + "title": "Flux2DevModelLoaderOutput", "type": "object" }, - "Flux2KleinTextEncoderInvocation": { + "Flux2DevTextEncoderInvocation": { "category": "prompt", "class": "invocation", "classification": "prototype", - "description": "Encodes and preps a prompt for Flux2 Klein image generation.\n\nFlux2 Klein uses Qwen3 as the text encoder, extracting hidden states from\nlayers (9, 18, 27) and stacking them for richer text representations.\nThis matches the diffusers Flux2KleinPipeline implementation exactly.", + "description": "Encode a prompt for FLUX.2 [dev] using its Mistral Small 3.1 text encoder.", "node_pack": "invokeai", "properties": { "id": { @@ -25160,25 +25221,25 @@ "title": "Prompt", "ui_component": "textarea" }, - "qwen3_encoder": { + "mistral_encoder": { "anyOf": [ { - "$ref": "#/components/schemas/Qwen3EncoderField" + "$ref": "#/components/schemas/MistralEncoderField" }, { "type": "null" } ], "default": null, - "description": "Qwen3 tokenizer and text encoder", + "description": "Mistral tokenizer/processor and text encoder", "field_kind": "input", "input": "connection", "orig_required": true, - "title": "Qwen3 Encoder" + "title": "Mistral Encoder" }, "max_seq_len": { "default": 512, - "description": "Max sequence length for the Qwen3 encoder.", + "description": "Max sequence length for the Mistral encoder.", "enum": [256, 512], "field_kind": "input", "input": "any", @@ -25204,61 +25265,136 @@ "orig_required": false }, "type": { - "const": "flux2_klein_text_encoder", - "default": "flux2_klein_text_encoder", + "const": "flux2_dev_text_encoder", + "default": "flux2_dev_text_encoder", "field_kind": "node_attribute", "title": "type", "type": "string" } }, "required": ["type", "id"], - "tags": ["prompt", "conditioning", "flux", "klein", "qwen3"], - "title": "Prompt - Flux2 Klein", + "tags": ["prompt", "conditioning", "flux", "flux2", "dev", "mistral"], + "title": "Prompt - FLUX.2 [dev]", "type": "object", - "version": "1.1.1", + "version": "1.0.0", "output": { "$ref": "#/components/schemas/FluxConditioningOutput" } }, - "Flux2VaeDecodeInvocation": { - "category": "latents", + "Flux2KleinLoRACollectionLoader": { + "category": "model", "class": "invocation", "classification": "prototype", - "description": "Generates an image from latents using FLUX.2 Klein's 32-channel VAE.", + "description": "Applies a collection of LoRAs to a FLUX.2 Klein transformer and/or Qwen3 text encoder.", "node_pack": "invokeai", "properties": { - "board": { + "id": { + "description": "The id of this instance of an invocation. Must be unique among all instances of invocations.", + "field_kind": "node_attribute", + "title": "Id", + "type": "string" + }, + "is_intermediate": { + "default": false, + "description": "Whether or not this is an intermediate invocation.", + "field_kind": "node_attribute", + "input": "direct", + "orig_required": true, + "title": "Is Intermediate", + "type": "boolean", + "ui_hidden": false, + "ui_type": "IsIntermediate" + }, + "use_cache": { + "default": true, + "description": "Whether or not to use the cache", + "field_kind": "node_attribute", + "title": "Use Cache", + "type": "boolean" + }, + "loras": { "anyOf": [ { - "$ref": "#/components/schemas/BoardField" + "$ref": "#/components/schemas/LoRAField" + }, + { + "items": { + "$ref": "#/components/schemas/LoRAField" + }, + "type": "array" }, { "type": "null" } ], "default": null, - "description": "The board to save the image to", - "field_kind": "internal", - "input": "direct", + "description": "LoRA models and weights. May be a single LoRA or collection.", + "field_kind": "input", + "input": "any", + "orig_default": null, "orig_required": false, - "ui_hidden": false + "title": "LoRAs", + "ui_model_base": ["flux2"], + "ui_model_type": ["lora"] }, - "metadata": { + "transformer": { "anyOf": [ { - "$ref": "#/components/schemas/MetadataField" + "$ref": "#/components/schemas/TransformerField" }, { "type": "null" } ], "default": null, - "description": "Optional metadata to be saved with the image", - "field_kind": "internal", + "description": "Transformer", + "field_kind": "input", "input": "connection", + "orig_default": null, "orig_required": false, - "ui_hidden": false + "title": "Transformer" + }, + "qwen3_encoder": { + "anyOf": [ + { + "$ref": "#/components/schemas/Qwen3EncoderField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Qwen3 tokenizer and text encoder", + "field_kind": "input", + "input": "connection", + "orig_default": null, + "orig_required": false, + "title": "Qwen3 Encoder" }, + "type": { + "const": "flux2_klein_lora_collection_loader", + "default": "flux2_klein_lora_collection_loader", + "field_kind": "node_attribute", + "title": "type", + "type": "string" + } + }, + "required": ["type", "id"], + "tags": ["lora", "model", "flux", "klein", "flux2"], + "title": "Apply LoRA Collection - Flux2 Klein", + "type": "object", + "version": "1.0.1", + "output": { + "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" + } + }, + "Flux2KleinLoRALoaderInvocation": { + "category": "model", + "class": "invocation", + "classification": "prototype", + "description": "Apply a LoRA model to a FLUX.2 Klein transformer and/or Qwen3 text encoder.", + "node_pack": "invokeai", + "properties": { "id": { "description": "The id of this instance of an invocation. Must be unique among all instances of invocations.", "field_kind": "node_attribute", @@ -25283,58 +25419,525 @@ "title": "Use Cache", "type": "boolean" }, - "latents": { + "lora": { "anyOf": [ { - "$ref": "#/components/schemas/LatentsField" + "$ref": "#/components/schemas/ModelIdentifierField" }, { "type": "null" } ], "default": null, - "description": "Latents tensor", + "description": "LoRA model to load", + "field_kind": "input", + "input": "any", + "orig_required": true, + "title": "LoRA", + "ui_model_base": ["flux2"], + "ui_model_type": ["lora"] + }, + "weight": { + "default": 0.75, + "description": "The weight at which the LoRA is applied to each model", + "field_kind": "input", + "input": "any", + "orig_default": 0.75, + "orig_required": false, + "title": "Weight", + "type": "number" + }, + "transformer": { + "anyOf": [ + { + "$ref": "#/components/schemas/TransformerField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Transformer", "field_kind": "input", "input": "connection", - "orig_required": true + "orig_default": null, + "orig_required": false, + "title": "Transformer" }, - "vae": { + "qwen3_encoder": { "anyOf": [ { - "$ref": "#/components/schemas/VAEField" + "$ref": "#/components/schemas/Qwen3EncoderField" }, { "type": "null" } ], "default": null, - "description": "VAE", + "description": "Qwen3 tokenizer and text encoder", "field_kind": "input", "input": "connection", - "orig_required": true + "orig_default": null, + "orig_required": false, + "title": "Qwen3 Encoder" }, "type": { - "const": "flux2_vae_decode", - "default": "flux2_vae_decode", + "const": "flux2_klein_lora_loader", + "default": "flux2_klein_lora_loader", "field_kind": "node_attribute", "title": "type", "type": "string" } }, "required": ["type", "id"], - "tags": ["latents", "image", "vae", "l2i", "flux2", "klein"], - "title": "Latents to Image - FLUX2", + "tags": ["lora", "model", "flux", "klein", "flux2"], + "title": "Apply LoRA - Flux2 Klein", "type": "object", "version": "1.0.0", "output": { - "$ref": "#/components/schemas/ImageOutput" + "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" } }, - "Flux2VaeEncodeInvocation": { - "category": "latents", + "Flux2KleinLoRALoaderOutput": { + "class": "output", + "description": "FLUX.2 Klein LoRA Loader Output", + "properties": { + "transformer": { + "anyOf": [ + { + "$ref": "#/components/schemas/TransformerField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Transformer", + "field_kind": "output", + "title": "Transformer", + "ui_hidden": false + }, + "qwen3_encoder": { + "anyOf": [ + { + "$ref": "#/components/schemas/Qwen3EncoderField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Qwen3 tokenizer and text encoder", + "field_kind": "output", + "title": "Qwen3 Encoder", + "ui_hidden": false + }, + "type": { + "const": "flux2_klein_lora_loader_output", + "default": "flux2_klein_lora_loader_output", + "field_kind": "node_attribute", + "title": "type", + "type": "string" + } + }, + "required": ["output_meta", "transformer", "qwen3_encoder", "type", "type"], + "title": "Flux2KleinLoRALoaderOutput", + "type": "object" + }, + "Flux2KleinModelLoaderInvocation": { + "category": "model", "class": "invocation", "classification": "prototype", - "description": "Encodes an image into latents using FLUX.2 Klein's 32-channel VAE.", + "description": "Loads a Flux2 Klein model, outputting its submodels.\n\nFlux2 Klein uses Qwen3 as the text encoder instead of CLIP+T5.\nIt uses a 32-channel VAE (AutoencoderKLFlux2) instead of the 16-channel FLUX.1 VAE.\n\nWhen using a Diffusers format model, both VAE and Qwen3 encoder are extracted\nautomatically from the main model. You can override with standalone models:\n- Transformer: Always from Flux2 Klein main model\n- VAE: From main model (Diffusers) or standalone VAE\n- Qwen3 Encoder: From main model (Diffusers) or standalone Qwen3 model", + "node_pack": "invokeai", + "properties": { + "id": { + "description": "The id of this instance of an invocation. Must be unique among all instances of invocations.", + "field_kind": "node_attribute", + "title": "Id", + "type": "string" + }, + "is_intermediate": { + "default": false, + "description": "Whether or not this is an intermediate invocation.", + "field_kind": "node_attribute", + "input": "direct", + "orig_required": true, + "title": "Is Intermediate", + "type": "boolean", + "ui_hidden": false, + "ui_type": "IsIntermediate" + }, + "use_cache": { + "default": true, + "description": "Whether or not to use the cache", + "field_kind": "node_attribute", + "title": "Use Cache", + "type": "boolean" + }, + "model": { + "$ref": "#/components/schemas/ModelIdentifierField", + "description": "Flux model (Transformer) to load", + "field_kind": "input", + "input": "direct", + "orig_required": true, + "title": "Transformer", + "ui_model_base": ["flux2"], + "ui_model_type": ["main"] + }, + "vae_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelIdentifierField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standalone VAE model. Flux2 Klein uses the same VAE as FLUX (16-channel). If not provided, VAE will be loaded from the Qwen3 Source model.", + "field_kind": "input", + "input": "direct", + "orig_default": null, + "orig_required": false, + "title": "VAE", + "ui_model_base": ["flux", "flux2"], + "ui_model_type": ["vae"] + }, + "qwen3_encoder_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelIdentifierField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standalone Qwen3 Encoder model. If not provided, encoder will be loaded from the Qwen3 Source model.", + "field_kind": "input", + "input": "direct", + "orig_default": null, + "orig_required": false, + "title": "Qwen3 Encoder", + "ui_model_type": ["qwen3_encoder"] + }, + "qwen3_source_model": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelIdentifierField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Diffusers Flux2 Klein model to extract VAE and/or Qwen3 encoder from. Use this if you don't have separate VAE/Qwen3 models. Ignored if both VAE and Qwen3 Encoder are provided separately.", + "field_kind": "input", + "input": "direct", + "orig_default": null, + "orig_required": false, + "title": "Qwen3 Source (Diffusers)", + "ui_model_base": ["flux2"], + "ui_model_format": ["diffusers"], + "ui_model_type": ["main"] + }, + "max_seq_len": { + "default": 512, + "description": "Max sequence length for the Qwen3 encoder.", + "enum": [256, 512], + "field_kind": "input", + "input": "any", + "orig_default": 512, + "orig_required": false, + "title": "Max Seq Length", + "type": "integer" + }, + "type": { + "const": "flux2_klein_model_loader", + "default": "flux2_klein_model_loader", + "field_kind": "node_attribute", + "title": "type", + "type": "string" + } + }, + "required": ["model", "type", "id"], + "tags": ["model", "flux", "klein", "qwen3"], + "title": "Main Model - Flux2 Klein", + "type": "object", + "version": "1.0.0", + "output": { + "$ref": "#/components/schemas/Flux2KleinModelLoaderOutput" + } + }, + "Flux2KleinModelLoaderOutput": { + "class": "output", + "description": "Flux2 Klein model loader output.", + "properties": { + "transformer": { + "$ref": "#/components/schemas/TransformerField", + "description": "Transformer", + "field_kind": "output", + "title": "Transformer", + "ui_hidden": false + }, + "qwen3_encoder": { + "$ref": "#/components/schemas/Qwen3EncoderField", + "description": "Qwen3 tokenizer and text encoder", + "field_kind": "output", + "title": "Qwen3 Encoder", + "ui_hidden": false + }, + "vae": { + "$ref": "#/components/schemas/VAEField", + "description": "VAE", + "field_kind": "output", + "title": "VAE", + "ui_hidden": false + }, + "max_seq_len": { + "description": "The max sequence length for the Qwen3 encoder.", + "enum": [256, 512], + "field_kind": "output", + "title": "Max Seq Length", + "type": "integer", + "ui_hidden": false + }, + "type": { + "const": "flux2_klein_model_loader_output", + "default": "flux2_klein_model_loader_output", + "field_kind": "node_attribute", + "title": "type", + "type": "string" + } + }, + "required": ["output_meta", "transformer", "qwen3_encoder", "vae", "max_seq_len", "type", "type"], + "title": "Flux2KleinModelLoaderOutput", + "type": "object" + }, + "Flux2KleinTextEncoderInvocation": { + "category": "prompt", + "class": "invocation", + "classification": "prototype", + "description": "Encodes and preps a prompt for Flux2 Klein image generation.\n\nFlux2 Klein uses Qwen3 as the text encoder, extracting hidden states from\nlayers (9, 18, 27) and stacking them for richer text representations.\nThis matches the diffusers Flux2KleinPipeline implementation exactly.", + "node_pack": "invokeai", + "properties": { + "id": { + "description": "The id of this instance of an invocation. Must be unique among all instances of invocations.", + "field_kind": "node_attribute", + "title": "Id", + "type": "string" + }, + "is_intermediate": { + "default": false, + "description": "Whether or not this is an intermediate invocation.", + "field_kind": "node_attribute", + "input": "direct", + "orig_required": true, + "title": "Is Intermediate", + "type": "boolean", + "ui_hidden": false, + "ui_type": "IsIntermediate" + }, + "use_cache": { + "default": true, + "description": "Whether or not to use the cache", + "field_kind": "node_attribute", + "title": "Use Cache", + "type": "boolean" + }, + "prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Text prompt to encode.", + "field_kind": "input", + "input": "any", + "orig_required": true, + "title": "Prompt", + "ui_component": "textarea" + }, + "qwen3_encoder": { + "anyOf": [ + { + "$ref": "#/components/schemas/Qwen3EncoderField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Qwen3 tokenizer and text encoder", + "field_kind": "input", + "input": "connection", + "orig_required": true, + "title": "Qwen3 Encoder" + }, + "max_seq_len": { + "default": 512, + "description": "Max sequence length for the Qwen3 encoder.", + "enum": [256, 512], + "field_kind": "input", + "input": "any", + "orig_default": 512, + "orig_required": false, + "title": "Max Seq Len", + "type": "integer" + }, + "mask": { + "anyOf": [ + { + "$ref": "#/components/schemas/TensorField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A mask defining the region that this conditioning prompt applies to.", + "field_kind": "input", + "input": "any", + "orig_default": null, + "orig_required": false + }, + "type": { + "const": "flux2_klein_text_encoder", + "default": "flux2_klein_text_encoder", + "field_kind": "node_attribute", + "title": "type", + "type": "string" + } + }, + "required": ["type", "id"], + "tags": ["prompt", "conditioning", "flux", "klein", "qwen3"], + "title": "Prompt - Flux2 Klein", + "type": "object", + "version": "1.1.1", + "output": { + "$ref": "#/components/schemas/FluxConditioningOutput" + } + }, + "Flux2VaeDecodeInvocation": { + "category": "latents", + "class": "invocation", + "classification": "prototype", + "description": "Generates an image from latents using FLUX.2 Klein's 32-channel VAE.", + "node_pack": "invokeai", + "properties": { + "board": { + "anyOf": [ + { + "$ref": "#/components/schemas/BoardField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The board to save the image to", + "field_kind": "internal", + "input": "direct", + "orig_required": false, + "ui_hidden": false + }, + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/MetadataField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional metadata to be saved with the image", + "field_kind": "internal", + "input": "connection", + "orig_required": false, + "ui_hidden": false + }, + "id": { + "description": "The id of this instance of an invocation. Must be unique among all instances of invocations.", + "field_kind": "node_attribute", + "title": "Id", + "type": "string" + }, + "is_intermediate": { + "default": false, + "description": "Whether or not this is an intermediate invocation.", + "field_kind": "node_attribute", + "input": "direct", + "orig_required": true, + "title": "Is Intermediate", + "type": "boolean", + "ui_hidden": false, + "ui_type": "IsIntermediate" + }, + "use_cache": { + "default": true, + "description": "Whether or not to use the cache", + "field_kind": "node_attribute", + "title": "Use Cache", + "type": "boolean" + }, + "latents": { + "anyOf": [ + { + "$ref": "#/components/schemas/LatentsField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Latents tensor", + "field_kind": "input", + "input": "connection", + "orig_required": true + }, + "vae": { + "anyOf": [ + { + "$ref": "#/components/schemas/VAEField" + }, + { + "type": "null" + } + ], + "default": null, + "description": "VAE", + "field_kind": "input", + "input": "connection", + "orig_required": true + }, + "type": { + "const": "flux2_vae_decode", + "default": "flux2_vae_decode", + "field_kind": "node_attribute", + "title": "type", + "type": "string" + } + }, + "required": ["type", "id"], + "tags": ["latents", "image", "vae", "l2i", "flux2", "klein"], + "title": "Latents to Image - FLUX2", + "type": "object", + "version": "1.0.0", + "output": { + "$ref": "#/components/schemas/ImageOutput" + } + }, + "Flux2VaeEncodeInvocation": { + "category": "latents", + "class": "invocation", + "classification": "prototype", + "description": "Encodes an image into latents using FLUX.2 Klein's 32-channel VAE.", "node_pack": "invokeai", "properties": { "id": { @@ -25410,7 +26013,7 @@ }, "Flux2VariantType": { "type": "string", - "enum": ["klein_4b", "klein_4b_base", "klein_9b", "klein_9b_base"], + "enum": ["klein_4b", "klein_4b_base", "klein_9b", "klein_9b_base", "dev"], "title": "Flux2VariantType", "description": "FLUX.2 model variants." }, @@ -28989,6 +29592,18 @@ { "$ref": "#/components/schemas/Flux2DenoiseInvocation" }, + { + "$ref": "#/components/schemas/Flux2DevLoRACollectionLoader" + }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevTextEncoderInvocation" + }, { "$ref": "#/components/schemas/Flux2KleinLoRACollectionLoader" }, @@ -29685,6 +30300,12 @@ { "$ref": "#/components/schemas/FloatOutput" }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderOutput" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderOutput" + }, { "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" }, @@ -36685,6 +37306,18 @@ { "$ref": "#/components/schemas/Flux2DenoiseInvocation" }, + { + "$ref": "#/components/schemas/Flux2DevLoRACollectionLoader" + }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevTextEncoderInvocation" + }, { "$ref": "#/components/schemas/Flux2KleinLoRACollectionLoader" }, @@ -37338,6 +37971,12 @@ { "$ref": "#/components/schemas/FloatOutput" }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderOutput" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderOutput" + }, { "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" }, @@ -37835,6 +38474,18 @@ { "$ref": "#/components/schemas/Flux2DenoiseInvocation" }, + { + "$ref": "#/components/schemas/Flux2DevLoRACollectionLoader" + }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevTextEncoderInvocation" + }, { "$ref": "#/components/schemas/Flux2KleinLoRACollectionLoader" }, @@ -38645,6 +39296,18 @@ "flux2_denoise": { "$ref": "#/components/schemas/LatentsOutput" }, + "flux2_dev_lora_collection_loader": { + "$ref": "#/components/schemas/Flux2DevLoRALoaderOutput" + }, + "flux2_dev_lora_loader": { + "$ref": "#/components/schemas/Flux2DevLoRALoaderOutput" + }, + "flux2_dev_model_loader": { + "$ref": "#/components/schemas/Flux2DevModelLoaderOutput" + }, + "flux2_dev_text_encoder": { + "$ref": "#/components/schemas/FluxConditioningOutput" + }, "flux2_klein_lora_collection_loader": { "$ref": "#/components/schemas/Flux2KleinLoRALoaderOutput" }, @@ -39294,6 +39957,10 @@ "float_range", "float_to_int", "flux2_denoise", + "flux2_dev_lora_collection_loader", + "flux2_dev_lora_loader", + "flux2_dev_model_loader", + "flux2_dev_text_encoder", "flux2_klein_lora_collection_loader", "flux2_klein_lora_loader", "flux2_klein_model_loader", @@ -39760,6 +40427,18 @@ { "$ref": "#/components/schemas/Flux2DenoiseInvocation" }, + { + "$ref": "#/components/schemas/Flux2DevLoRACollectionLoader" + }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevTextEncoderInvocation" + }, { "$ref": "#/components/schemas/Flux2KleinLoRACollectionLoader" }, @@ -40659,6 +41338,18 @@ { "$ref": "#/components/schemas/Flux2DenoiseInvocation" }, + { + "$ref": "#/components/schemas/Flux2DevLoRACollectionLoader" + }, + { + "$ref": "#/components/schemas/Flux2DevLoRALoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevModelLoaderInvocation" + }, + { + "$ref": "#/components/schemas/Flux2DevTextEncoderInvocation" + }, { "$ref": "#/components/schemas/Flux2KleinLoRACollectionLoader" }, @@ -49729,7 +50420,7 @@ "variant" ], "title": "Main_Diffusers_Flux2_Config", - "description": "Model config for FLUX.2 models in diffusers format (e.g. FLUX.2 Klein)." + "description": "Model config for FLUX.2 models in diffusers format (FLUX.2 Klein and FLUX.2 [dev])." }, "Main_Diffusers_QwenImage_Config": { "properties": { @@ -55070,6 +55761,485 @@ "$ref": "#/components/schemas/VAEOutput" } }, + "MistralEncoderField": { + "description": "Field for the Mistral text encoder used by FLUX.2 [dev].\n\nThe \"tokenizer\" submodel actually points to the multimodal processor (AutoProcessor /\nMistral3Processor), which wraps the tokenizer plus the chat template needed by FLUX.2.", + "properties": { + "tokenizer": { + "$ref": "#/components/schemas/ModelIdentifierField", + "description": "Info to load tokenizer / processor submodel" + }, + "text_encoder": { + "$ref": "#/components/schemas/ModelIdentifierField", + "description": "Info to load text_encoder submodel" + }, + "loras": { + "description": "LoRAs to apply on model loading", + "items": { + "$ref": "#/components/schemas/LoRAField" + }, + "title": "Loras", + "type": "array" + } + }, + "required": ["tokenizer", "text_encoder"], + "title": "MistralEncoderField", + "type": "object" + }, + "MistralEncoder_Checkpoint_Config": { + "properties": { + "key": { + "type": "string", + "title": "Key", + "description": "A unique key for this model." + }, + "hash": { + "type": "string", + "title": "Hash", + "description": "The hash of the model file(s)." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Path to the model on the filesystem. Relative paths are relative to the Invoke root directory." + }, + "file_size": { + "type": "integer", + "title": "File Size", + "description": "The size of the model in bytes." + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the model." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Model description" + }, + "source": { + "type": "string", + "title": "Source", + "description": "The original source of the model (path, URL or repo_id)." + }, + "source_type": { + "$ref": "#/components/schemas/ModelSourceType", + "description": "The type of source" + }, + "source_api_response": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Api Response", + "description": "The original API response from the source, as stringified JSON." + }, + "source_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Url", + "description": "Optional URL for the model (e.g. download page or model page)." + }, + "cover_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cover Image", + "description": "Url for image to preview model" + }, + "config_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Config Path", + "description": "Path to the config for this model, if any." + }, + "base": { + "type": "string", + "const": "any", + "title": "Base", + "default": "any" + }, + "type": { + "type": "string", + "const": "mistral_encoder", + "title": "Type", + "default": "mistral_encoder" + }, + "format": { + "type": "string", + "const": "checkpoint", + "title": "Format", + "default": "checkpoint" + }, + "cpu_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Cpu Only", + "description": "Whether this model should run on CPU only" + }, + "variant": { + "$ref": "#/components/schemas/MistralVariantType", + "description": "Mistral text encoder variant" + } + }, + "type": "object", + "required": [ + "key", + "hash", + "path", + "file_size", + "name", + "description", + "source", + "source_type", + "source_api_response", + "source_url", + "cover_image", + "config_path", + "base", + "type", + "format", + "cpu_only", + "variant" + ], + "title": "MistralEncoder_Checkpoint_Config", + "description": "Configuration for a single-file Mistral text encoder (safetensors).\n\nAccepts both 30-layer cow (Comfy-Org bf16/fp8/fp4) and 40-layer Mistral Small 3\n(BFL canonical / upstream Mistral 3.x single-files). The loader uses the\ndetected variant to decide whether to keep or strip the final RMSNorm." + }, + "MistralEncoder_Diffusers_Config": { + "properties": { + "key": { + "type": "string", + "title": "Key", + "description": "A unique key for this model." + }, + "hash": { + "type": "string", + "title": "Hash", + "description": "The hash of the model file(s)." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Path to the model on the filesystem. Relative paths are relative to the Invoke root directory." + }, + "file_size": { + "type": "integer", + "title": "File Size", + "description": "The size of the model in bytes." + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the model." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Model description" + }, + "source": { + "type": "string", + "title": "Source", + "description": "The original source of the model (path, URL or repo_id)." + }, + "source_type": { + "$ref": "#/components/schemas/ModelSourceType", + "description": "The type of source" + }, + "source_api_response": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Api Response", + "description": "The original API response from the source, as stringified JSON." + }, + "source_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Url", + "description": "Optional URL for the model (e.g. download page or model page)." + }, + "cover_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cover Image", + "description": "Url for image to preview model" + }, + "base": { + "type": "string", + "const": "any", + "title": "Base", + "default": "any" + }, + "type": { + "type": "string", + "const": "mistral_encoder", + "title": "Type", + "default": "mistral_encoder" + }, + "format": { + "type": "string", + "const": "mistral_encoder", + "title": "Format", + "default": "mistral_encoder" + }, + "cpu_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Cpu Only", + "description": "Whether this model should run on CPU only" + }, + "variant": { + "$ref": "#/components/schemas/MistralVariantType", + "description": "Mistral text encoder variant" + } + }, + "type": "object", + "required": [ + "key", + "hash", + "path", + "file_size", + "name", + "description", + "source", + "source_type", + "source_api_response", + "source_url", + "cover_image", + "base", + "type", + "format", + "cpu_only", + "variant" + ], + "title": "MistralEncoder_Diffusers_Config", + "description": "Configuration for a Mistral text encoder in HuggingFace transformers/diffusers folder layout.\n\nMatches:\n- Full pipelines downloaded as just the `text_encoder/` subfolder\n (e.g. `black-forest-labs/FLUX.2-dev/text_encoder/`)\n- Quantized variants such as `diffusers/FLUX.2-dev-bnb-4bit/text_encoder/`\n\nDoes NOT match a full FLUX.2 pipeline directory \u2014 those are picked up by the\n`Main_Diffusers_Flux2_Config` instead.\n\nAccepts both:\n- 30-layer \"cow\" distillation (recommended, produces the cleanest output)\n- 40-layer Mistral Small 3 (BFL canonical / upstream Mistral 3.x \u2014 also works,\n slightly weaker prompt adherence than cow in our tests)\n\nThe variant field records which one was probed so the loader can decide\nwhether to keep the final RMSNorm (40-layer) or strip it (30-layer cow)." + }, + "MistralEncoder_GGUF_Config": { + "properties": { + "key": { + "type": "string", + "title": "Key", + "description": "A unique key for this model." + }, + "hash": { + "type": "string", + "title": "Hash", + "description": "The hash of the model file(s)." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Path to the model on the filesystem. Relative paths are relative to the Invoke root directory." + }, + "file_size": { + "type": "integer", + "title": "File Size", + "description": "The size of the model in bytes." + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the model." + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Model description" + }, + "source": { + "type": "string", + "title": "Source", + "description": "The original source of the model (path, URL or repo_id)." + }, + "source_type": { + "$ref": "#/components/schemas/ModelSourceType", + "description": "The type of source" + }, + "source_api_response": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Api Response", + "description": "The original API response from the source, as stringified JSON." + }, + "source_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source Url", + "description": "Optional URL for the model (e.g. download page or model page)." + }, + "cover_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cover Image", + "description": "Url for image to preview model" + }, + "config_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Config Path", + "description": "Path to the config for this model, if any." + }, + "base": { + "type": "string", + "const": "any", + "title": "Base", + "default": "any" + }, + "type": { + "type": "string", + "const": "mistral_encoder", + "title": "Type", + "default": "mistral_encoder" + }, + "format": { + "type": "string", + "const": "gguf_quantized", + "title": "Format", + "default": "gguf_quantized" + }, + "cpu_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Cpu Only", + "description": "Whether this model should run on CPU only" + }, + "variant": { + "$ref": "#/components/schemas/MistralVariantType", + "description": "Mistral text encoder variant" + } + }, + "type": "object", + "required": [ + "key", + "hash", + "path", + "file_size", + "name", + "description", + "source", + "source_type", + "source_api_response", + "source_url", + "cover_image", + "config_path", + "base", + "type", + "format", + "cpu_only", + "variant" + ], + "title": "MistralEncoder_GGUF_Config", + "description": "Configuration for a GGUF-quantized Mistral text encoder.\n\nAccepts both 30-layer cow GGUFs and 40-layer Mistral Small 3 GGUFs \u2014 see\n``MistralEncoder_Checkpoint_Config`` for variant handling." + }, + "MistralVariantType": { + "type": "string", + "enum": ["cow_mistral3_small", "mistral3_24b"], + "title": "MistralVariantType", + "description": "Mistral text encoder variants used by FLUX.2 [dev]." + }, "ModelFormat": { "type": "string", "enum": [ @@ -55085,6 +56255,7 @@ "t5_encoder", "qwen3_encoder", "qwen_vl_encoder", + "mistral_encoder", "bnb_quantized_int8b", "bnb_quantized_nf4b", "gguf_quantized", @@ -55523,6 +56694,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -56095,6 +57275,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -56553,311 +57742,329 @@ "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, { - "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_File_SDXL_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD1_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SD2_Config" - }, - { - "$ref": "#/components/schemas/TI_Folder_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" - }, - { - "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" - }, - { - "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/SigLIP_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/TextLLM_Diffusers_Config" - }, - { - "$ref": "#/components/schemas/ExternalApiModelConfig" - }, - { - "$ref": "#/components/schemas/Unknown_Config" - } - ], - "title": "Config" - }, - "submodel_type": { - "anyOf": [ - { - "$ref": "#/components/schemas/SubModelType" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The submodel type, if any" - } - }, - "required": ["timestamp", "config", "submodel_type"], - "title": "ModelLoadCompleteEvent", - "type": "object" - }, - "ModelLoadStartedEvent": { - "description": "Event model for model_load_started", - "properties": { - "timestamp": { - "description": "The timestamp of the event", - "title": "Timestamp", - "type": "integer" - }, - "config": { - "description": "The model's config", - "oneOf": [ - { - "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, + { + "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/QwenVLEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/TI_File_SD1_Config" + }, + { + "$ref": "#/components/schemas/TI_File_SD2_Config" + }, + { + "$ref": "#/components/schemas/TI_File_SDXL_Config" + }, + { + "$ref": "#/components/schemas/TI_Folder_SD1_Config" + }, + { + "$ref": "#/components/schemas/TI_Folder_SD2_Config" + }, + { + "$ref": "#/components/schemas/TI_Folder_SDXL_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD1_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_InvokeAI_SD2_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_InvokeAI_SDXL_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD1_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_Checkpoint_SD2_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_Checkpoint_SDXL_Config" + }, + { + "$ref": "#/components/schemas/IPAdapter_Checkpoint_FLUX_Config" + }, + { + "$ref": "#/components/schemas/T2IAdapter_Diffusers_SD1_Config" + }, + { + "$ref": "#/components/schemas/T2IAdapter_Diffusers_SDXL_Config" + }, + { + "$ref": "#/components/schemas/Spandrel_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/CLIPEmbed_Diffusers_G_Config" + }, + { + "$ref": "#/components/schemas/CLIPEmbed_Diffusers_L_Config" + }, + { + "$ref": "#/components/schemas/CLIPVision_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/SigLIP_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/FLUXRedux_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/LlavaOnevision_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/TextLLM_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/ExternalApiModelConfig" + }, + { + "$ref": "#/components/schemas/Unknown_Config" + } + ], + "title": "Config" + }, + "submodel_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/SubModelType" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The submodel type, if any" + } + }, + "required": ["timestamp", "config", "submodel_type"], + "title": "ModelLoadCompleteEvent", + "type": "object" + }, + "ModelLoadStartedEvent": { + "description": "Event model for model_load_started", + "properties": { + "timestamp": { + "description": "The timestamp of the event", + "title": "Timestamp", + "type": "integer" + }, + "config": { + "description": "The model's config", + "oneOf": [ + { + "$ref": "#/components/schemas/Main_Diffusers_SD1_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_SD2_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" + }, + { + "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" + }, + { + "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" + }, + { + "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" + }, + { + "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" + }, + { + "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" + }, + { + "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" + }, + { + "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" + }, + { + "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" + }, + { + "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" + }, + { + "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" + }, + { + "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" + }, + { + "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" + }, + { + "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" + }, + { + "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" + }, + { + "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" + }, + { + "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" + }, + { + "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" + }, + { + "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" + }, + { + "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" + }, + { + "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" + }, + { + "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" + }, + { + "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" + }, + { + "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" + }, + { + "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" + }, + { + "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" + }, + { + "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" }, { - "$ref": "#/components/schemas/Main_Diffusers_SDXL_Config" + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" }, { - "$ref": "#/components/schemas/Main_Diffusers_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_SD3_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_CogView4_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_SDXLRefiner_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/Main_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/Main_BnBNF4_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_Flux2_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_FLUX_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/Main_GGUF_ZImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Flux2_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/VAE_Checkpoint_Anima_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/VAE_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_FLUX_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Checkpoint_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/ControlNet_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_ZImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_QwenImage_Config" - }, - { - "$ref": "#/components/schemas/LoRA_LyCORIS_Anima_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_OMI_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD1_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SD2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_SDXL_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_Flux2_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_FLUX_Config" - }, - { - "$ref": "#/components/schemas/LoRA_Diffusers_ZImage_Config" - }, - { - "$ref": "#/components/schemas/ControlLoRA_LyCORIS_FLUX_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_T5Encoder_Config" - }, - { - "$ref": "#/components/schemas/T5Encoder_BnBLLMint8_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Qwen3Encoder_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_Checkpoint_Config" - }, - { - "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" @@ -57259,6 +58466,9 @@ { "$ref": "#/components/schemas/Qwen3VariantType" }, + { + "$ref": "#/components/schemas/MistralVariantType" + }, { "type": "null" } @@ -57398,6 +58608,7 @@ "t5_encoder", "qwen3_encoder", "qwen_vl_encoder", + "mistral_encoder", "spandrel_image_to_image", "siglip", "flux_redux", @@ -57615,6 +58826,15 @@ { "$ref": "#/components/schemas/Qwen3Encoder_GGUF_Config" }, + { + "$ref": "#/components/schemas/MistralEncoder_Diffusers_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_Checkpoint_Config" + }, + { + "$ref": "#/components/schemas/MistralEncoder_GGUF_Config" + }, { "$ref": "#/components/schemas/QwenVLEncoder_Diffusers_Config" }, @@ -66859,6 +68079,9 @@ { "$ref": "#/components/schemas/Qwen3VariantType" }, + { + "$ref": "#/components/schemas/MistralVariantType" + }, { "type": "null" } @@ -67019,6 +68242,9 @@ { "$ref": "#/components/schemas/Qwen3VariantType" }, + { + "$ref": "#/components/schemas/MistralVariantType" + }, { "type": "null" } @@ -67951,6 +69177,9 @@ { "$ref": "#/components/schemas/Qwen3VariantType" }, + { + "$ref": "#/components/schemas/MistralVariantType" + }, { "type": "null" } From 59e6d297c6cddd42ffc43769385a07e713791df0 Mon Sep 17 00:00:00 2001 From: Alexander Eichhorn Date: Fri, 10 Jul 2026 03:19:12 +0200 Subject: [PATCH 8/8] Chore Ruff --- .../model_manager/load/model_loaders/mistral_encoder.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py index c91dd6b3bcf..de39368a954 100644 --- a/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py +++ b/invokeai/backend/model_manager/load/model_loaders/mistral_encoder.py @@ -392,9 +392,7 @@ def __call__( **_kwargs: Any, ) -> dict[str, torch.Tensor]: if return_tensors != "pt": - raise NotImplementedError( - "_TekkenRawTextAdapter only supports return_tensors='pt' " f"(got {return_tensors})" - ) + raise NotImplementedError(f"_TekkenRawTextAdapter only supports return_tensors='pt' (got {return_tensors})") tokens = self._encode(text) if truncation and len(tokens) > max_length: