invoke-ai/InvokeAI · error · ValueError
LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.
Error message
LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.lora.base else 'unknown'} models, not Anima models. Ensure you are using an Anima compatible LoRA. What it means
The loader validates that each LoRA's base model type is BaseModelType.Anima. LoRAs trained for other architectures (SDXL, Flux, SD1.x, etc.) have incompatible weight shapes and target modules, so applying them would corrupt the model. The error names the LoRA's actual base type and asks for an Anima-compatible LoRA.
Source
Thrown at invokeai/app/invocations/anima_lora_loader.py:153
added_loras: list[str] = []
if self.transformer is not None:
output.transformer = self.transformer.model_copy(deep=True)
if self.qwen3_encoder is not None:
output.qwen3_encoder = self.qwen3_encoder.model_copy(deep=True)
for lora in loras:
if lora is None:
continue
if lora.lora.key in added_loras:
continue
if not context.models.exists(lora.lora.key):
raise ValueError(f"Unknown lora: {lora.lora.key}!")
if lora.lora.base is not BaseModelType.Anima:
raise ValueError(
f"LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.lora.base else 'unknown'} models, "
"not Anima models. Ensure you are using an Anima compatible LoRA."
)
added_loras.append(lora.lora.key)
if self.transformer is not None and output.transformer is not None:
output.transformer.loras.append(lora)
if self.qwen3_encoder is not None and output.qwen3_encoder is not None:
output.qwen3_encoder.loras.append(lora)
return output
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Replace the LoRA with one explicitly trained for Anima models.
- Check the LoRA's base model metadata in the model manager and correct it if mislabeled.
- Remove the incompatible LoRA from the workflow before running.
Example fix
// before lora = LoraSelector(lora=sdxl_lora_key, weight=0.8) # base=SDXL // after lora = LoraSelector(lora=anima_lora_key, weight=0.8) # base=Anima
Defensive patterns
Strategy: validation
Validate before calling
from invokeai.backend.model_manager.config import BaseModelType
for lora in loras:
if lora.lora.base is not BaseModelType.Anima:
print(f"Skip {lora.lora.key}: base={lora.lora.base}") Type guard
def is_anima_lora(lora) -> bool:
from invokeai.backend.model_manager.config import BaseModelType
return lora.lora.base is BaseModelType.Anima Try / catch
try:
output = lora_loader.invoke(context)
except ValueError as e:
if "not Anima models" in str(e):
swap_to_anima_lora(e)
else:
raise Prevention
- Only download LoRAs explicitly labeled for Anima; check base model metadata before use.
- Never reuse LoRA selector nodes across pipelines with different base model types.
- Verify LoRA metadata after import; a None base type is a red flag.
When it happens
Trigger: Invoking AnimaLoRALoader with any LoRA in self.transformer.loras whose lora.lora.base is not BaseModelType.Anima (None base also triggers the 'unknown' variant).
Common situations: Dragging an SDXL/Flux LoRA from a shared workflow into an Anima pipeline; downloading a LoRA for the wrong architecture from Civitai; a LoRA file with missing/incorrect metadata so its base type resolves to None.
Related errors
- LoRA '{lora.lora.key}' is for {lora.lora.base.value if lora.
- LoRA "{lora_key}" already applied to transformer.
- LoRA "{lora_key}" already applied to Qwen3 encoder.
- Unknown lora: {lora.lora.key}!
- Expected ModelPatchRaw for LoRA '{lora.lora.key}', got {type
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/803d0c57ef54016a.
Report an issue: GitHub.