Skip to content

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

fix(web): register LTX-2 in the legacy schema and regenerate the API artifacts

Lincoln Stein1f74c75fef93
diff --git a/invokeai/frontend/web/openapi.json b/invokeai/frontend/web/openapi.json
index a51baa7f6e..115b85db81 100644
--- a/invokeai/frontend/web/openapi.json
+++ b/invokeai/frontend/web/openapi.json
@@ -66578,7 +66578,7 @@
"components_only"
],
"title": "Main_Diffusers_LTX2_Config",
- "description": "An LTX-2 folder of per-component single files in the official key layout.\n\nThis is how LTX-2.5 is distributed (``Lightricks/LTX-2.5`` and the ``DeepBeepMeep/LTX-2`` mirror):\none safetensors per component rather than a diffusers ``model_index.json`` tree. The folder is\nthe *component source* of a generation -- video VAE, audio VAE, vocoder, text projection, the two\ntext connectors and the latent upsamplers -- while the 22B transformer normally comes from a\nsingle-file record selected in the model loader (bf16, int8-convrot or nvfp4). A folder that\nalso holds a transformer file is a full install.\n\n``components`` maps each role (see ``invokeai.backend.ltx2.checkpoint_layout``) to the file in the\nfolder that carries it, so the loader never re-classifies at generation time."
+ "description": "An LTX-2 folder of per-component single files in the official key layout.\n\nThis is how the ``DeepBeepMeep/LTX-2`` mirror distributes LTX-2.5: one safetensors per component\nrather than a diffusers ``model_index.json`` tree. (The official ``Lightricks/LTX-2.5`` files use\nthe same layout for the VAEs, upsamplers and transformer, but keep the connectors inside the\ntransformer file and the text projection inside the text-encoder file; a folder of official files\ntherefore lacks a text-projection component in this version.) The folder is\nthe *component source* of a generation -- video VAE, audio VAE, vocoder, text projection, the two\ntext connectors and the latent upsamplers -- while the 22B transformer normally comes from a\nsingle-file record selected in the model loader (bf16, int8-convrot or nvfp4). A folder that\nalso holds a transformer file is a full install.\n\n``components`` maps each role (see ``invokeai.backend.ltx2.checkpoint_layout``) to the file in the\nfolder that carries it, so the loader never re-classifies at generation time."
},
"Main_Diffusers_MiniMaxH3_Config": {
"properties": {
diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json
index 522b9786ae..eaee3e58ec 100644
--- a/invokeai/frontend/web/public/locales/en.json
+++ b/invokeai/frontend/web/public/locales/en.json
@@ -1404,6 +1404,7 @@
"typePhraseHere": "Type phrase here",
"t5Encoder": "T5 Encoder",
"gemma2Encoder": "Gemma-2 Encoder",
+ "gemma4Encoder": "Gemma-4 Encoder",
"pidDecoder": "PiD Decoder",
"pidMode": "PiD Decode",
"pidModeOff": "Off",
diff --git a/invokeai/frontend/web/src/features/modelManagerV2/models.ts b/invokeai/frontend/web/src/features/modelManagerV2/models.ts
index 226ffd53b7..79fff21bf6 100644
--- a/invokeai/frontend/web/src/features/modelManagerV2/models.ts
+++ b/invokeai/frontend/web/src/features/modelManagerV2/models.ts
@@ -9,6 +9,7 @@ import {
isExternalApiModelConfig,
isFluxReduxModelConfig,
isGemma2EncoderModelConfig,
+ isGemma4EncoderModelConfig,
isIPAdapterModelConfig,
isLLaVAModelConfig,
isLoRAModelConfig,
@@ -110,6 +111,11 @@ const MODEL_CATEGORIES: Record<ModelCategoryType, ModelCategoryData> = {
i18nKey: 'modelManager.gemma2Encoder',
filter: isGemma2EncoderModelConfig,
},
+ gemma4_encoder: {
+ category: 'gemma4_encoder',
+ i18nKey: 'modelManager.gemma4Encoder',
+ filter: isGemma4EncoderModelConfig,
+ },
pid_decoder: {
category: 'pid_decoder',
i18nKey: 'modelManager.pidDecoder',
@@ -200,6 +206,7 @@ export const MODEL_BASE_TO_COLOR: Record<BaseModelType, string> = {
anima: 'invokePurple',
wan: 'cyan',
'minimax-h3': 'yellow',
+ 'ltx-2': 'teal',
unknown: 'red',
};
@@ -226,6 +233,7 @@ export const MODEL_TYPE_TO_LONG_NAME: Record<ModelType, string> = {
qwen3_vl_encoder: 'Qwen3-VL Encoder',
wan_t5_encoder: 'Wan T5 Encoder',
gemma2_encoder: 'Gemma-2 Encoder',
+ gemma4_encoder: 'Gemma-4 Encoder',
clip_embed: 'CLIP Embed',
siglip: 'SigLIP',
flux_redux: 'FLUX Redux',
@@ -258,6 +266,7 @@ export const MODEL_BASE_TO_LONG_NAME: Record<BaseModelType, string> = {
anima: 'Anima',
wan: 'Wan 2.2',
'minimax-h3': 'MiniMax H3',
+ 'ltx-2': 'LTX-2',
unknown: 'Unknown',
};
@@ -283,6 +292,7 @@ export const MODEL_BASE_TO_SHORT_NAME: Record<BaseModelType, string> = {
anima: 'Anima',
wan: 'Wan',
'minimax-h3': 'MiniMax H3',
+ 'ltx-2': 'LTX-2',
unknown: 'Unknown',
};
@@ -307,6 +317,8 @@ export const MODEL_VARIANT_TO_LONG_NAME: Record<AnyModelVariant, string> = {
edit: 'Qwen Image Edit',
fl2va: 'MiniMax H3 FL2VA',
ref2va: 'MiniMax H3 Ref2VA',
+ ltx2_dev: 'LTX-2 Dev',
+ ltx2_distilled: 'LTX-2 Distilled',
t2v_a14b: 'Wan 2.2 T2V A14B',
i2v_a14b: 'Wan 2.2 I2V A14B',
ti2v_5b: 'Wan 2.2 TI2V 5B',
@@ -342,6 +354,7 @@ export const MODEL_FORMAT_TO_LONG_NAME: Record<ModelFormat, string> = {
qwen3_vl_encoder: 'Qwen3-VL Encoder',
wan_t5_encoder: 'Wan T5 Encoder (UMT5-XXL)',
gemma2_encoder: 'Gemma-2 Encoder',
+ gemma4_encoder: 'Gemma-4 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 7b62a728df..e299dbd292 100644
--- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelFormatBadge.tsx
+++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManagerPanel/ModelFormatBadge.tsx
@@ -20,6 +20,7 @@ const FORMAT_NAME_MAP: Record<ModelFormat, string> = {
qwen3_vl_encoder: 'qwen3_vl_encoder',
wan_t5_encoder: 'wan_t5_encoder',
gemma2_encoder: 'gemma2_encoder',
+ gemma4_encoder: 'gemma4_encoder',
bnb_quantized_int8b: 'bnb_quantized_int8b',
bnb_quantized_nf4b: 'quantized',
gguf_quantized: 'gguf',
@@ -46,6 +47,7 @@ const FORMAT_COLOR_MAP: Record<ModelFormat, string> = {
qwen3_vl_encoder: 'base',
wan_t5_encoder: 'base',
gemma2_encoder: 'base',
+ gemma4_encoder: 'base',
bnb_quantized_int8b: 'base',
bnb_quantized_nf4b: 'base',
gguf_quantized: 'base',
diff --git a/invokeai/frontend/web/src/features/nodes/types/common.test-d.ts b/invokeai/frontend/web/src/features/nodes/types/common.test-d.ts
index 373f95f6f5..470bad268d 100644
--- a/invokeai/frontend/web/src/features/nodes/types/common.test-d.ts
+++ b/invokeai/frontend/web/src/features/nodes/types/common.test-d.ts
@@ -15,6 +15,7 @@ import type {
zFlux2VariantType,
zFluxVariantType,
zKrea2VariantType,
+ zLTX2VariantType,
zModelFormat,
zModelVariantType,
zQwen3VariantType,
@@ -55,6 +56,7 @@ describe('Common types', () => {
test('ZImageVariantType', () => assert<Equals<z.infer<typeof zZImageVariantType>, S['ZImageVariantType']>>());
test('Krea2VariantType', () => assert<Equals<z.infer<typeof zKrea2VariantType>, S['Krea2VariantType']>>());
test('Qwen3VariantType', () => assert<Equals<z.infer<typeof zQwen3VariantType>, S['Qwen3VariantType']>>());
+ test('LTX2VariantType', () => assert<Equals<z.infer<typeof zLTX2VariantType>, S['LTX2VariantType']>>());
test('ModelFormat', () => assert<Equals<z.infer<typeof zModelFormat>, S['ModelFormat']>>());
// Misc types
diff --git a/invokeai/frontend/web/src/features/nodes/types/common.ts b/invokeai/frontend/web/src/features/nodes/types/common.ts
index 53e2f8a53f..3c4498b110 100644
--- a/invokeai/frontend/web/src/features/nodes/types/common.ts
+++ b/invokeai/frontend/web/src/features/nodes/types/common.ts
@@ -121,6 +121,7 @@ export const zBaseModelType = z.enum([
'anima',
'wan',
'minimax-h3',
+ 'ltx-2',
'unknown',
]);
export type BaseModelType = z.infer<typeof zBaseModelType>;
@@ -164,6 +165,7 @@ export const zModelType = z.enum([
'qwen3_vl_encoder',
'wan_t5_encoder',
'gemma2_encoder',
+ 'gemma4_encoder',
'clip_embed',
'siglip',
'flux_redux',
@@ -190,6 +192,10 @@ export const zSubModelType = z.enum([
'vae_decoder',
'vae_encoder',
'audio_vae',
+ 'vocoder',
+ 'connectors',
+ 'latent_upsampler',
+ 'temporal_latent_upsampler',
'scheduler',
'safety_checker',
]);
@@ -209,6 +215,8 @@ export const zQwen3VariantType = z.enum(['qwen3_4b', 'qwen3_8b', 'qwen3_06b']);
/** Qwen3-VL (vision-language) encoders: Krea-2 takes the 4B, Ideogram 4 the 8B. */
const zQwen3VLVariantType = z.enum(['qwen3_vl_4b', 'qwen3_vl_8b']);
const zMiniMaxH3VariantType = z.enum(['fl2va', 'ref2va']);
+/** LTX-2 transformers: the guided ('dev') and the step-distilled release of one architecture. */
+export const zLTX2VariantType = z.enum(['ltx2_dev', 'ltx2_distilled']);
const zMistralVariantType = z.enum(['cow_mistral3_small', 'mistral3_24b', 'ministral3_3b']);
const zPiDDecoderVariantType = z.enum(['res2k_sr4x', 'res2kto4k_sr4x']);
export const zAnyModelVariant = z.union([
@@ -224,6 +232,7 @@ export const zAnyModelVariant = z.union([
zQwen3VariantType,
zQwen3VLVariantType,
zMiniMaxH3VariantType,
+ zLTX2VariantType,
zMistralVariantType,
zPiDDecoderVariantType,
]);
@@ -245,6 +254,7 @@ export const zModelFormat = z.enum([
'qwen3_vl_encoder',
'wan_t5_encoder',
'gemma2_encoder',
+ 'gemma4_encoder',
'bnb_quantized_int8b',
'bnb_quantized_nf4b',
'gguf_quantized',
diff --git a/invokeai/frontend/web/src/features/parameters/util/optimalDimension.ts b/invokeai/frontend/web/src/features/parameters/util/optimalDimension.ts
index b503510ca9..6cb461c0c7 100644
--- a/invokeai/frontend/web/src/features/parameters/util/optimalDimension.ts
+++ b/invokeai/frontend/web/src/features/parameters/util/optimalDimension.ts
@@ -36,6 +36,9 @@ export const getOptimalDimension = (base?: BaseModelType | null, pidScale = 1):
case 'minimax-h3':
// Native canvas has a 768px short edge (soft cap 768x1344).
return 768;
+ case 'ltx-2':
+ // Declared canvas is 1280x704: a 704px short edge.
+ return 704;
case 'sdxl':
case 'flux':
case 'flux2':
@@ -115,6 +118,10 @@ export const getGridSize = (base?: BaseModelType | null, pidScale = 1): number =
// (16x VAE spatial compression x patch size 2).
gridSize = 32;
break;
+ case 'ltx-2':
+ // 32x VAE spatial compression at patch size 1.
+ gridSize = 32;
+ break;
case 'flux':
case 'flux2':
case 'sd-3':
diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts
index 5c8faa3c21..d7df43041f 100644
--- a/invokeai/frontend/web/src/services/api/schema.ts
+++ b/invokeai/frontend/web/src/services/api/schema.ts
@@ -27562,8 +27562,11 @@ export type components = {
* Main_Diffusers_LTX2_Config
* @description An LTX-2 folder of per-component single files in the official key layout.
*
- * This is how LTX-2.5 is distributed (``Lightricks/LTX-2.5`` and the ``DeepBeepMeep/LTX-2`` mirror):
- * one safetensors per component rather than a diffusers ``model_index.json`` tree. The folder is
+ * This is how the ``DeepBeepMeep/LTX-2`` mirror distributes LTX-2.5: one safetensors per component
+ * rather than a diffusers ``model_index.json`` tree. (The official ``Lightricks/LTX-2.5`` files use
+ * the same layout for the VAEs, upsamplers and transformer, but keep the connectors inside the
+ * transformer file and the text projection inside the text-encoder file; a folder of official files
+ * therefore lacks a text-projection component in this version.) The folder is
* the *component source* of a generation -- video VAE, audio VAE, vocoder, text projection, the two
* text connectors and the latent upsamplers -- while the 22B transformer normally comes from a
* single-file record selected in the model loader (bf16, int8-convrot or nvfp4). A folder that
diff --git a/invokeai/frontend/web/src/services/api/types.ts b/invokeai/frontend/web/src/services/api/types.ts
index 930e73173f..b510a09920 100644
--- a/invokeai/frontend/web/src/services/api/types.ts
+++ b/invokeai/frontend/web/src/services/api/types.ts
@@ -123,6 +123,7 @@ export type QwenVLEncoderModelConfig = Extract<InternalAnyModelConfig, { type: '
export type Qwen3VLEncoderModelConfig = Extract<InternalAnyModelConfig, { type: 'qwen3_vl_encoder' }>;
export type WanT5EncoderModelConfig = Extract<InternalAnyModelConfig, { type: 'wan_t5_encoder' }>;
type Gemma2EncoderModelConfig = Extract<InternalAnyModelConfig, { type: 'gemma2_encoder' }>;
+type Gemma4EncoderModelConfig = Extract<InternalAnyModelConfig, { type: 'gemma4_encoder' }>;
type PiDDecoderModelConfig = Extract<InternalAnyModelConfig, { type: 'pid_decoder' }>;
export type SpandrelImageToImageModelConfig = Extract<InternalAnyModelConfig, { type: 'spandrel_image_to_image' }>;
export type CheckpointModelConfig = Extract<InternalAnyModelConfig, { type: 'main'; format: 'checkpoint' }>;
@@ -465,6 +466,10 @@ export const isGemma2EncoderModelConfig = (config: AnyModelConfig): config is Ge
return config.type === 'gemma2_encoder';
};
+export const isGemma4EncoderModelConfig = (config: AnyModelConfig): config is Gemma4EncoderModelConfig => {
+ return config.type === 'gemma4_encoder';
+};
+
export const isPiDDecoderModelConfig = (config: AnyModelConfig): config is PiDDecoderModelConfig => {
return config.type === 'pid_decoder';
};