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.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(model-manager): persist Run on CPU for the MiniMax H3 text encoder (#10123)
Josh Corbettc58877a8d39f
diff --git a/docs/src/content/docs/contributing/new-model-integration.mdx b/docs/src/content/docs/contributing/new-model-integration.mdxindex 32b6b7aea8..bbbf9649e8 100644--- a/docs/src/content/docs/contributing/new-model-integration.mdx+++ b/docs/src/content/docs/contributing/new-model-integration.mdx@@ -852,7 +852,8 @@ Paths below are relative to `invokeai/frontend/webv2/src/features/generation/cor- `ModelTaxonomyType` in `types.ts`, and its label in the type list at the top of `taxonomy.ts`- `NULL_BASE_ALLOWANCES` and `SINGLETON_LINK_TYPES` in `relationships.ts`- the type label in `modelRequirements.ts`- - `CPU_ONLY_TYPES` in `src/features/models/ui/detail/CpuOnlySetting.tsx` if the config has `cpu_only`++ The model detail's **Run on CPU** switch needs no entry: it appears for every config that carries `cpu_only`, so adding the field to the backend config is enough.8. **Per-family UI (only for controls unique to the architecture)**diff --git a/docs/src/content/docs/development/Architecture/model-manager.mdx b/docs/src/content/docs/development/Architecture/model-manager.mdxindex 3a8ae97ed7..b50b295a1c 100644--- a/docs/src/content/docs/development/Architecture/model-manager.mdx+++ b/docs/src/content/docs/development/Architecture/model-manager.mdx@@ -194,7 +194,7 @@ Adds the configuration record; the config's `key` becomes the record's key. It r#### update_model(key, changes, allow_class_change=False) -> AnyModelConfig-Applies a `ModelRecordChanges` to the record and returns the updated config. The changes are validated against the model's config class; with `allow_class_change`, a change may turn the record into another class (a LoRA into a Main model, say), which must validate as well. The record is locked while the update is applied, so concurrent updates of one model apply one after the other. Raises `UnknownModelException` for an unknown key, or pydantic's `ValidationError` for invalid changes.+Applies a `ModelRecordChanges` to the record and returns the updated config. The changes are validated against the model's config class; with `allow_class_change`, a change may turn the record into another class (a LoRA into a Main model, say), which must validate as well. The record is locked while the update is applied, so concurrent updates of one model apply one after the other. Raises `UnknownModelException` for an unknown key, pydantic's `ValidationError` for invalid changes, and `ValueError` for a change of the key or a path longer than a record holds. With `allow_class_change`, a non-null change to a field that neither the current nor the resulting config class has also raises `ValueError`, so no change is silently dropped: `None` (clearing a value) is not refused this way, and a value only the current class stores is dropped when the class changes. Nothing is written when an update raises.#### replace_model(key, new_config) -> AnyModelConfig@@ -1334,7 +1334,7 @@ loaded_model = mm.load.load_model(configs[0])### mm.update_model_record(key, changes) -> AnyModelConfig-Applies a `ModelRecordChanges` to the model's record, allowing its config class to change, and returns the stored result. When the change affects how the model loads (for example its path, format, `cpu_only` or `fp8_storage`), every cached instance of the model is dropped so its next load rebuilds. Raises `UnknownModelException` for an unknown key and `ValueError` for a change the record cannot take. Use this rather than `mm.store.update_model()` for changes that may affect loading.+Applies a `ModelRecordChanges` to the model's record, allowing its config class to change, and returns the stored result. When the change affects how the model loads (for example its path, format, `cpu_only` or `fp8_storage`), every cached instance of the model is dropped so its next load rebuilds. Raises `UnknownModelException` for an unknown key and `ValueError` for a change the record cannot take, including a non-null value for a field neither the current nor the resulting config class has; nothing is written then. Use this rather than `mm.store.update_model()` for changes that may affect loading.### mm.reidentify_model(key) -> AnyModelConfigdiff --git a/invokeai/app/api/routers/model_manager.py b/invokeai/app/api/routers/model_manager.pyindex be779cde55..84271c3694 100644--- a/invokeai/app/api/routers/model_manager.py+++ b/invokeai/app/api/routers/model_manager.py@@ -238,7 +238,6 @@ example_model_config = {"variant": "normal","prediction_type": "epsilon","repo_variant": "fp16",- "upcast_attention": False,}example_model_input = {@@ -635,7 +634,7 @@ def _update_model_record(key: str, changes: ModelRecordChanges) -> AnyModelConfi},400: {"description": "Bad request"},404: {"description": "The model could not be found"},- 409: {"description": "There is already a model corresponding to the new name"},+ 409: {"description": "The change cannot be applied to this model"},},status_code=200,)diff --git a/invokeai/app/services/model_records/model_records_base.py b/invokeai/app/services/model_records/model_records_base.pyindex 258d0787d1..328fa01525 100644--- a/invokeai/app/services/model_records/model_records_base.py+++ b/invokeai/app/services/model_records/model_records_base.py@@ -156,7 +156,6 @@ class ModelRecordChanges(BaseModelExcludeNull):prediction_type: Optional[SchedulerPredictionType] = Field(description="The prediction type of the model.", default=None)- upcast_attention: Optional[bool] = Field(description="Whether to upcast attention.", default=None)config_path: Optional[str] = Field(description="Path to config file for model", default=None)@@ -195,6 +194,8 @@ class ModelRecordServiceBase(ABC):model's key cannot change: `changes.key`, if set, must equal `key`, or ValueError is raised.:param allow_class_change: If True, allows changes that would change the model config class. For example,changing a LoRA into a Main model. This does not disable validation, so the changes must still be valid.+ A non-null change to a field that neither the current nor the resulting config class has raises ValueError+ and nothing is written."""passdiff --git a/invokeai/app/services/model_records/model_records_sql.py b/invokeai/app/services/model_records/model_records_sql.pyindex 43dcde889f..5d7e00333e 100644--- a/invokeai/app/services/model_records/model_records_sql.py+++ b/invokeai/app/services/model_records/model_records_sql.py@@ -166,6 +166,8 @@ class ModelRecordServiceSQL(ModelRecordServiceBase):# 2. Apply the changes to the dict# 3. Attempt to create a new model config from the updated dict+ original = record+# 1. Convert the existing record to a dictrecord_as_dict = record.model_dump()@@ -191,6 +193,19 @@ class ModelRecordServiceSQL(ModelRecordServiceBase):if stale_field not in changes.model_fields_set:fallback_dict.pop(stale_field, None)record = _construct_config_for_type(fallback_dict, changes.type)++ # Validation ignores keys the resulting class has no field for, so without this check a change it+ # cannot store would be dropped while the update reports success. None clears a value, and a field+ # of the original class may be dropped by a class change; neither is refused.+ unstorable = sorted(+ field_name+ for field_name in changes.model_fields_set+ if getattr(changes, field_name) is not None+ and field_name not in type(original).model_fields+ and field_name not in type(record).model_fields+ )+ if unstorable:+ raise ValueError(f"Model '{original.name}' does not support {', '.join(unstorable)}")else:# We are not allowing the model config class to change, so we can just update the existing instance in# place. If the changes are invalid for the existing class, an exception will be raised by pydantic.diff --git a/invokeai/backend/model_manager/configs/qwen3_vl_encoder.py b/invokeai/backend/model_manager/configs/qwen3_vl_encoder.pyindex 05d2784b25..0fc6baec23 100644--- a/invokeai/backend/model_manager/configs/qwen3_vl_encoder.py+++ b/invokeai/backend/model_manager/configs/qwen3_vl_encoder.py@@ -390,6 +390,7 @@ class Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config(Checkpoint_Config_Base, Config_base: Literal[BaseModelType.MiniMaxH3] = Field(default=BaseModelType.MiniMaxH3)type: Literal[ModelType.Qwen3VLEncoder] = Field(default=ModelType.Qwen3VLEncoder)format: Literal[ModelFormat.Checkpoint] = Field(default=ModelFormat.Checkpoint)+ cpu_only: bool | None = Field(default=None, description="Whether this model should run on CPU only")@classmethoddef from_model_on_disk(cls, mod: ModelOnDisk, override_fields: dict[str, Any]) -> Self:diff --git a/invokeai/frontend/api/openapi.json b/invokeai/frontend/api/openapi.jsonindex 526641d067..13d1447e65 100644--- a/invokeai/frontend/api/openapi.json+++ b/invokeai/frontend/api/openapi.json@@ -3063,8 +3063,7 @@"converted_at": 0,"variant": "normal","prediction_type": "epsilon",- "repo_variant": "fp16",- "upcast_attention": false+ "repo_variant": "fp16"}}}@@ -3680,8 +3679,7 @@"converted_at": 0,"variant": "normal","prediction_type": "epsilon",- "repo_variant": "fp16",- "upcast_attention": false+ "repo_variant": "fp16"}}}@@ -3693,7 +3691,7 @@"description": "The model could not be found"},"409": {- "description": "There is already a model corresponding to the new name"+ "description": "The change cannot be applied to this model"},"422": {"description": "Validation Error",@@ -4324,8 +4322,7 @@"converted_at": 0,"variant": "normal","prediction_type": "epsilon",- "repo_variant": "fp16",- "upcast_attention": false+ "repo_variant": "fp16"}}}@@ -5843,8 +5840,7 @@"converted_at": 0,"variant": "normal","prediction_type": "epsilon",- "repo_variant": "fp16",- "upcast_attention": false+ "repo_variant": "fp16"}}}@@ -95176,18 +95172,6 @@],"description": "The prediction type of the model."},- "upcast_attention": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ],- "title": "Upcast Attention",- "description": "Whether to upcast attention."- },"config_path": {"anyOf": [{@@ -101665,6 +101649,18 @@"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"}},"type": "object",@@ -101683,7 +101679,8 @@"config_path","base","type",- "format"+ "format",+ "cpu_only"],"title": "Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config","description": "Configuration for MiniMax H3's truncated Qwen3-VL-32B conditioning encoder single files\n(Comfy-Org ``qwen3vl_32b_minimax_h3_*.safetensors`` and mirrors).\n\nThese are NOT complete Qwen3-VL-32B checkpoints: the language stack is truncated to the 50\nlayers H3 conditions on (the file's ``minimax_h3_te`` metadata records the contract:\n\"unnormalized_hidden_after_layer_50\"), the final norm and LM head are omitted, and the\nbf16/int8-convrot repacks quantize only the 50 language layers (vision tower stays bf16).\n\nIdentified primarily by the explicit ``minimax_h3_te`` safetensors metadata; a structural\nfallback covers metadata-stripped re-uploads. ``Qwen3VLEncoder_Checkpoint_Config`` accepts only\nthe two widths it can build (2560 and 4096), so neither config can claim the other's files.\n\nThe nvfp4 repacks share this layout and are accepted here, but the loader rejects their\nquantization format early (header-only check) with a clear error - mirroring how the H3\ntransformer checkpoint config treats fp8_scaled files."diff --git a/invokeai/frontend/api/schema.ts b/invokeai/frontend/api/schema.tsindex 0fa6455520..4a4ec60677 100644--- a/invokeai/frontend/api/schema.ts+++ b/invokeai/frontend/api/schema.ts@@ -40301,11 +40301,6 @@ export type components = {variant?: components["schemas"]["ModelVariantType"] | components["schemas"]["ClipVariantType"] | components["schemas"]["FluxVariantType"] | components["schemas"]["Flux2VariantType"] | components["schemas"]["Flux3VariantType"] | components["schemas"]["ZImageVariantType"] | components["schemas"]["QwenImageVariantType"] | components["schemas"]["WanVariantType"] | components["schemas"]["WanLoRAVariantType"] | components["schemas"]["Qwen3VariantType"] | components["schemas"]["Qwen3VLVariantType"] | components["schemas"]["Qwen35VariantType"] | components["schemas"]["AnimaVariantType"] | components["schemas"]["Krea2VariantType"] | components["schemas"]["QwenImage21VariantType"] | components["schemas"]["MiniMaxH3VariantType"] | components["schemas"]["LTX2VariantType"] | components["schemas"]["MistralVariantType"] | components["schemas"]["PiDDecoderVariantType"] | null;/** @description The prediction type of the model. */prediction_type?: components["schemas"]["SchedulerPredictionType"] | null;- /**- * Upcast Attention- * @description Whether to upcast attention.- */- upcast_attention?: boolean | null;/*** Config Path* @description Path to config file for model@@ -43833,6 +43828,11 @@ export type components = {* @constant*/format: "checkpoint";+ /**+ * Cpu Only+ * @description Whether this model should run on CPU only+ */+ cpu_only: boolean | null;};/*** Qwen3VLEncoder_GGUF_Config@@ -59266,8 +59266,7 @@ export interface operations {* "converted_at": 0,* "variant": "normal",* "prediction_type": "epsilon",- * "repo_variant": "fp16",- * "upcast_attention": false+ * "repo_variant": "fp16"* }*/"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_QwenImage21_Config"] | components["schemas"]["Main_Diffusers_Wan_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Diffusers_ErnieImage_Config"] | components["schemas"]["Main_Diffusers_Ideogram4_Config"] | components["schemas"]["Main_Diffusers_Krea2_Config"] | components["schemas"]["Main_Diffusers_Flux3_Config"] | components["schemas"]["Main_Diffusers_MiniMaxH3_Config"] | components["schemas"]["Main_Diffusers_LTX2_Config"] | components["schemas"]["Main_Diffusers_MossImage_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_QwenImage_Config"] | components["schemas"]["Main_Checkpoint_QwenImage21_Config"] | components["schemas"]["Main_Checkpoint_Wan_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_ErnieImage_Config"] | components["schemas"]["Main_Checkpoint_Ideogram4_Config"] | components["schemas"]["Main_Checkpoint_Krea2_Config"] | components["schemas"]["Main_Checkpoint_Flux3_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Main_Checkpoint_LTX2_Config"] | components["schemas"]["Main_Checkpoint_MossImage_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_QwenImage21_Config"] | components["schemas"]["Main_GGUF_Wan_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["Main_GGUF_Krea2_Config"] | components["schemas"]["Main_GGUF_Flux3_Config"] | components["schemas"]["Main_GGUF_Ideogram4_Config"] | components["schemas"]["Main_GGUF_ErnieImage_Config"] | components["schemas"]["Main_GGUF_LTX2_Config"] | components["schemas"]["Main_GGUF_MossImage_Config"] | components["schemas"]["Main_GGUF_Anima_Config"] | components["schemas"]["Main_SDNQ_Diffusers_Flux2_Config"] | components["schemas"]["Main_SDNQ_Diffusers_FLUX_Config"] | components["schemas"]["Main_SDNQ_Diffusers_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_SD3_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_Wan_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage21_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_FLUX_Config"] | components["schemas"]["VAE_Diffusers_SD3_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["VAE_Diffusers_Wan_Config"] | components["schemas"]["VAE_Diffusers_QwenImage21_Config"] | components["schemas"]["PiDDecoder_Checkpoint_FLUX_Config"] | components["schemas"]["PiDDecoder_Checkpoint_Flux2_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SD3_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SDXL_Config"] | components["schemas"]["PiDDecoder_Checkpoint_QwenImage_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD1_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SDXL_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD3_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_FLUX_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Flux2_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_QwenImage21_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Wan_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_LTX2_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_Checkpoint_Anima_Config"] | components["schemas"]["ControlNet_Checkpoint_QwenImage_Config"] | components["schemas"]["ControlNet_Checkpoint_Flux2_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_Krea2_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage21_Config"] | components["schemas"]["LoRA_LyCORIS_Flux3_Config"] | components["schemas"]["LoRA_LyCORIS_LTX2_Config"] | components["schemas"]["LoRA_LyCORIS_MiniMaxH3_Config"] | components["schemas"]["LoRA_LyCORIS_Wan_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_Flux3_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"]["T5Encoder_SDNQ_Config"] | components["schemas"]["T5Encoder_GGUF_Config"] | components["schemas"]["T5Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_GGUF_Config"] | components["schemas"]["Qwen3VLEncoder_Qwen3VLEncoder_Config"] | components["schemas"]["Qwen35Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["Qwen3Encoder_SDNQ_Folder_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["Gemma2Encoder_Gemma2Encoder_Config"] | components["schemas"]["Gemma4Encoder_Gemma4Encoder_LTX2_Config"] | components["schemas"]["Gemma4Encoder_GGUF_LTX2_Config"] | components["schemas"]["Gemma2Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["WanT5Encoder_WanT5Encoder_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"]["IPAdapter_Checkpoint_Anima_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"]["CLIPEmbed_Checkpoint_G_Config"] | components["schemas"]["CLIPEmbed_Checkpoint_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LTX2DurationHead_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["TextLLM_Checkpoint_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"];@@ -59380,8 +59379,7 @@ export interface operations {* "converted_at": 0,* "variant": "normal",* "prediction_type": "epsilon",- * "repo_variant": "fp16",- * "upcast_attention": false+ * "repo_variant": "fp16"* }*/"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_QwenImage21_Config"] | components["schemas"]["Main_Diffusers_Wan_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Diffusers_ErnieImage_Config"] | components["schemas"]["Main_Diffusers_Ideogram4_Config"] | components["schemas"]["Main_Diffusers_Krea2_Config"] | components["schemas"]["Main_Diffusers_Flux3_Config"] | components["schemas"]["Main_Diffusers_MiniMaxH3_Config"] | components["schemas"]["Main_Diffusers_LTX2_Config"] | components["schemas"]["Main_Diffusers_MossImage_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_QwenImage_Config"] | components["schemas"]["Main_Checkpoint_QwenImage21_Config"] | components["schemas"]["Main_Checkpoint_Wan_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_ErnieImage_Config"] | components["schemas"]["Main_Checkpoint_Ideogram4_Config"] | components["schemas"]["Main_Checkpoint_Krea2_Config"] | components["schemas"]["Main_Checkpoint_Flux3_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Main_Checkpoint_LTX2_Config"] | components["schemas"]["Main_Checkpoint_MossImage_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_QwenImage21_Config"] | components["schemas"]["Main_GGUF_Wan_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["Main_GGUF_Krea2_Config"] | components["schemas"]["Main_GGUF_Flux3_Config"] | components["schemas"]["Main_GGUF_Ideogram4_Config"] | components["schemas"]["Main_GGUF_ErnieImage_Config"] | components["schemas"]["Main_GGUF_LTX2_Config"] | components["schemas"]["Main_GGUF_MossImage_Config"] | components["schemas"]["Main_GGUF_Anima_Config"] | components["schemas"]["Main_SDNQ_Diffusers_Flux2_Config"] | components["schemas"]["Main_SDNQ_Diffusers_FLUX_Config"] | components["schemas"]["Main_SDNQ_Diffusers_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_SD3_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_Wan_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage21_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_FLUX_Config"] | components["schemas"]["VAE_Diffusers_SD3_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["VAE_Diffusers_Wan_Config"] | components["schemas"]["VAE_Diffusers_QwenImage21_Config"] | components["schemas"]["PiDDecoder_Checkpoint_FLUX_Config"] | components["schemas"]["PiDDecoder_Checkpoint_Flux2_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SD3_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SDXL_Config"] | components["schemas"]["PiDDecoder_Checkpoint_QwenImage_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD1_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SDXL_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD3_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_FLUX_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Flux2_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_QwenImage21_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Wan_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_LTX2_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_Checkpoint_Anima_Config"] | components["schemas"]["ControlNet_Checkpoint_QwenImage_Config"] | components["schemas"]["ControlNet_Checkpoint_Flux2_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_Krea2_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage21_Config"] | components["schemas"]["LoRA_LyCORIS_Flux3_Config"] | components["schemas"]["LoRA_LyCORIS_LTX2_Config"] | components["schemas"]["LoRA_LyCORIS_MiniMaxH3_Config"] | components["schemas"]["LoRA_LyCORIS_Wan_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_Flux3_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"]["T5Encoder_SDNQ_Config"] | components["schemas"]["T5Encoder_GGUF_Config"] | components["schemas"]["T5Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_GGUF_Config"] | components["schemas"]["Qwen3VLEncoder_Qwen3VLEncoder_Config"] | components["schemas"]["Qwen35Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["Qwen3Encoder_SDNQ_Folder_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["Gemma2Encoder_Gemma2Encoder_Config"] | components["schemas"]["Gemma4Encoder_Gemma4Encoder_LTX2_Config"] | components["schemas"]["Gemma4Encoder_GGUF_LTX2_Config"] | components["schemas"]["Gemma2Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["WanT5Encoder_WanT5Encoder_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"]["IPAdapter_Checkpoint_Anima_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"]["CLIPEmbed_Checkpoint_G_Config"] | components["schemas"]["CLIPEmbed_Checkpoint_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LTX2DurationHead_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["TextLLM_Checkpoint_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"];@@ -59401,7 +59399,7 @@ export interface operations {};content?: never;};- /** @description There is already a model corresponding to the new name */+ /** @description The change cannot be applied to this model */409: {headers: {[name: string]: unknown;@@ -59453,8 +59451,7 @@ export interface operations {* "converted_at": 0,* "variant": "normal",* "prediction_type": "epsilon",- * "repo_variant": "fp16",- * "upcast_attention": false+ * "repo_variant": "fp16"* }*/"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_QwenImage21_Config"] | components["schemas"]["Main_Diffusers_Wan_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Diffusers_ErnieImage_Config"] | components["schemas"]["Main_Diffusers_Ideogram4_Config"] | components["schemas"]["Main_Diffusers_Krea2_Config"] | components["schemas"]["Main_Diffusers_Flux3_Config"] | components["schemas"]["Main_Diffusers_MiniMaxH3_Config"] | components["schemas"]["Main_Diffusers_LTX2_Config"] | components["schemas"]["Main_Diffusers_MossImage_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_QwenImage_Config"] | components["schemas"]["Main_Checkpoint_QwenImage21_Config"] | components["schemas"]["Main_Checkpoint_Wan_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_ErnieImage_Config"] | components["schemas"]["Main_Checkpoint_Ideogram4_Config"] | components["schemas"]["Main_Checkpoint_Krea2_Config"] | components["schemas"]["Main_Checkpoint_Flux3_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Main_Checkpoint_LTX2_Config"] | components["schemas"]["Main_Checkpoint_MossImage_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_QwenImage21_Config"] | components["schemas"]["Main_GGUF_Wan_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["Main_GGUF_Krea2_Config"] | components["schemas"]["Main_GGUF_Flux3_Config"] | components["schemas"]["Main_GGUF_Ideogram4_Config"] | components["schemas"]["Main_GGUF_ErnieImage_Config"] | components["schemas"]["Main_GGUF_LTX2_Config"] | components["schemas"]["Main_GGUF_MossImage_Config"] | components["schemas"]["Main_GGUF_Anima_Config"] | components["schemas"]["Main_SDNQ_Diffusers_Flux2_Config"] | components["schemas"]["Main_SDNQ_Diffusers_FLUX_Config"] | components["schemas"]["Main_SDNQ_Diffusers_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_SD3_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_Wan_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage21_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_FLUX_Config"] | components["schemas"]["VAE_Diffusers_SD3_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["VAE_Diffusers_Wan_Config"] | components["schemas"]["VAE_Diffusers_QwenImage21_Config"] | components["schemas"]["PiDDecoder_Checkpoint_FLUX_Config"] | components["schemas"]["PiDDecoder_Checkpoint_Flux2_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SD3_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SDXL_Config"] | components["schemas"]["PiDDecoder_Checkpoint_QwenImage_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD1_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SDXL_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD3_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_FLUX_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Flux2_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_QwenImage21_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Wan_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_LTX2_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_Checkpoint_Anima_Config"] | components["schemas"]["ControlNet_Checkpoint_QwenImage_Config"] | components["schemas"]["ControlNet_Checkpoint_Flux2_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_Krea2_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage21_Config"] | components["schemas"]["LoRA_LyCORIS_Flux3_Config"] | components["schemas"]["LoRA_LyCORIS_LTX2_Config"] | components["schemas"]["LoRA_LyCORIS_MiniMaxH3_Config"] | components["schemas"]["LoRA_LyCORIS_Wan_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_Flux3_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"]["T5Encoder_SDNQ_Config"] | components["schemas"]["T5Encoder_GGUF_Config"] | components["schemas"]["T5Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_GGUF_Config"] | components["schemas"]["Qwen3VLEncoder_Qwen3VLEncoder_Config"] | components["schemas"]["Qwen35Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["Qwen3Encoder_SDNQ_Folder_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["Gemma2Encoder_Gemma2Encoder_Config"] | components["schemas"]["Gemma4Encoder_Gemma4Encoder_LTX2_Config"] | components["schemas"]["Gemma4Encoder_GGUF_LTX2_Config"] | components["schemas"]["Gemma2Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["WanT5Encoder_WanT5Encoder_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"]["IPAdapter_Checkpoint_Anima_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"]["CLIPEmbed_Checkpoint_G_Config"] | components["schemas"]["CLIPEmbed_Checkpoint_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LTX2DurationHead_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["TextLLM_Checkpoint_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"];@@ -60247,8 +60244,7 @@ export interface operations {* "converted_at": 0,* "variant": "normal",* "prediction_type": "epsilon",- * "repo_variant": "fp16",- * "upcast_attention": false+ * "repo_variant": "fp16"* }*/"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_QwenImage21_Config"] | components["schemas"]["Main_Diffusers_Wan_Config"] | components["schemas"]["Main_Diffusers_ZImage_Config"] | components["schemas"]["Main_Diffusers_ErnieImage_Config"] | components["schemas"]["Main_Diffusers_Ideogram4_Config"] | components["schemas"]["Main_Diffusers_Krea2_Config"] | components["schemas"]["Main_Diffusers_Flux3_Config"] | components["schemas"]["Main_Diffusers_MiniMaxH3_Config"] | components["schemas"]["Main_Diffusers_LTX2_Config"] | components["schemas"]["Main_Diffusers_MossImage_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_QwenImage_Config"] | components["schemas"]["Main_Checkpoint_QwenImage21_Config"] | components["schemas"]["Main_Checkpoint_Wan_Config"] | components["schemas"]["Main_Checkpoint_ZImage_Config"] | components["schemas"]["Main_Checkpoint_ErnieImage_Config"] | components["schemas"]["Main_Checkpoint_Ideogram4_Config"] | components["schemas"]["Main_Checkpoint_Krea2_Config"] | components["schemas"]["Main_Checkpoint_Flux3_Config"] | components["schemas"]["Main_Checkpoint_Anima_Config"] | components["schemas"]["Main_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Main_Checkpoint_LTX2_Config"] | components["schemas"]["Main_Checkpoint_MossImage_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_QwenImage21_Config"] | components["schemas"]["Main_GGUF_Wan_Config"] | components["schemas"]["Main_GGUF_ZImage_Config"] | components["schemas"]["Main_GGUF_Krea2_Config"] | components["schemas"]["Main_GGUF_Flux3_Config"] | components["schemas"]["Main_GGUF_Ideogram4_Config"] | components["schemas"]["Main_GGUF_ErnieImage_Config"] | components["schemas"]["Main_GGUF_LTX2_Config"] | components["schemas"]["Main_GGUF_MossImage_Config"] | components["schemas"]["Main_GGUF_Anima_Config"] | components["schemas"]["Main_SDNQ_Diffusers_Flux2_Config"] | components["schemas"]["Main_SDNQ_Diffusers_FLUX_Config"] | components["schemas"]["Main_SDNQ_Diffusers_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_SD3_Config"] | components["schemas"]["VAE_Checkpoint_Flux2_Config"] | components["schemas"]["VAE_Checkpoint_Wan_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage_Config"] | components["schemas"]["VAE_Checkpoint_Anima_Config"] | components["schemas"]["VAE_Checkpoint_QwenImage21_Config"] | components["schemas"]["VAE_Diffusers_SD1_Config"] | components["schemas"]["VAE_Diffusers_SDXL_Config"] | components["schemas"]["VAE_Diffusers_FLUX_Config"] | components["schemas"]["VAE_Diffusers_SD3_Config"] | components["schemas"]["VAE_Diffusers_Flux2_Config"] | components["schemas"]["VAE_Diffusers_Wan_Config"] | components["schemas"]["VAE_Diffusers_QwenImage21_Config"] | components["schemas"]["PiDDecoder_Checkpoint_FLUX_Config"] | components["schemas"]["PiDDecoder_Checkpoint_Flux2_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SD3_Config"] | components["schemas"]["PiDDecoder_Checkpoint_SDXL_Config"] | components["schemas"]["PiDDecoder_Checkpoint_QwenImage_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD1_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SDXL_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_SD3_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_FLUX_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Flux2_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_QwenImage21_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_Wan_Config"] | components["schemas"]["TinyAutoencoder_Checkpoint_LTX2_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_Checkpoint_Anima_Config"] | components["schemas"]["ControlNet_Checkpoint_QwenImage_Config"] | components["schemas"]["ControlNet_Checkpoint_Flux2_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_Krea2_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage_Config"] | components["schemas"]["LoRA_LyCORIS_QwenImage21_Config"] | components["schemas"]["LoRA_LyCORIS_Flux3_Config"] | components["schemas"]["LoRA_LyCORIS_LTX2_Config"] | components["schemas"]["LoRA_LyCORIS_MiniMaxH3_Config"] | components["schemas"]["LoRA_LyCORIS_Wan_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_Flux3_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"]["T5Encoder_SDNQ_Config"] | components["schemas"]["T5Encoder_GGUF_Config"] | components["schemas"]["T5Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config"] | components["schemas"]["Qwen3VLEncoder_Checkpoint_Config"] | components["schemas"]["Qwen3VLEncoder_GGUF_Config"] | components["schemas"]["Qwen3VLEncoder_Qwen3VLEncoder_Config"] | components["schemas"]["Qwen35Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_Qwen3Encoder_Config"] | components["schemas"]["Qwen3Encoder_Checkpoint_Config"] | components["schemas"]["Qwen3Encoder_GGUF_Config"] | components["schemas"]["Qwen3Encoder_SDNQ_Folder_Config"] | components["schemas"]["MistralEncoder_Diffusers_Config"] | components["schemas"]["MistralEncoder_Checkpoint_Config"] | components["schemas"]["MistralEncoder_GGUF_Config"] | components["schemas"]["Gemma2Encoder_Gemma2Encoder_Config"] | components["schemas"]["Gemma4Encoder_Gemma4Encoder_LTX2_Config"] | components["schemas"]["Gemma4Encoder_GGUF_LTX2_Config"] | components["schemas"]["Gemma2Encoder_GGUF_Config"] | components["schemas"]["QwenVLEncoder_Diffusers_Config"] | components["schemas"]["QwenVLEncoder_Checkpoint_Config"] | components["schemas"]["WanT5Encoder_WanT5Encoder_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"]["IPAdapter_Checkpoint_Anima_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"]["CLIPEmbed_Checkpoint_G_Config"] | components["schemas"]["CLIPEmbed_Checkpoint_L_Config"] | components["schemas"]["CLIPVision_Diffusers_Config"] | components["schemas"]["SigLIP_Diffusers_Config"] | components["schemas"]["FLUXRedux_Checkpoint_Config"] | components["schemas"]["LTX2DurationHead_Checkpoint_Config"] | components["schemas"]["LlavaOnevision_Diffusers_Config"] | components["schemas"]["TextLLM_Diffusers_Config"] | components["schemas"]["TextLLM_Checkpoint_Config"] | components["schemas"]["ExternalApiModelConfig"] | components["schemas"]["Unknown_Config"];diff --git a/invokeai/frontend/webv1/src/features/modelManagerV2/subpanels/ModelPanel/ModelEdit.tsx b/invokeai/frontend/webv1/src/features/modelManagerV2/subpanels/ModelPanel/ModelEdit.tsxindex b1554279eb..c57ebe4c49 100644--- a/invokeai/frontend/webv1/src/features/modelManagerV2/subpanels/ModelPanel/ModelEdit.tsx+++ b/invokeai/frontend/webv1/src/features/modelManagerV2/subpanels/ModelPanel/ModelEdit.tsx@@ -55,6 +55,11 @@ export const ModelEdit = memo(({ modelConfig }: Props) => {const [updateModel, { isLoading: isSubmitting }] = useUpdateModelMutation();const dispatch = useAppDispatch();const isExternal = useMemo(() => isExternalApiModelConfig(modelConfig), [modelConfig]);+ // The backend refuses a non-null value for a field the model's config does not store, and a registered input+ // submits its value even when untouched (an empty config path posts ""), so the config path renders only where the+ // config has it. The variant and prediction-type selects are controllers that submit only a picked value, so they+ // stay available to a reclassification that needs them.+ const hasConfigPath = 'config_path' in modelConfig;const form = useForm<ModelEditFormValues>({defaultValues: modelConfig as unknown as ModelEditFormValues,@@ -201,18 +206,16 @@ export const ModelEdit = memo(({ modelConfig }: Props) => {<FormLabel>{t('modelManager.variant')}</FormLabel><ModelVariantSelect control={form.control as unknown as Control<UpdateModelBody>} /></FormControl>- <FormControl flexDir="column" alignItems="flex-start" gap={1}>- <FormLabel>{t('modelManager.pathToConfig')}</FormLabel>- <Input {...form.register('config_path')} />- </FormControl>+ {hasConfigPath && (+ <FormControl flexDir="column" alignItems="flex-start" gap={1}>+ <FormLabel>{t('modelManager.pathToConfig')}</FormLabel>+ <Input {...form.register('config_path')} />+ </FormControl>+ )}<FormControl flexDir="column" alignItems="flex-start" gap={1}><FormLabel>{t('modelManager.predictionType')}</FormLabel><PredictionTypeSelect control={form.control as unknown as Control<UpdateModelBody>} /></FormControl>- <FormControl flexDir="column" alignItems="flex-start" gap={1}>- <FormLabel>{t('modelManager.upcastAttention')}</FormLabel>- <Checkbox {...form.register('upcast_attention')} />- </FormControl></SimpleGrid>{isExternal && (<>diff --git a/invokeai/frontend/webv2/scripts/mock-backend-fixtures.mjs b/invokeai/frontend/webv2/scripts/mock-backend-fixtures.mjsindex 542163bb4f..5278b3839b 100644--- a/invokeai/frontend/webv2/scripts/mock-backend-fixtures.mjs+++ b/invokeai/frontend/webv2/scripts/mock-backend-fixtures.mjs@@ -475,7 +475,6 @@ const EXTERNAL_MODEL_FIXTURES = [source: 'external://gemini/fixture-gemini-image',source_type: 'external',source_url: null,- trigger_phrases: null,type: 'external_image_generator',},{@@ -507,7 +506,6 @@ const EXTERNAL_MODEL_FIXTURES = [source: 'external://openai/fixture-gpt-image',source_type: 'external',source_url: null,- trigger_phrases: null,type: 'external_image_generator',},{@@ -534,7 +532,6 @@ const EXTERNAL_MODEL_FIXTURES = [source: 'external://seedream/fixture-seedream',source_type: 'external',source_url: null,- trigger_phrases: null,type: 'external_image_generator',},{@@ -560,7 +557,6 @@ const EXTERNAL_MODEL_FIXTURES = [source: CATALOG_MANAGED_EXTERNAL_SOURCE,source_type: 'external',source_url: null,- trigger_phrases: null,type: 'external_image_generator',},];@@ -580,9 +576,12 @@ const createLocalModels = (count) =>? MAIN_MODEL_BASES[Math.floor(index / MODEL_TYPES.length) % MAIN_MODEL_BASES.length]: MODEL_BASES[index % MODEL_BASES.length];+ // Like the backend, a config serializes only the fields it stores: `cpu_only` on VAEs, `trigger_phrases` on main+ // and LoRA models.return {base,cover_image: null,+ ...(type === 'vae' ? { cpu_only: null } : {}),default_settings: type === 'main' ? { cfg_scale: 7, height: 1024, steps: 30, width: 1024 } : null,description: `Deterministic representative ${type} model ${id}.`,file_size: 512_000_000 + index * 1_024,@@ -594,12 +593,16 @@ const createLocalModels = (count) =>source: `fixtures/models/fixture-model-${id}.safetensors`,source_type: 'path',source_url: null,- trigger_phrases: type === 'lora' ? [`fixture-style-${id}`] : null,+ ...(type === 'lora' ? { trigger_phrases: [`fixture-style-${id}`] } : {}),+ ...(type === 'main' ? { trigger_phrases: null } : {}),type,};});-/** A model record in the shape the list endpoint serves; the seed sets below override only what they need. */+/**+ * A model record in the shape the list endpoint serves; the seed sets below override only what they need. Main,+ * LoRA and Control LoRA seeds add `trigger_phrases`, which only those configs store.+ */const seedModel = ({ key, name, ...fields }) => ({base: 'any',cover_image: null,@@ -614,7 +617,6 @@ const seedModel = ({ key, name, ...fields }) => ({source: `seeds/${key}.safetensors`,source_type: 'path',source_url: null,- trigger_phrases: null,variant: null,...fields,});@@ -639,7 +641,15 @@ const controlSeed = (name, base, preprocessor, fields = {}) => ({export const MODEL_SEED_SETS = Object.freeze({// Anima ControlNet-LLLite adapters: one usable, two from before `cond_in_channels` was recorded.'anima-lllite': [- { record: seedModel({ base: 'anima', key: 'seed-anima-main', name: 'Anima Preview', type: 'main' }) },+ {+ record: seedModel({+ base: 'anima',+ key: 'seed-anima-main',+ name: 'Anima Preview',+ trigger_phrases: null,+ type: 'main',+ }),+ },{record: seedModel({base: 'anima',@@ -709,12 +719,14 @@ export const MODEL_SEED_SETS = Object.freeze({base: 'flux',key: 'seed-flux-dev',name: 'FLUX.1 dev',+ trigger_phrases: null,type: 'main',variant: 'dev',}),},controlSeed('flux-depth-control-lora', 'flux', 'depth_anything_image_processor', {format: 'lycoris',+ trigger_phrases: null,type: 'control_lora',}),controlSeed('flux-controlnet-union-pro', 'flux', null),diff --git a/invokeai/frontend/webv2/scripts/mock-backend.mjs b/invokeai/frontend/webv2/scripts/mock-backend.mjsindex 05f2819137..912b65f5db 100644--- a/invokeai/frontend/webv2/scripts/mock-backend.mjs+++ b/invokeai/frontend/webv2/scripts/mock-backend.mjs@@ -2259,7 +2259,8 @@ export const startMockBackend = async (port, { clock = Date.now, profile = 'emptreturn json(404, { detail: 'Model not found' });}if (method === 'PATCH') {- // Mirrors ModelRecordService.update_model: submitted fields replace stored ones wholesale; the key stays.+ // Submitted fields replace stored ones wholesale and the key stays, as in ModelRecordService.update_model.+ // Unlike the backend, it accepts any field: no validation and no 409 for a field the model's config lacks.const updated = { ...model, ...(await readJsonBody(request)), key };state.models.set(key, updated);return json(200, clone(updated));diff --git a/invokeai/frontend/webv2/src/features/models/core/taxonomy.ts b/invokeai/frontend/webv2/src/features/models/core/taxonomy.tsindex bcd360d376..bf2c8a8cf9 100644--- a/invokeai/frontend/webv2/src/features/models/core/taxonomy.ts+++ b/invokeai/frontend/webv2/src/features/models/core/taxonomy.ts@@ -188,8 +188,9 @@ const VARIANTS_BY_TYPE: Record<string, readonly string[]> = {};/**- * Constrained variant choices for a base/type pair; empty means the pair has- * no variant concept and the edit form falls back to free text.+ * Constrained variant choices for a base/type pair; empty means the pair has no+ * variant concept, so the edit form hides the field unless the model already+ * stores a variant, which it then edits as free text.*/export const getVariantOptionsFor = (base: string, type: string): readonly string[] => {if (type === 'main') {diff --git a/invokeai/frontend/webv2/src/features/models/core/types.ts b/invokeai/frontend/webv2/src/features/models/core/types.tsindex ed2dd7286c..bdee267d8b 100644--- a/invokeai/frontend/webv2/src/features/models/core/types.ts+++ b/invokeai/frontend/webv2/src/features/models/core/types.ts@@ -179,7 +179,6 @@ export interface ModelConfig {format: ModelFileFormat;variant?: string | null;prediction_type?: PredictionType | null;- upcast_attention?: boolean;config_path?: string | null;cpu_only?: boolean | null;trigger_phrases?: string[] | null;@@ -213,7 +212,6 @@ export interface ModelRecordChanges {format?: ModelFileFormat;variant?: string | null;prediction_type?: PredictionType | null;- upcast_attention?: boolean;config_path?: string | null;cpu_only?: boolean | null;trigger_phrases?: string[] | null;diff --git a/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.browser.test.tsx b/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.browser.test.tsxindex 32ca313502..227797a3aa 100644--- a/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.browser.test.tsx@@ -3,12 +3,13 @@ import type { ModelConfig } from '@features/models/core/types';import { ChakraProvider } from '@chakra-ui/react';import { getModelsSnapshot, setModelsSnapshotForTests, useModelsSelector } from '@features/models/data/modelsStore';import { type AccountScope, accountLifecycle } from '@platform/state/accountLifecycle';+import { ApiError } from '@platform/transport/http';import { system } from '@theme/system';import { act } from 'react';import { createRoot, type Root } from 'react-dom/client';import { afterEach, beforeEach, describe, expect, it, vi, type Mock } from 'vitest';-import { CpuOnlySetting, supportsCpuOnlySetting } from './CpuOnlySetting';+import { CpuOnlySetting } from './CpuOnlySetting';const api = vi.hoisted(() => ({getModelsDir: vi.fn(),@@ -85,32 +86,6 @@ describe('CpuOnlySetting', () => {accountLifecycle.invalidate();});- it('is available exactly for the types whose config carries cpu_only', () => {- const supported = [- 'vae',- 'clip_embed',- 't5_encoder',- 'qwen3_encoder',- 'clip_vision',- 'siglip',- 'llava_onevision',- 'text_llm',- 'wan_t5_encoder',- 'gemma2_encoder',- 'mistral_encoder',- 'qwen3_vl_encoder',- ];-- for (const type of supported) {- expect(supportsCpuOnlySetting({ type }), type).toBe(true);- }-- // These configs have no cpu_only field; the PATCH would silently drop it.- for (const type of ['main', 'lora', 'qwen_vl_encoder', 'pid_decoder']) {- expect(supportsCpuOnlySetting({ type }), type).toBe(false);- }- });-it('saves immediately, disables while pending, and accepts the canonical response', async () => {const request = deferred<ModelConfig>();api.updateModel.mockReturnValue(request.promise);@@ -137,7 +112,7 @@ describe('CpuOnlySetting', () => {expect(onError).not.toHaveBeenCalled();});- it('restores the previous value and reports a failed save', async () => {+ it('restores the previous value and reports why the backend refused the save', async () => {const request = deferred<ModelConfig>();api.updateModel.mockReturnValue(request.promise);const input = host.querySelector<HTMLInputElement>('input[type="checkbox"]')!;@@ -149,17 +124,42 @@ describe('CpuOnlySetting', () => {expect(getModelsSnapshot().models[0]?.cpu_only).toBe(true);await act(async () => {- request.reject(new Error('save exploded'));+ request.reject(new ApiError(JSON.stringify({ detail: "Model 'SDXL VAE' does not support cpu_only" }), 409));await request.promise.catch(() => undefined);});expect(getModelsSnapshot().models[0]?.cpu_only).toBeNull();expect(input.checked).toBe(false);expect(input.disabled).toBe(false);- expect(onError).toHaveBeenCalledWith('save exploded');+ expect(onError).toHaveBeenCalledWith("Model 'SDXL VAE' does not support cpu_only");expect(onSaved).not.toHaveBeenCalled();});+ it("reports a plain error's message, and the generic message when a failure carries none", async () => {+ const input = host.querySelector<HTMLInputElement>('input[type="checkbox"]')!;+ const toggle = () =>+ act(async () => {+ input.click();+ await Promise.resolve();+ });++ api.updateModel.mockRejectedValueOnce(new Error('Network unreachable'));+ await toggle();+ expect(onError).toHaveBeenLastCalledWith('Network unreachable');++ api.updateModel.mockRejectedValueOnce(undefined);+ await toggle();+ expect(onError).toHaveBeenLastCalledWith('models.failedToSaveCpuSetting');+ expect(input.checked).toBe(false);+ });++ it('describes the switch with its help text', () => {+ const input = host.querySelector<HTMLInputElement>('input[type="checkbox"]')!;+ const help = document.getElementById(input.getAttribute('aria-describedby') ?? '');++ expect(help?.textContent).toBe('models.runVaeOnCpuHelp');+ });+it('does not commit a late response from account A into account B', async () => {const request = deferred<ModelConfig>();api.updateModel.mockReturnValue(request.promise);diff --git a/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.tsx b/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.tsxindex c4aaa22e50..dde8166d0a 100644--- a/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/detail/CpuOnlySetting.tsx@@ -6,29 +6,16 @@ import { patchModelInStore, replaceModelInStore } from '@features/models/data/moimport { useScopedAction } from '@platform/react/useScopedAction';import { assertAccountScopeCurrent } from '@platform/state/accountLifecycle';import { getApiErrorMessage } from '@platform/transport/http';-import { useCallback } from 'react';+import { useCallback, useId } from 'react';import { useTranslation } from 'react-i18next';export type CpuOnlyModel = Pick<ModelConfig, 'cpu_only' | 'key' | 'name' | 'type'>;-/** Offer cpu_only only where backend config accepts it; other model types silently discard the field. */-const CPU_ONLY_TYPES: ReadonlySet<string> = new Set([- 'vae',- 'clip_embed',- 't5_encoder',- 'qwen3_encoder',- 'clip_vision',- 'siglip',- 'llava_onevision',- 'text_llm',- 'wan_t5_encoder',- 'gemma2_encoder',- 'mistral_encoder',- 'qwen3_vl_encoder',- 'qwen3_5_encoder',-]);--export const supportsCpuOnlySetting = (model: Pick<ModelConfig, 'type'>): boolean => CPU_ONLY_TYPES.has(model.type);+/**+ * The backend serializes `cpu_only` (null when unset) on exactly the configs that store it, so its presence decides.+ * One model type can span configs with and without the field, so a type list would offer a switch the PATCH rejects.+ */+export const supportsCpuOnlySetting = (model: Pick<ModelConfig, 'cpu_only'>): boolean => model.cpu_only !== undefined;/** Immediately persists the model's CPU-only preference with optimistic rollback. */export const CpuOnlySetting = ({@@ -43,6 +30,7 @@ export const CpuOnlySetting = ({const { t } = useTranslation();const { isBusy: isPending, run } = useScopedAction();const isVae = model.type === 'vae';+ const helpId = useId();const handleCheckedChange = useCallback(async (details: { checked: boolean }) => {@@ -80,7 +68,7 @@ export const CpuOnlySetting = ({disabled={isPending}onCheckedChange={handleCheckedChange}>- <Switch.HiddenInput />+ <Switch.HiddenInput aria-describedby={helpId} /><Switch.Control><Switch.Thumb /></Switch.Control>@@ -88,7 +76,7 @@ export const CpuOnlySetting = ({{isVae ? t('models.runVaeOnCpu') : t('models.runOnCpu')}</Switch.Label></Switch.Root>- <Text color="fg.subtle" fontSize="xs">+ <Text color="fg.subtle" fontSize="xs" id={helpId}>{isVae ? t('models.runVaeOnCpuHelp') : t('models.runOnCpuHelp')}</Text></Stack>diff --git a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.browser.test.tsx b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.browser.test.tsxindex 00d39cdac1..5794c52f85 100644--- a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.browser.test.tsx@@ -39,6 +39,28 @@ const MAIN = {variant: 'normal',} as unknown as ModelConfig;+// The backend serializes `cpu_only` and `trigger_phrases` only on configs that store them, whatever the type.+const config = (key: string, type: string, fields: Partial<ModelConfig>) =>+ ({+ base: 'any',+ file_size: 1024,+ format: 'checkpoint',+ hash: `hash-${key}`,+ key,+ name: key,+ path: `/models/${key}.safetensors`,+ source: `/models/${key}.safetensors`,+ source_type: 'path',+ type,+ ...fields,+ }) as unknown as ModelConfig;++const GEMMA4_ENCODER = config('gemma4-encoder', 'gemma4_encoder', { cpu_only: null });+const QWEN3_VL_ENCODER_WITHOUT_CPU_ONLY = config('qwen3-vl-encoder', 'qwen3_vl_encoder', {});+const LORA = config('lora-1', 'lora', { trigger_phrases: null });+const EMBEDDING = config('embedding-1', 'embedding', {});+const CONTROL_LORA = config('control-lora-1', 'control_lora', { trigger_phrases: null });+const ignoreConfirm = () => undefined;const MANAGER: ModelsUiAdapter = {@@ -70,18 +92,51 @@ describe('ModelDetail', () => {accountLifecycle.invalidate();});- it('places working memory last, after the trigger phrases', async () => {- await act(() =>+ const renderDetail = (modelKey: string) =>+ act(() =>root.render(<ChakraProvider value={system}><ModelsUiProvider adapter={MANAGER}>- <ModelDetail modelKey={MAIN.key} onRequestConfirm={ignoreConfirm} />+ <ModelDetail key={modelKey} modelKey={modelKey} onRequestConfirm={ignoreConfirm} /></ModelsUiProvider></ChakraProvider>));+ it('places working memory last, after the trigger phrases', async () => {+ await renderDetail(MAIN.key);+const order = [...host.querySelectorAll('[data-section]')].map((element) => element.getAttribute('data-section'));expect(order).toEqual(['default-settings', 'related-models', 'trigger-phrases', 'working-memory']);});++ it('offers Run on CPU exactly when the config carries cpu_only', async () => {+ setModelsSnapshotForTests({ models: [GEMMA4_ENCODER, QWEN3_VL_ENCODER_WITHOUT_CPU_ONLY], status: 'loaded' });+ // A checkbox named by its label, not merely the label text somewhere on the page.+ const hasCpuSwitch = () =>+ [...host.querySelectorAll<HTMLInputElement>('input[type="checkbox"]')].some(+ (input) => input.labels?.[0]?.textContent === 'models.runOnCpu'+ );++ await renderDetail(GEMMA4_ENCODER.key);+ expect(hasCpuSwitch()).toBe(true);++ await renderDetail(QWEN3_VL_ENCODER_WITHOUT_CPU_ONLY.key);+ expect(hasCpuSwitch()).toBe(false);+ });++ it('offers trigger phrases when the config carries trigger_phrases, except on Control LoRAs', async () => {+ setModelsSnapshotForTests({ models: [LORA, EMBEDDING, CONTROL_LORA], status: 'loaded' });+ const hasTriggerPhrases = () => host.querySelector('[data-section="trigger-phrases"]') !== null;++ await renderDetail(LORA.key);+ expect(hasTriggerPhrases()).toBe(true);++ await renderDetail(EMBEDDING.key);+ expect(hasTriggerPhrases()).toBe(false);++ // Prompt triggers never read Control LoRAs, so phrases stored there would have no effect.+ await renderDetail(CONTROL_LORA.key);+ expect(hasTriggerPhrases()).toBe(false);+ });});diff --git a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.tsx b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.tsxindex 5056e1f2d4..df64d8ae23 100644--- a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelDetail.tsx@@ -45,10 +45,12 @@ import { UnrecordedFactNotice } from './UnrecordedFactNotice';import { UpdatePathDialog } from './UpdatePathDialog';import { WorkingMemorySection } from './WorkingMemorySection';-const TRIGGER_PHRASE_TYPES = new Set(['main', 'lora', 'embedding']);const EMPTY_TRIGGER_PHRASES: readonly string[] = [];-type ModelDetailShellModel = Pick<ModelConfig, 'key' | 'type'>;+type ModelDetailShellModel = Pick<ModelConfig, 'key' | 'type'> & {+ hasCpuOnlySetting: boolean;+ hasTriggerPhrases: boolean;+};type TriggerPhrasesModel = Pick<ModelConfig, 'key' | 'trigger_phrases'>;type CpuOnlyModel = Pick<ModelConfig, 'cpu_only' | 'key' | 'name' | 'type'>;type ModelIdentityModel = Pick<@@ -85,7 +87,17 @@ const findModel = (snapshot: ModelsSnapshot, modelKey: string): ModelConfig | unconst selectModelShell = (snapshot: ModelsSnapshot, modelKey: string): ModelDetailShellModel | null => {const model = findModel(snapshot, modelKey);- return model ? { key: model.key, type: model.type } : null;+ // The backend serializes `cpu_only` and `trigger_phrases` (null when unset) on exactly the configs that store them,+ // so presence decides which editors appear. Control LoRAs store `trigger_phrases` but prompt triggers never read+ // them, so they get no editor. Flags rather than the values, so editing them does not re-render the whole detail.+ return model+ ? {+ hasCpuOnlySetting: supportsCpuOnlySetting(model),+ hasTriggerPhrases: model.trigger_phrases !== undefined && model.type !== 'control_lora',+ key: model.key,+ type: model.type,+ }+ : null;};const selectModelIdentity = (snapshot: ModelsSnapshot, modelKey: string): ModelIdentityModel | null => {@@ -200,7 +212,7 @@ export const ModelDetail = ({<Stack gap="4" pb="4"><ModelIdentitySectionContainer modelKey={model.key} onRequestConfirm={onRequestConfirm} />- {supportsCpuOnlySetting(model) ? (+ {model.hasCpuOnlySetting ? (<><Separator borderColor="border.subtle" /><CpuOnlySettingContainer modelKey={model.key} />@@ -228,7 +240,7 @@ export const ModelDetail = ({</>) : null}- {TRIGGER_PHRASE_TYPES.has(model.type) ? (+ {model.hasTriggerPhrases ? (<><Separator borderColor="border.subtle" /><TriggerPhrasesEditorContainer modelKey={model.key} />diff --git a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.browser.test.tsx b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.browser.test.tsxindex f34c7fdea7..54812b6f52 100644--- a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.browser.test.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.browser.test.tsx@@ -1,7 +1,9 @@import type { ModelConfig } from '@features/models/core/types';import { ChakraProvider } from '@chakra-ui/react';+import { getModelTypeLabel, getModelVariantLabel } from '@features/models/core/taxonomy';import { accountLifecycle } from '@platform/state/accountLifecycle';+import { ApiError } from '@platform/transport/http';import { system } from '@theme/system';import { act } from 'react';import { createRoot, type Root } from 'react-dom/client';@@ -69,6 +71,26 @@ const selectTriggerNames = (host: HTMLElement): string[] =>.trim());+const selectTrigger = (host: HTMLElement, name: string): HTMLButtonElement => {+ const triggers = [...host.querySelectorAll<HTMLButtonElement>('[data-scope="select"][data-part="trigger"]')];++ return triggers[selectTriggerNames(host).indexOf(name)]!;+};++const option = (label: string): HTMLElement =>+ [...document.querySelectorAll<HTMLElement>('[role="option"]')].find((item) => item.textContent === label)!;++const pick = async (host: HTMLElement, name: string, label: string): Promise<void> => {+ await act(async () => {+ selectTrigger(host, name).click();+ await Promise.resolve();+ });+ await act(async () => {+ option(label).click();+ await Promise.resolve();+ });+};+describe('ModelEditForm', () => {let host: HTMLDivElement;let root: Root;@@ -117,11 +139,18 @@ describe('ModelEditForm', () => {expect(host.querySelector<HTMLInputElement>('input[value="v1-inference.yaml"]')).not.toBeNull();});- it('hides config path and falls back to free-text variant when the model has neither', async () => {+ it('hides config path, variant and prediction type when the config has none of them', async () => {await mount(diffusersVae);expect(host.textContent).not.toContain('models.configPath');- // sdxl vae has no variant concept: free-text input, no select trigger.+ expect(host.textContent).not.toContain('models.variant');+ expect(host.textContent).not.toContain('models.predictionType');+ });++ it('falls back to a free-text variant when the config has one but no curated choices', async () => {+ await mount({ ...diffusersVae, variant: null } as ModelConfig);++ expect(host.textContent).toContain('models.variant');expect(selectTriggerNames(host)).not.toContain('models.variant');});@@ -188,6 +217,44 @@ describe('ModelEditForm', () => {});expect(api.updateModel).toHaveBeenCalledOnce();- expect(api.updateModel.mock.calls[0]![1]).not.toHaveProperty('config_path');+ const body = api.updateModel.mock.calls[0]![1] as object;+ expect(body).not.toHaveProperty('config_path');+ expect(body).not.toHaveProperty('prediction_type');+ expect(body).not.toHaveProperty('variant');+ });++ it('offers variant and prediction type when reclassifying into a main model, and sends what was picked', async () => {+ api.updateModel.mockResolvedValue({ ...diffusersVae, prediction_type: null, type: 'main', variant: 'inpaint' });+ await mount(diffusersVae);++ await pick(host, 'models.type', getModelTypeLabel('main'));+ expect(selectTriggerNames(host)).toEqual(expect.arrayContaining(['models.variant', 'models.predictionType']));++ await pick(host, 'models.variant', getModelVariantLabel('inpaint'));+ await act(async () => {+ saveButton().click();+ await Promise.resolve();+ });++ expect(api.updateModel).toHaveBeenCalledWith(+ 'sdxl-vae',+ expect.objectContaining({ prediction_type: null, type: 'main', variant: 'inpaint' }),+ expect.anything()+ );+ });++ it("shows the backend's refusal as readable text", async () => {+ api.updateModel.mockRejectedValue(+ new ApiError(JSON.stringify({ detail: "Model 'Checkpoint Main' does not support variant" }), 409)+ );+ await mount(checkpointMain);++ await act(async () => {+ saveButton().click();+ await Promise.resolve();+ });++ expect(host.querySelector('[role="alert"]')?.textContent).toBe("Model 'Checkpoint Main' does not support variant");+ expect(onSaved).not.toHaveBeenCalled();});});diff --git a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.tsx b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.tsxindex 8f43360791..3f0f2f6fdc 100644--- a/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.tsx+++ b/invokeai/frontend/webv2/src/features/models/ui/detail/ModelEditForm.tsx@@ -34,6 +34,7 @@ import {isAccountScopeCurrent,} from '@platform/state/accountLifecycle';import { shallowEqual } from '@platform/state/selectors';+import { getApiErrorMessage } from '@platform/transport/http';import { Button, Field, Select } from '@platform/ui';import { useMemo, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -79,8 +80,8 @@ export const ModelEditForm = ({onSaved: () => void;}) => {const { t } = useTranslation();- // `config_path` only exists on checkpoint-style config classes; its absence- // (not emptiness) hides the field, since the PATCH would silently drop it.+ // The backend serializes these (null when unset) only on config classes that store them, and refuses a value for a+ // field the class lacks, so absence (not emptiness) hides the field and keeps it out of the PATCH.const hasConfigPath = model.config_path !== undefined;const serverValues = useMemo(() => toModelIdentityValues(model), [model]);const draft = useModelDraft(model.key, selectIdentityDraft);@@ -148,6 +149,11 @@ export const ModelEditForm = ({variantOptions: options,};}, [form.values.base, form.values.type, form.values.variant, t]);+ // Variant and prediction type also follow the edited type and base: reclassifying a model into a class that requires+ // them (an SD main needs both) must be able to supply them. Untouched, they submit null, which any class accepts; a+ // value the resulting class cannot store comes back as the backend's refusal.+ const showsVariant = model.variant !== undefined || variantOptions.length > 0;+ const showsPredictionType = model.prediction_type !== undefined || form.values.type === 'main';const handleSave = () => {clearModelIdentitySaveError(model.key);@@ -169,10 +175,14 @@ export const ModelEditForm = ({description: values.description || null,format: values.format,name: values.name,- prediction_type: values.predictionType === '' ? null : (values.predictionType as PredictionType),source_url: values.sourceUrl === '' ? null : values.sourceUrl,type: values.type,- variant: values.variant === '' ? null : values.variant,+ ...(showsPredictionType+ ? {+ prediction_type: values.predictionType === '' ? null : (values.predictionType as PredictionType),+ }+ : {}),+ ...(showsVariant ? { variant: values.variant === '' ? null : values.variant } : {}),...(hasConfigPath ? { config_path: values.configPath === '' ? null : values.configPath } : {}),},owner.signal@@ -192,7 +202,7 @@ export const ModelEditForm = ({model.key,'identity',serverValues,- error instanceof Error ? error.message : t('common.somethingWentWrong')+ getApiErrorMessage(error, t('common.somethingWentWrong')));}});@@ -248,46 +258,52 @@ export const ModelEditForm = ({/></Field></HStack>- <HStack align="start" gap="2">- <Field error={form.errors.variant} helpText={t('models.variantHelp')} label={t('models.variant')}>- {variantOptions.length > 0 ? (- <Select- aria-label={t('models.variant')}- collection={variantCollection}- size="lg"- value={[form.values.variant]}- onValueChange={({ value }) => {- const variant = value[0];+ {showsVariant || showsPredictionType ? (+ <HStack align="start" gap="2">+ {showsVariant ? (+ <Field error={form.errors.variant} helpText={t('models.variantHelp')} label={t('models.variant')}>+ {variantOptions.length > 0 ? (+ <Select+ aria-label={t('models.variant')}+ collection={variantCollection}+ size="lg"+ value={[form.values.variant]}+ onValueChange={({ value }) => {+ const variant = value[0];- if (variant !== undefined) {- setField('variant', variant);- }- }}- />- ) : (- <Input- size="lg"- value={form.values.variant}- onChange={(event) => setField('variant', event.currentTarget.value)}- />- )}- </Field>- <Field error={form.errors.predictionType} label={t('models.predictionType')}>- <Select- aria-label={t('models.predictionType')}- collection={predictionTypeCollection}- size="lg"- value={[form.values.predictionType]}- onValueChange={({ value }) => {- const predictionType = value[0];+ if (variant !== undefined) {+ setField('variant', variant);+ }+ }}+ />+ ) : (+ <Input+ size="lg"+ value={form.values.variant}+ onChange={(event) => setField('variant', event.currentTarget.value)}+ />+ )}+ </Field>+ ) : null}+ {showsPredictionType ? (+ <Field error={form.errors.predictionType} label={t('models.predictionType')}>+ <Select+ aria-label={t('models.predictionType')}+ collection={predictionTypeCollection}+ size="lg"+ value={[form.values.predictionType]}+ onValueChange={({ value }) => {+ const predictionType = value[0];- if (predictionType !== undefined) {- setField('predictionType', predictionType as ModelEditFormValues['predictionType']);- }- }}- />- </Field>- </HStack>+ if (predictionType !== undefined) {+ setField('predictionType', predictionType as ModelEditFormValues['predictionType']);+ }+ }}+ />+ </Field>+ ) : null}+ </HStack>+ ) : null}<HStack align="start" gap="2"><Field error={form.errors.format} helpText={t('models.formatHelp')} label={t('models.format')}><Selectdiff --git a/tests/app/routers/test_model_manager.py b/tests/app/routers/test_model_manager.pyindex eb1f02a7b2..2a1dfdc9c3 100644--- a/tests/app/routers/test_model_manager.py+++ b/tests/app/routers/test_model_manager.py@@ -408,6 +408,8 @@ def test_update_model_record_answers_with_the_service_outcome(client: TestClientrenamed = client.patch(f"/api/v2/models/i/{key}", json={"name": "renamed"})unknown = client.patch("/api/v2/models/i/no-such-model", json={"name": "renamed"})rejected = client.patch(f"/api/v2/models/i/{key}", json={"path": "x" * 800})+ # A VAE has no trigger phrases: the change is refused rather than dropped behind a success response.+ unsupported = client.patch(f"/api/v2/models/i/{key}", json={"trigger_phrases": ["phrase"]})assert renamed.status_code == 200assert renamed.json()["name"] == "renamed"@@ -416,6 +418,13 @@ def test_update_model_record_answers_with_the_service_outcome(client: TestClientassert unknown.status_code == 404assert rejected.status_code == 409assert "at most" in rejected.json()["detail"]+ assert unsupported.status_code == 409+ assert "trigger_phrases" in unsupported.json()["detail"]++ # Older clients still send `upcast_attention`, which no record stores; it is not a change, so it is ignored.+ legacy = client.patch(f"/api/v2/models/i/{key}", json={"name": "legacy", "upcast_attention": False})+ assert legacy.status_code == 200+ assert model_record_routes.store.get_model(key).name == "legacy"def test_reidentify_model_answers_with_the_service_outcome(diff --git a/tests/app/services/model_records/test_model_records_sql.py b/tests/app/services/model_records/test_model_records_sql.pyindex 2630d8fdee..f044a99ccb 100644--- a/tests/app/services/model_records/test_model_records_sql.py+++ b/tests/app/services/model_records/test_model_records_sql.py@@ -24,14 +24,16 @@ from invokeai.app.services.shared.database.schema.models import modelsfrom invokeai.app.services.shared.pagination import SQLiteDirectionfrom invokeai.backend.model_manager.configs.base import Config_Basefrom invokeai.backend.model_manager.configs.controlnet import ControlAdapterDefaultSettings-from invokeai.backend.model_manager.configs.lora import LoRA_LyCORIS_SDXL_Config+from invokeai.backend.model_manager.configs.lora import LoRA_LyCORIS_SD1_Config, LoRA_LyCORIS_SDXL_Configfrom invokeai.backend.model_manager.configs.main import (+ Main_Checkpoint_SD1_Config,Main_Diffusers_SD1_Config,Main_Diffusers_SD2_Config,Main_Diffusers_SDXL_Config,MainModelDefaultSettings,)from invokeai.backend.model_manager.configs.qwen3_encoder import Qwen3Encoder_Qwen3Encoder_Config+from invokeai.backend.model_manager.configs.qwen3_vl_encoder import Qwen3VLEncoder_Checkpoint_MiniMaxH3_Configfrom invokeai.backend.model_manager.configs.text_llm import TextLLM_Checkpoint_Config, TextLLM_Diffusers_Configfrom invokeai.backend.model_manager.configs.textual_inversion import TI_File_SD1_Configfrom invokeai.backend.model_manager.configs.unknown import Unknown_Config@@ -231,6 +233,129 @@ def test_rejected_class_change_preserves_the_original_record(store: ModelRecordSassert after.model_dump() == before.model_dump()+def test_minimax_h3_text_encoder_stores_its_cpu_only_setting(store: ModelRecordServiceBase) -> None:+ """Issue #9865: the switch reported success while the record kept no setting."""+ config = Qwen3VLEncoder_Checkpoint_MiniMaxH3_Config(+ key="h3-encoder",+ source="test/source/",+ source_type=ModelSourceType.Path,+ path="/tmp/qwen3vl_32b_minimax_h3_int8_convrot.safetensors",+ file_size=1024,+ name="MiniMax H3 Text Encoder (int8)",+ hash="ABC123",+ )+ store.add_model(config)++ store.update_model(config.key, ModelRecordChanges(cpu_only=True), allow_class_change=True)+ assert store.get_model(config.key).cpu_only is True++ store.update_model(config.key, ModelRecordChanges(cpu_only=None), allow_class_change=True)+ assert store.get_model(config.key).cpu_only is None+++def test_update_refuses_a_value_the_model_cannot_store(store: ModelRecordServiceBase) -> None:+ original = example_ti_config("key1")+ store.add_model(original)+ before = store.get_model(original.key)++ with pytest.raises(ValueError, match="'old name' does not support cpu_only"):+ store.update_model(original.key, ModelRecordChanges(cpu_only=True, name="renamed"), allow_class_change=True)++ assert store.get_model(original.key).model_dump() == before.model_dump()+++def test_update_accepts_clearing_a_field_the_model_does_not_have(store: ModelRecordServiceBase) -> None:+ """The identity form sends null for prediction_type and variant whatever the model's class."""+ store.add_model(example_ti_config("key1"))++ changes = ModelRecordChanges(cpu_only=None, prediction_type=None, variant=None, name="renamed")+ updated = store.update_model("key1", changes, allow_class_change=True)++ assert updated.name == "renamed"+++def test_class_change_drops_values_only_the_previous_class_stores(store: ModelRecordServiceBase) -> None:+ """The edit form re-sends the old class's values when the type changes."""+ store.add_model(+ Main_Checkpoint_SD1_Config(+ key="key1",+ source="test/source/",+ source_type=ModelSourceType.Path,+ path="/tmp/model.safetensors",+ file_size=1024,+ name="model",+ hash="ABC123",+ prediction_type=SchedulerPredictionType.VPrediction,+ variant=ModelVariantType.Normal,+ )+ )++ changes = ModelRecordChanges(+ type=ModelType.LoRA,+ format=ModelFormat.LyCORIS,+ prediction_type=SchedulerPredictionType.VPrediction,+ variant=ModelVariantType.Normal,+ )+ store.update_model("key1", changes, allow_class_change=True)++ assert isinstance(store.get_model("key1"), LoRA_LyCORIS_SD1_Config)+++def test_class_change_stores_values_only_the_new_class_has(store: ModelRecordServiceBase) -> None:+ store.add_model(+ LoRA_LyCORIS_SD1_Config(+ key="key1",+ source="test/source/",+ source_type=ModelSourceType.Path,+ path="/tmp/model.safetensors",+ file_size=1024,+ name="model",+ hash="ABC123",+ )+ )++ changes = ModelRecordChanges(+ type=ModelType.Main,+ format=ModelFormat.Checkpoint,+ prediction_type=SchedulerPredictionType.VPrediction,+ variant=ModelVariantType.Inpaint,+ )+ store.update_model("key1", changes, allow_class_change=True)++ stored = store.get_model("key1")+ assert isinstance(stored, Main_Checkpoint_SD1_Config)+ assert (stored.prediction_type, stored.variant) == (SchedulerPredictionType.VPrediction, ModelVariantType.Inpaint)+++def _diffusers_vae_config() -> VAE_Diffusers_SD1_Config:+ return VAE_Diffusers_SD1_Config(+ key="key1",+ source="test/source/",+ source_type=ModelSourceType.Path,+ path="/tmp/vae",+ file_size=1024,+ name="old name",+ hash="ABC123",+ repo_variant=ModelRepoVariant.Default,+ )+++ "make_config", [lambda: example_ti_config("key1"), _diffusers_vae_config], ids=["embedding", "vae"]+)+def test_a_record_posted_back_with_an_edit_is_accepted(store: ModelRecordServiceBase, make_config: Any) -> None:+ """The legacy edit form submits the whole record; every field it holds is one its class stores."""+ store.add_model(make_config())+ record = store.get_model("key1").model_dump()+ echoed = {field: value for field, value in record.items() if field in ModelRecordChanges.model_fields}++ updated = store.update_model(+ "key1", ModelRecordChanges.model_validate({**echoed, "name": "renamed"}), allow_class_change=True+ )++ assert updated.model_dump() == {**record, "name": "renamed"}++@pytest.mark.parametrize("field", ["type", "base"])def test_model_record_changes_reject_invalid_classification_values(field: str) -> None:with pytest.raises(ValidationError):